@visactor/vtable 1.11.2 → 1.11.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/cjs/ListTable.js +15 -12
  2. package/cjs/ListTable.js.map +1 -1
  3. package/cjs/PivotChart.js +6 -6
  4. package/cjs/PivotChart.js.map +1 -1
  5. package/cjs/PivotTable.js +13 -11
  6. package/cjs/PivotTable.js.map +1 -1
  7. package/cjs/components/react/react-custom-layout.d.ts +5 -1
  8. package/cjs/components/react/react-custom-layout.js +19 -5
  9. package/cjs/components/react/react-custom-layout.js.map +1 -1
  10. package/cjs/core/BaseTable.d.ts +1 -1
  11. package/cjs/core/BaseTable.js +6 -5
  12. package/cjs/core/BaseTable.js.map +1 -1
  13. package/cjs/core/record-helper.js +5 -3
  14. package/cjs/core/record-helper.js.map +1 -1
  15. package/cjs/event/event.js +3 -3
  16. package/cjs/event/event.js.map +1 -1
  17. package/cjs/index.d.ts +1 -1
  18. package/cjs/index.js +1 -1
  19. package/cjs/index.js.map +1 -1
  20. package/cjs/plugins/custom-cell-style.js +2 -2
  21. package/cjs/plugins/custom-cell-style.js.map +1 -1
  22. package/cjs/scenegraph/refresh-node/update-chart.js +46 -22
  23. package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
  24. package/cjs/scenegraph/scenegraph.d.ts +1 -1
  25. package/cjs/scenegraph/scenegraph.js +6 -1
  26. package/cjs/scenegraph/scenegraph.js.map +1 -1
  27. package/cjs/state/checkbox/checkbox.js +2 -2
  28. package/cjs/state/checkbox/checkbox.js.map +1 -1
  29. package/cjs/state/select/is-cell-select-highlight.js +4 -4
  30. package/cjs/state/select/is-cell-select-highlight.js.map +1 -1
  31. package/cjs/state/select/update-position.js +5 -5
  32. package/cjs/state/select/update-position.js.map +1 -1
  33. package/cjs/state/state.js +1 -1
  34. package/cjs/state/state.js.map +1 -1
  35. package/cjs/ts-types/base-table.d.ts +1 -1
  36. package/cjs/ts-types/base-table.js.map +1 -1
  37. package/cjs/ts-types/list-table/define/basic-define.d.ts +1 -1
  38. package/cjs/ts-types/list-table/define/basic-define.js.map +1 -1
  39. package/cjs/ts-types/pivot-table/indicator/basic-indicator.d.ts +1 -1
  40. package/cjs/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
  41. package/cjs/vrender.js.map +1 -1
  42. package/dist/vtable.js +172 -75
  43. package/dist/vtable.min.js +2 -2
  44. package/es/ListTable.js +15 -12
  45. package/es/ListTable.js.map +1 -1
  46. package/es/PivotChart.js +6 -6
  47. package/es/PivotChart.js.map +1 -1
  48. package/es/PivotTable.js +13 -11
  49. package/es/PivotTable.js.map +1 -1
  50. package/es/components/react/react-custom-layout.d.ts +5 -1
  51. package/es/components/react/react-custom-layout.js +19 -5
  52. package/es/components/react/react-custom-layout.js.map +1 -1
  53. package/es/core/BaseTable.d.ts +1 -1
  54. package/es/core/BaseTable.js +5 -4
  55. package/es/core/BaseTable.js.map +1 -1
  56. package/es/core/record-helper.js +5 -3
  57. package/es/core/record-helper.js.map +1 -1
  58. package/es/event/event.js +3 -3
  59. package/es/event/event.js.map +1 -1
  60. package/es/index.d.ts +1 -1
  61. package/es/index.js +1 -1
  62. package/es/index.js.map +1 -1
  63. package/es/plugins/custom-cell-style.js +2 -2
  64. package/es/plugins/custom-cell-style.js.map +1 -1
  65. package/es/scenegraph/refresh-node/update-chart.js +46 -22
  66. package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
  67. package/es/scenegraph/scenegraph.d.ts +1 -1
  68. package/es/scenegraph/scenegraph.js +6 -1
  69. package/es/scenegraph/scenegraph.js.map +1 -1
  70. package/es/state/checkbox/checkbox.js +2 -2
  71. package/es/state/checkbox/checkbox.js.map +1 -1
  72. package/es/state/select/is-cell-select-highlight.js +4 -4
  73. package/es/state/select/is-cell-select-highlight.js.map +1 -1
  74. package/es/state/select/update-position.js +5 -5
  75. package/es/state/select/update-position.js.map +1 -1
  76. package/es/state/state.js +1 -1
  77. package/es/state/state.js.map +1 -1
  78. package/es/ts-types/base-table.d.ts +1 -1
  79. package/es/ts-types/base-table.js.map +1 -1
  80. package/es/ts-types/list-table/define/basic-define.d.ts +1 -1
  81. package/es/ts-types/list-table/define/basic-define.js.map +1 -1
  82. package/es/ts-types/pivot-table/indicator/basic-indicator.d.ts +1 -1
  83. package/es/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
  84. package/es/vrender.js.map +1 -1
  85. package/package.json +4 -4
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;AAuB3D,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,MAAM,iCAAiC,CAAC;AAK/F,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAK7C,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;AAIhC,OAAO,EAKL,KAAK,EACL,IAAI,EACJ,SAAS,EACT,eAAe,EAEf,UAAU,EACV,gBAAgB,EAGhB,UAAU,EAkBV,MAAM,EACN,IAAI,EAEJ,QAAQ,EACR,WAAW,EAEX,QAAQ,EAIR,cAAc,EACd,YAAY,EACZ,UAAU,EACV,WAAW,EACX,WAAW,EACX,wBAAwB,EACxB,kBAAkB,EAEnB,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;AAClD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,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 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 GanttConstructorOptions,\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 } from './scenegraph/utils/text-measure';\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';\n\n// export * as VRender from './vrender';\n// import * as VRender from './vrender';\n\nexport const version = \"1.11.2\";\n/**\n * @namespace VTable\n */\nexport {\n /**\n * Types\n * @namespace VTable.TYPES\n */\n TYPES,\n core,\n ListTable,\n ListTableSimple,\n ListTableConstructorOptions,\n PivotTable,\n PivotTableSimple,\n PivotTableConstructorOptions,\n PivotChartConstructorOptions,\n PivotChart,\n GanttConstructorOptions,\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 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 // 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';\nexport * from './plugins/invert-highlight';\nexport * from './plugins/carousel-animation';\nexport * from './plugins/header-highlight';\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;AAuB3D,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,gBA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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 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 GanttConstructorOptions,\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 } from './scenegraph/utils/text-measure';\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';\n\n// export * as VRender from './vrender';\n// import * as VRender from './vrender';\n\nexport const version = \"1.11.3\";\n/**\n * @namespace VTable\n */\nexport {\n /**\n * Types\n * @namespace VTable.TYPES\n */\n TYPES,\n core,\n ListTable,\n ListTableSimple,\n ListTableConstructorOptions,\n PivotTable,\n PivotTableSimple,\n PivotTableConstructorOptions,\n PivotChartConstructorOptions,\n PivotChart,\n GanttConstructorOptions,\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 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 // 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';\nexport * from './plugins/invert-highlight';\nexport * from './plugins/carousel-animation';\nexport * from './plugins/header-highlight';\n"]}
@@ -34,7 +34,7 @@ export class CustomCellStylePlugin {
34
34
  style: customStyle
35
35
  }, this.customCellStyleArrangement.forEach((cellStyle => {
36
36
  const cellPos = cellStyle.cellPosition;
37
- if (cellStyle.customStyleId === customStyleId) if (cellPos.range) for (let col = cellPos.range.start.col; col <= cellPos.range.end.col; col++) for (let row = cellPos.range.start.row; row <= cellPos.range.end.row; row++) this.table.scenegraph.updateCellContent(col, row); else this.table.scenegraph.updateCellContent(cellPos.col, cellPos.row);
37
+ if (cellStyle.customStyleId === customStyleId) if (cellPos.range) for (let col = Math.max(0, cellPos.range.start.col); col <= Math.min(this.table.colCount - 1, cellPos.range.end.col); col++) for (let row = Math.max(0, cellPos.range.start.row); row <= Math.min(this.table.rowCount - 1, cellPos.range.end.row); row++) this.table.scenegraph.updateCellContent(col, row); else this.table.scenegraph.updateCellContent(cellPos.col, cellPos.row);
38
38
  })), this.table.scenegraph.updateNextFrame();
39
39
  }
40
40
  arrangeCustomCellStyle(cellPos, customStyleId) {
@@ -51,7 +51,7 @@ export class CustomCellStylePlugin {
51
51
  if (this.customCellStyleArrangement[index].customStyleId === customStyleId) return;
52
52
  customStyleId ? this.customCellStyleArrangement[index].customStyleId = customStyleId : this.customCellStyleArrangement.splice(index, 1);
53
53
  }
54
- if (cellPos.range) for (let col = cellPos.range.start.col; col <= cellPos.range.end.col; col++) for (let row = cellPos.range.start.row; row <= cellPos.range.end.row; row++) {
54
+ if (cellPos.range) for (let col = Math.max(0, cellPos.range.start.col); col <= Math.min(this.table.colCount - 1, cellPos.range.end.col); col++) for (let row = Math.max(0, cellPos.range.start.row); row <= Math.min(this.table.rowCount - 1, cellPos.range.end.row); row++) {
55
55
  const range = this.table.getCellRange(col, row);
56
56
  for (let c = range.start.col; c <= range.end.col; c++) for (let r = range.start.row; r <= range.end.row; r++) this.table.scenegraph.updateCellContent(c, r);
57
57
  } else this.table.scenegraph.updateCellContent(cellPos.col, cellPos.row);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/plugins/custom-cell-style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAWzC,MAAM,OAAO,qBAAqB;IAKhC,YACE,KAAmB,EACnB,eAAkC,EAClC,0BAAwD;QAExD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,0BAA0B,GAAG,0BAA0B,CAAC;IAC/D,CAAC;IAED,kBAAkB,CAAC,GAAW,EAAE,GAAW;QACzC,MAAM,cAAc,GAAG,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,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,aAAa,CAAC,CAAC;IACxE,CAAC;CACF;AAED,MAAM,UAAU,UAAU,CAAC,UAAiB,EAAE,eAAkC;IAC9E,UAAU,GAAG,UAAU,CAAC,KAAK,EAAE,CAAC;IAEhC,KAAK,MAAM,GAAG,IAAI,eAAe,EAAE;QACjC,MAAM,KAAK,GAAI,eAAuB,CAAC,GAAG,CAAC,CAAC;QAC5C,IAAI,KAAK,EAAE;YACR,UAAkB,CAAC,IAAI,GAAG,EAAE,CAAC,GAAG,KAAK,CAAC;SACxC;KACF;IAED,OAAO,UAAU,CAAC;AACpB,CAAC","file":"custom-cell-style.js","sourcesContent":["import { merge } from '@visactor/vutils';\nimport type { Style } from '../body-helper/style';\nimport type {\n CellRange,\n ColumnStyleOption,\n CustomCellStyle,\n CustomCellStyleArrangement,\n FullExtendStyle\n} from '../ts-types';\nimport type { BaseTableAPI } from '../ts-types/base-table';\n\nexport class CustomCellStylePlugin {\n table: BaseTableAPI;\n customCellStyle: CustomCellStyle[];\n customCellStyleArrangement: CustomCellStyleArrangement[];\n\n constructor(\n table: BaseTableAPI,\n customCellStyle: CustomCellStyle[],\n customCellStyleArrangement: CustomCellStyleArrangement[]\n ) {\n this.table = table;\n this.customCellStyle = customCellStyle;\n this.customCellStyleArrangement = customCellStyleArrangement;\n }\n\n getCustomCellStyle(col: number, row: number) {\n const customStyleIds = this.getCustomCellStyleIds(col, row);\n if (customStyleIds.length) {\n const styles: ColumnStyleOption[] = [];\n\n customStyleIds.forEach(customStyleId => {\n const styleOption = this.getCustomCellStyleOption(customStyleId);\n if (styleOption?.style) {\n styles.push(styleOption.style);\n }\n });\n\n return merge({}, ...styles);\n // const styleOption = this.getCustomCellStyleOption(customStyleId);\n // return styleOption?.style;\n }\n return undefined;\n }\n\n getCustomCellStyleIds(col: number, row: number) {\n // let customStyleId;\n const customStyleIds: string[] = [];\n\n const range = this.table.getCellRange(col, row);\n for (let c = range.start.col; c <= range.end.col; c++) {\n for (let r = range.start.row; r <= range.end.row; r++) {\n // eslint-disable-next-line no-loop-func\n this.customCellStyleArrangement.forEach(style => {\n if (style.cellPosition.range) {\n if (\n style.cellPosition.range.start.col <= c &&\n style.cellPosition.range.end.col >= c &&\n style.cellPosition.range.start.row <= r &&\n style.cellPosition.range.end.row >= r\n ) {\n // customStyleId = style.customStyleId;\n customStyleIds.push(style.customStyleId);\n }\n } else if (style.cellPosition.col === c && style.cellPosition.row === r) {\n // customStyleId = style.customStyleId;\n customStyleIds.push(style.customStyleId);\n }\n });\n }\n }\n\n return customStyleIds;\n }\n\n getCustomCellStyleOption(customStyleId: string) {\n return this.customCellStyle.find(style => style.id === customStyleId);\n }\n\n registerCustomCellStyle(customStyleId: string, customStyle: ColumnStyleOption | undefined | null) {\n const index = this.customCellStyle.findIndex(style => style.id === customStyleId);\n if (index === -1) {\n this.customCellStyle.push({\n id: customStyleId,\n style: customStyle\n });\n } else {\n this.customCellStyle[index] = {\n id: customStyleId,\n style: customStyle\n };\n }\n\n this.customCellStyleArrangement.forEach(cellStyle => {\n const cellPos = cellStyle.cellPosition;\n if (cellStyle.customStyleId === customStyleId) {\n if (cellPos.range) {\n for (let col = cellPos.range.start.col; col <= cellPos.range.end.col; col++) {\n for (let row = cellPos.range.start.row; row <= cellPos.range.end.row; row++) {\n this.table.scenegraph.updateCellContent(col, row);\n }\n }\n } else {\n this.table.scenegraph.updateCellContent(cellPos.col, cellPos.row);\n }\n }\n });\n this.table.scenegraph.updateNextFrame();\n }\n\n arrangeCustomCellStyle(\n cellPos: {\n col?: number;\n row?: number;\n range?: CellRange;\n },\n customStyleId: string | undefined | null\n ) {\n const index = this.customCellStyleArrangement.findIndex(style => {\n if (style.cellPosition.range && cellPos.range) {\n return (\n style.cellPosition.range.start.col === cellPos.range.start.col &&\n style.cellPosition.range.start.row === cellPos.range.start.row &&\n style.cellPosition.range.end.col === cellPos.range.end.col &&\n style.cellPosition.range.end.row === cellPos.range.end.row\n );\n }\n return style.cellPosition.col === cellPos.col && style.cellPosition.row === cellPos.row;\n });\n\n if (index === -1 && !customStyleId) {\n // do nothing\n return;\n } else if (index === -1 && customStyleId) {\n // add new style\n this.customCellStyleArrangement.push({\n cellPosition: {\n col: cellPos.col,\n row: cellPos.row,\n range: cellPos.range\n },\n customStyleId: customStyleId\n });\n } else if (this.customCellStyleArrangement[index].customStyleId === customStyleId) {\n // same style\n return;\n } else if (customStyleId) {\n // update style\n this.customCellStyleArrangement[index].customStyleId = customStyleId;\n } else {\n // delete useless style\n this.customCellStyleArrangement.splice(index, 1);\n }\n\n // update cell group\n if (cellPos.range) {\n for (let col = cellPos.range.start.col; col <= cellPos.range.end.col; col++) {\n for (let row = cellPos.range.start.row; row <= cellPos.range.end.row; row++) {\n const range = this.table.getCellRange(col, row);\n for (let c = range.start.col; c <= range.end.col; c++) {\n for (let r = range.start.row; r <= range.end.row; r++) {\n this.table.scenegraph.updateCellContent(c, r);\n }\n }\n // this.table.scenegraph.updateCellContent(col, row);\n }\n }\n } else {\n this.table.scenegraph.updateCellContent(cellPos.col, cellPos.row);\n }\n\n this.table.scenegraph.updateNextFrame();\n }\n\n updateCustomCell(customCellStyle: CustomCellStyle[], customCellStyleArrangement: CustomCellStyleArrangement[]) {\n this.customCellStyle.length = 0;\n this.customCellStyleArrangement.length = 0;\n customCellStyle.forEach((cellStyle: CustomCellStyle) => {\n this.registerCustomCellStyle(cellStyle.id, cellStyle.style);\n });\n customCellStyleArrangement.forEach((cellStyle: CustomCellStyleArrangement) => {\n this.arrangeCustomCellStyle(cellStyle.cellPosition, cellStyle.customStyleId);\n });\n }\n\n hasCustomCellStyle(customStyleId: string) {\n return this.customCellStyle.some(style => style.id === customStyleId);\n }\n}\n\nexport function mergeStyle(cacheStyle: Style, customCellStyle: ColumnStyleOption): Style {\n cacheStyle = cacheStyle.clone();\n\n for (const key in customCellStyle) {\n const value = (customCellStyle as any)[key];\n if (value) {\n (cacheStyle as any)[`_${key}`] = value;\n }\n }\n\n return cacheStyle;\n}\n"]}
1
+ {"version":3,"sources":["../src/plugins/custom-cell-style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAWzC,MAAM,OAAO,qBAAqB;IAKhC,YACE,KAAmB,EACnB,eAAkC,EAClC,0BAAwD;QAExD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,0BAA0B,GAAG,0BAA0B,CAAC;IAC/D,CAAC;IAED,kBAAkB,CAAC,GAAW,EAAE,GAAW;QACzC,MAAM,cAAc,GAAG,IAAI,CAAC,qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QAC5D,IAAI,cAAc,CAAC,MAAM,EAAE;YACzB,MAAM,MAAM,GAAwB,EAAE,CAAC;YAEvC,cAAc,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE;gBACrC,MAAM,WAAW,GAAG,IAAI,CAAC,wBAAwB,CAAC,aAAa,CAAC,CAAC;gBACjE,IAAI,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,KAAK,EAAE;oBACtB,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;iBAChC;YACH,CAAC,CAAC,CAAC;YAEH,OAAO,KAAK,CAAC,EAAE,EAAE,GAAG,MAAM,CAAC,CAAC;SAG7B;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,qBAAqB,CAAC,GAAW,EAAE,GAAW;QAE5C,MAAM,cAAc,GAAa,EAAE,CAAC;QAEpC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QAChD,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,GA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AAC,GAAG,CAAC,CAAC;QAC5C,IAAI,KAAK,EAAE;YACR,UAAkB,CAAC,IAAI,GAAG,EAAE,CAAC,GAAG,KAAK,CAAC;SACxC;KACF;IAED,OAAO,UAAU,CAAC;AACpB,CAAC","file":"custom-cell-style.js","sourcesContent":["import { merge } from '@visactor/vutils';\nimport type { Style } from '../body-helper/style';\nimport type {\n CellRange,\n ColumnStyleOption,\n CustomCellStyle,\n CustomCellStyleArrangement,\n FullExtendStyle\n} from '../ts-types';\nimport type { BaseTableAPI } from '../ts-types/base-table';\n\nexport class CustomCellStylePlugin {\n table: BaseTableAPI;\n customCellStyle: CustomCellStyle[];\n customCellStyleArrangement: CustomCellStyleArrangement[];\n\n constructor(\n table: BaseTableAPI,\n customCellStyle: CustomCellStyle[],\n customCellStyleArrangement: CustomCellStyleArrangement[]\n ) {\n this.table = table;\n this.customCellStyle = customCellStyle;\n this.customCellStyleArrangement = customCellStyleArrangement;\n }\n\n getCustomCellStyle(col: number, row: number) {\n const customStyleIds = this.getCustomCellStyleIds(col, row);\n if (customStyleIds.length) {\n const styles: ColumnStyleOption[] = [];\n\n customStyleIds.forEach(customStyleId => {\n const styleOption = this.getCustomCellStyleOption(customStyleId);\n if (styleOption?.style) {\n styles.push(styleOption.style);\n }\n });\n\n return merge({}, ...styles);\n // const styleOption = this.getCustomCellStyleOption(customStyleId);\n // return styleOption?.style;\n }\n return undefined;\n }\n\n getCustomCellStyleIds(col: number, row: number) {\n // let customStyleId;\n const customStyleIds: string[] = [];\n\n const range = this.table.getCellRange(col, row);\n for (let c = range.start.col; c <= range.end.col; c++) {\n for (let r = range.start.row; r <= range.end.row; r++) {\n // eslint-disable-next-line no-loop-func\n this.customCellStyleArrangement.forEach(style => {\n if (style.cellPosition.range) {\n if (\n style.cellPosition.range.start.col <= c &&\n style.cellPosition.range.end.col >= c &&\n style.cellPosition.range.start.row <= r &&\n style.cellPosition.range.end.row >= r\n ) {\n // customStyleId = style.customStyleId;\n customStyleIds.push(style.customStyleId);\n }\n } else if (style.cellPosition.col === c && style.cellPosition.row === r) {\n // customStyleId = style.customStyleId;\n customStyleIds.push(style.customStyleId);\n }\n });\n }\n }\n\n return customStyleIds;\n }\n\n getCustomCellStyleOption(customStyleId: string) {\n return this.customCellStyle.find(style => style.id === customStyleId);\n }\n\n registerCustomCellStyle(customStyleId: string, customStyle: ColumnStyleOption | undefined | null) {\n const index = this.customCellStyle.findIndex(style => style.id === customStyleId);\n if (index === -1) {\n this.customCellStyle.push({\n id: customStyleId,\n style: customStyle\n });\n } else {\n this.customCellStyle[index] = {\n id: customStyleId,\n style: customStyle\n };\n }\n\n this.customCellStyleArrangement.forEach(cellStyle => {\n const cellPos = cellStyle.cellPosition;\n if (cellStyle.customStyleId === customStyleId) {\n if (cellPos.range) {\n for (\n let col = Math.max(0, cellPos.range.start.col);\n col <= Math.min(this.table.colCount - 1, cellPos.range.end.col);\n col++\n ) {\n for (\n let row = Math.max(0, cellPos.range.start.row);\n row <= Math.min(this.table.rowCount - 1, cellPos.range.end.row);\n row++\n ) {\n this.table.scenegraph.updateCellContent(col, row);\n }\n }\n } else {\n this.table.scenegraph.updateCellContent(cellPos.col, cellPos.row);\n }\n }\n });\n this.table.scenegraph.updateNextFrame();\n }\n\n arrangeCustomCellStyle(\n cellPos: {\n col?: number;\n row?: number;\n range?: CellRange;\n },\n customStyleId: string | undefined | null\n ) {\n const index = this.customCellStyleArrangement.findIndex(style => {\n if (style.cellPosition.range && cellPos.range) {\n return (\n style.cellPosition.range.start.col === cellPos.range.start.col &&\n style.cellPosition.range.start.row === cellPos.range.start.row &&\n style.cellPosition.range.end.col === cellPos.range.end.col &&\n style.cellPosition.range.end.row === cellPos.range.end.row\n );\n }\n return style.cellPosition.col === cellPos.col && style.cellPosition.row === cellPos.row;\n });\n\n if (index === -1 && !customStyleId) {\n // do nothing\n return;\n } else if (index === -1 && customStyleId) {\n // add new style\n this.customCellStyleArrangement.push({\n cellPosition: {\n col: cellPos.col,\n row: cellPos.row,\n range: cellPos.range\n },\n customStyleId: customStyleId\n });\n } else if (this.customCellStyleArrangement[index].customStyleId === customStyleId) {\n // same style\n return;\n } else if (customStyleId) {\n // update style\n this.customCellStyleArrangement[index].customStyleId = customStyleId;\n } else {\n // delete useless style\n this.customCellStyleArrangement.splice(index, 1);\n }\n\n // update cell group\n if (cellPos.range) {\n for (\n let col = Math.max(0, cellPos.range.start.col);\n col <= Math.min(this.table.colCount - 1, cellPos.range.end.col);\n col++\n ) {\n for (\n let row = Math.max(0, cellPos.range.start.row);\n row <= Math.min(this.table.rowCount - 1, cellPos.range.end.row);\n row++\n ) {\n const range = this.table.getCellRange(col, row);\n for (let c = range.start.col; c <= range.end.col; c++) {\n for (let r = range.start.row; r <= range.end.row; r++) {\n this.table.scenegraph.updateCellContent(c, r);\n }\n }\n // this.table.scenegraph.updateCellContent(col, row);\n }\n }\n } else {\n this.table.scenegraph.updateCellContent(cellPos.col, cellPos.row);\n }\n\n this.table.scenegraph.updateNextFrame();\n }\n\n updateCustomCell(customCellStyle: CustomCellStyle[], customCellStyleArrangement: CustomCellStyleArrangement[]) {\n this.customCellStyle.length = 0;\n this.customCellStyleArrangement.length = 0;\n customCellStyle.forEach((cellStyle: CustomCellStyle) => {\n this.registerCustomCellStyle(cellStyle.id, cellStyle.style);\n });\n customCellStyleArrangement.forEach((cellStyle: CustomCellStyleArrangement) => {\n this.arrangeCustomCellStyle(cellStyle.cellPosition, cellStyle.customStyleId);\n });\n }\n\n hasCustomCellStyle(customStyleId: string) {\n return this.customCellStyle.some(style => style.id === customStyleId);\n }\n}\n\nexport function mergeStyle(cacheStyle: Style, customCellStyle: ColumnStyleOption): Style {\n cacheStyle = cacheStyle.clone();\n\n for (const key in customCellStyle) {\n const value = (customCellStyle as any)[key];\n if (value) {\n (cacheStyle as any)[`_${key}`] = value;\n }\n }\n\n return cacheStyle;\n}\n"]}
@@ -9,13 +9,21 @@ import { getProp } from "../utils/get-prop";
9
9
  export function updateChartSizeForResizeColWidth(scenegraph, col) {
10
10
  const {table: table} = scenegraph, layout = table.internalProps.layoutMap, columnResizeType = -1 === col ? "all" : table.internalProps.columnResizeType;
11
11
  if ("column" === columnResizeType) {
12
- const columnGroup = scenegraph.getColGroup(col);
12
+ const columnGroup = scenegraph.getColGroup(col), columnHeaderGroup = scenegraph.getColGroup(col, !0), columnBottomGroup = scenegraph.getColGroupInBottom(col, !0);
13
13
  if (null == columnGroup || columnGroup.forEachChildren((cellNode => {
14
14
  updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
15
+ })), null == columnHeaderGroup || columnHeaderGroup.forEachChildren((cellNode => {
16
+ updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
17
+ })), null == columnBottomGroup || columnBottomGroup.forEachChildren((cellNode => {
18
+ updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
15
19
  })), "adaptive" === table.widthMode && col < table.colCount - 1) {
16
- const columnGroup = scenegraph.getColGroup(col + 1);
20
+ const columnGroup = scenegraph.getColGroup(col + 1), columnHeaderGroup = scenegraph.getColGroup(col + 1, !0), columnBottomGroup = scenegraph.getColGroupInBottom(col + 1, !0);
17
21
  null == columnGroup || columnGroup.forEachChildren((cellNode => {
18
22
  updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
23
+ })), null == columnHeaderGroup || columnHeaderGroup.forEachChildren((cellNode => {
24
+ updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
25
+ })), null == columnBottomGroup || columnBottomGroup.forEachChildren((cellNode => {
26
+ updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
19
27
  }));
20
28
  }
21
29
  } else {
@@ -28,7 +36,7 @@ export function updateChartSizeForResizeColWidth(scenegraph, col) {
28
36
  startCol = node.startInTotal + table.frozenColCount, endCol = node.startInTotal + table.frozenColCount + node.size - 1;
29
37
  }
30
38
  for (let c = startCol; c <= endCol; c++) {
31
- const columnGroup = scenegraph.getColGroup(c);
39
+ const columnGroup = scenegraph.getColGroup(c), columnHeaderGroup = scenegraph.getColGroup(c, !0), columnBottomGroup = scenegraph.getColGroupInBottom(c, !0);
32
40
  if (columnGroup) {
33
41
  if ("indicator" === columnResizeType) {
34
42
  const indicatorKey = layout.getIndicatorKey(c, table.columnHeaderLevelCount);
@@ -40,6 +48,10 @@ export function updateChartSizeForResizeColWidth(scenegraph, col) {
40
48
  }
41
49
  columnGroup.forEachChildren((cellNode => {
42
50
  updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
51
+ })), null == columnHeaderGroup || columnHeaderGroup.forEachChildren((cellNode => {
52
+ updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
53
+ })), null == columnBottomGroup || columnBottomGroup.forEachChildren((cellNode => {
54
+ updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
43
55
  }));
44
56
  }
45
57
  }
@@ -57,27 +69,39 @@ export function updateChartSizeForResizeRowHeight(scenegraph, row) {
57
69
  const layout = table.internalProps.layoutMap, headerPaths = layout.getCellHeaderPaths(table.rowHeaderLevelCount, row), node = layout.getHeadNodeByRowOrColDimensions(headerPaths.rowHeaderPaths.slice(0, headerPaths.rowHeaderPaths.length - 1));
58
70
  startRow = node.startInTotal + table.frozenRowCount, endRow = node.startInTotal + table.frozenRowCount + node.size - 1;
59
71
  }
60
- for (let col = scenegraph.proxy.colStart; col <= scenegraph.proxy.colEnd; col++) if ("row" === rowResizeType) {
61
- const cellNode = scenegraph.highPerformanceGetCell(col, row);
62
- if ("cell" !== cellNode.role) continue;
63
- if (updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row)),
64
- "adaptive" === table.heightMode && row < table.rowCount - 1) {
65
- const cellNode = scenegraph.highPerformanceGetCell(col, row + 1);
66
- updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
67
- }
68
- } else for (let r = startRow; r <= endRow; r++) {
69
- if ("indicator" === rowResizeType) {
70
- const indicatorKey = layout.getIndicatorKey(state.table.rowHeaderLevelCount, r);
71
- if (!layout.indicatorsAsCol && indicatorKey !== resizeIndicatorKey) continue;
72
- if (layout.indicatorsAsCol) {
73
- const headerPaths = layout.getCellHeaderPaths(state.table.rowHeaderLevelCount - 1, r), headerPath = null == headerPaths ? void 0 : headerPaths.rowHeaderPaths[headerPaths.rowHeaderPaths.length - 1];
74
- if (!headerPath || resizeDimensionKey !== headerPath.dimensionKey || resizeDimensionValue !== headerPath.value) continue;
72
+ const colsRange = [ {
73
+ startCol: scenegraph.proxy.colStart,
74
+ endCol: scenegraph.proxy.colEnd
75
+ } ];
76
+ table.frozenColCount && colsRange.push({
77
+ startCol: 0,
78
+ endCol: table.frozenColCount - 1
79
+ }), table.rightFrozenColCount && colsRange.push({
80
+ startCol: table.colCount - table.rightFrozenColCount,
81
+ endCol: table.colCount - 1
82
+ }), colsRange.forEach((({startCol: startCol, endCol: endCol}) => {
83
+ for (let col = startCol; col <= endCol; col++) if ("row" === rowResizeType) {
84
+ const cellNode = scenegraph.highPerformanceGetCell(col, row);
85
+ if ("cell" !== cellNode.role) continue;
86
+ if (updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row)),
87
+ "adaptive" === table.heightMode && row < table.rowCount - 1) {
88
+ const cellNode = scenegraph.highPerformanceGetCell(col, row + 1);
89
+ updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
90
+ }
91
+ } else for (let r = startRow; r <= endRow; r++) {
92
+ if ("indicator" === rowResizeType) {
93
+ const indicatorKey = layout.getIndicatorKey(state.table.rowHeaderLevelCount, r);
94
+ if (!layout.indicatorsAsCol && indicatorKey !== resizeIndicatorKey) continue;
95
+ if (layout.indicatorsAsCol) {
96
+ const headerPaths = layout.getCellHeaderPaths(state.table.rowHeaderLevelCount - 1, r), headerPath = null == headerPaths ? void 0 : headerPaths.rowHeaderPaths[headerPaths.rowHeaderPaths.length - 1];
97
+ if (!headerPath || resizeDimensionKey !== headerPath.dimensionKey || resizeDimensionValue !== headerPath.value) continue;
98
+ }
75
99
  }
100
+ const cellNode = scenegraph.highPerformanceGetCell(col, r);
101
+ if ("cell" !== cellNode.role) continue;
102
+ updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
76
103
  }
77
- const cellNode = scenegraph.highPerformanceGetCell(col, r);
78
- if ("cell" !== cellNode.role) continue;
79
- updateChartGraphicSize(cellNode, table.getColWidth(cellNode.col), table.getRowHeight(cellNode.row));
80
- }
104
+ }));
81
105
  }
82
106
 
83
107
  export function clearChartCacheImage(scenegraph) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/scenegraph/refresh-node/update-chart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAG3C,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAM7C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAG5C,MAAM,UAAU,gCAAgC,CAAC,UAAsB,EAAE,GAAW;IAClF,MAAM,EAAE,KAAK,EAAE,GAAG,UAAU,CAAC;IAC7B,MAAM,MAAM,GAAG,KAAK,CAAC,aAAa,CAAC,SAAiC,CAAC;IACrE,MAAM,gBAAgB,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC;IAEnF,IAAI,gBAAgB,KAAK,QAAQ,EAAE;QACjC,MAAM,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QAChD,WAAW,aAAX,WAAW,uBAAX,WA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;wBACnE,MAAM,IAAI,GAAG,IAAI,aAAa,CAC5B,UAAU,EACV,IAAI,CAAC,SAAS,CAAC,KAAK,EACpB,IAAI,CAAC,SAAS,CAAC,MAAM,EACrB,MAAA,UAAU,CAAC,eAAe,mCAAI,OAAO,EACrC,KAAK,CACN,CAAC;wBACF,IAAI,CAAC,KAAK,EAAE,CAAC;wBACb,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;wBACjC,IAAI,CAAC,OAAO,EAAE,CAAC;qBAChB;iBACF;YACH,CAAC,CAAC,CAAC;SACJ;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,sBAAsB,CAAC,QAAe,EAAE,KAAa,EAAE,MAAc;IAC5E,QAAQ,CAAC,eAAe,CAAC,CAAC,OAAc,EAAE,EAAE;QAC1C,IAAK,OAAe,CAAC,IAAI,KAAK,OAAO,EAAE;YACrC,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;YAC3B,OAAO,CAAC,aAAa,CAAC;gBACpB,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;gBAC7F,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;aAChG,CAAC,CAAC;SACJ;IACH,CAAC,CAAC,CAAC;AACL,CAAC","file":"update-chart.js","sourcesContent":["import { isEqual } from '@visactor/vutils';\nimport type { PivotChart } from '../../PivotChart';\nimport type { ICartesianAxis } from '../../components/axis/axis';\nimport { Factory } from '../../core/factory';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport type { Chart } from '../graphic/chart';\nimport type { Group } from '../graphic/group';\nimport type { Scenegraph } from '../scenegraph';\nimport type { PivotHeaderLayoutMap } from '../../layout/pivot-header-layout';\nimport { getQuadProps } from '../utils/padding';\nimport { getProp } from '../utils/get-prop';\n\n/** 供调整列宽后更新chart使用 */\nexport function updateChartSizeForResizeColWidth(scenegraph: Scenegraph, col: number) {\n const { table } = scenegraph;\n const layout = table.internalProps.layoutMap as PivotHeaderLayoutMap;\n const columnResizeType = col === -1 ? 'all' : table.internalProps.columnResizeType;\n\n if (columnResizeType === 'column') {\n const columnGroup = scenegraph.getColGroup(col);\n columnGroup?.forEachChildren((cellNode: Group) => {\n const width = table.getColWidth(cellNode.col);\n const height = table.getRowHeight(cellNode.row);\n updateChartGraphicSize(cellNode, width, height);\n });\n if (table.widthMode === 'adaptive' && col < table.colCount - 1) {\n const columnGroup = scenegraph.getColGroup(col + 1);\n columnGroup?.forEachChildren((cellNode: Group) => {\n const width = table.getColWidth(cellNode.col);\n const height = table.getRowHeight(cellNode.row);\n updateChartGraphicSize(cellNode, width, height);\n });\n }\n } else {\n let startCol = table.rowHeaderLevelCount;\n let endCol = table.colCount - 1;\n let resizeIndicatorKey;\n let resizeDimensionKey;\n let resizeDimensionValue;\n if (columnResizeType === 'indicator') {\n if (layout.indicatorsAsCol) {\n resizeIndicatorKey = layout.getIndicatorKey(col, table.columnHeaderLevelCount);\n } else {\n const headerPaths = layout.getCellHeaderPaths(col, table.columnHeaderLevelCount - 1);\n const headerPath = headerPaths.colHeaderPaths[headerPaths.colHeaderPaths.length - 1];\n resizeDimensionKey = headerPath.dimensionKey;\n resizeDimensionValue = headerPath.value;\n }\n } else if (columnResizeType === 'indicatorGroup') {\n const layout = table.internalProps.layoutMap as PivotHeaderLayoutMap;\n //通过getCellHeaderPaths接口获取列表头最后一层指标维度的path\n const headerPaths = layout.getCellHeaderPaths(table.stateManager.columnResize.col, table.columnHeaderLevelCount);\n const node = layout.getHeadNodeByRowOrColDimensions(\n headerPaths.colHeaderPaths.slice(0, headerPaths.colHeaderPaths.length - 1)\n ) as any;\n // 计算宽度受影响列的起止\n startCol = node.startInTotal + table.frozenColCount;\n endCol = node.startInTotal + table.frozenColCount + node.size - 1;\n }\n\n for (let c = startCol; c <= endCol; c++) {\n const columnGroup = scenegraph.getColGroup(c);\n if (columnGroup) {\n if (columnResizeType === 'indicator') {\n const indicatorKey = layout.getIndicatorKey(c, table.columnHeaderLevelCount);\n if (layout.indicatorsAsCol && indicatorKey !== resizeIndicatorKey) {\n continue;\n } else if (!layout.indicatorsAsCol) {\n const headerPaths = layout.getCellHeaderPaths(c, table.columnHeaderLevelCount - 1);\n const headerPath = headerPaths?.colHeaderPaths[headerPaths.colHeaderPaths.length - 1];\n if (\n !headerPath ||\n resizeDimensionKey !== headerPath.dimensionKey ||\n resizeDimensionValue !== headerPath.value\n ) {\n continue;\n }\n }\n }\n columnGroup.forEachChildren((cellNode: Group) => {\n const width = table.getColWidth(cellNode.col);\n const height = table.getRowHeight(cellNode.row);\n updateChartGraphicSize(cellNode, width, height);\n });\n }\n }\n }\n\n // // 将调整列宽的后面的面也都一起需要调整viewbox。 TODO:columnResizeType支持后需要根据变化的列去调整,范围可能变多或者变少\n // for (let c = col; c <= scenegraph.proxy.colEnd; c++) {\n // const columnGroup = scenegraph.getColGroup(c);\n // // const chartInstance = (columnGroup.attribute as any)?.chartInstance;\n // // if (chartInstance) {\n // columnGroup?.getChildren()?.forEach((cellNode: Group) => {\n // const width = scenegraph.table.getColWidth(cellNode.col);\n // const height = scenegraph.table.getRowHeight(cellNode.row);\n\n // cellNode.children.forEach((node: Chart) => {\n // if ((node as any).type === 'chart') {\n // node.cacheCanvas = null;\n // node.setAttribute('width', Math.ceil(width - node.attribute.cellPadding[3] - node.attribute.cellPadding[1]));\n // node.setAttribute(\n // 'height',\n // Math.ceil(height - node.attribute.cellPadding[0] - node.attribute.cellPadding[2])\n // );\n // }\n // });\n // });\n // // }\n // }\n // // 右侧冻结的单元格也需要调整\n // if (!scenegraph.table.isPivotChart() && scenegraph.table.rightFrozenColCount >= 1) {\n // for (\n // let c = scenegraph.table.colCount - scenegraph.table.rightFrozenColCount;\n // c <= scenegraph.table.colCount - 1;\n // c++\n // ) {\n // const columnGroup = scenegraph.getColGroup(c);\n // columnGroup?.getChildren()?.forEach((cellNode: Group) => {\n // const width = scenegraph.table.getColWidth(cellNode.col);\n // const height = scenegraph.table.getRowHeight(cellNode.row);\n\n // cellNode.children.forEach((node: Chart) => {\n // if ((node as any).type === 'chart') {\n // node.cacheCanvas = null;\n // node.setAttribute(\n // 'width',\n // Math.ceil(width - node.attribute.cellPadding[3] - node.attribute.cellPadding[1])\n // );\n // node.setAttribute(\n // 'height',\n // Math.ceil(height - node.attribute.cellPadding[0] - node.attribute.cellPadding[2])\n // );\n // }\n // });\n // });\n // }\n // }\n}\n/** 供调整列宽后更新chart使用 */\nexport function updateChartSizeForResizeRowHeight(scenegraph: Scenegraph, row: number) {\n const { table } = scenegraph;\n const layout = table.internalProps.layoutMap as PivotHeaderLayoutMap;\n const state = table.stateManager;\n const rowResizeType = row === -1 ? 'all' : table.internalProps.rowResizeType;\n\n let startRow = table.columnHeaderLevelCount;\n let endRow = table.rowCount - 1;\n let resizeIndicatorKey;\n let resizeDimensionKey;\n let resizeDimensionValue;\n if (rowResizeType === 'indicator') {\n if (!layout.indicatorsAsCol) {\n resizeIndicatorKey = layout.getIndicatorKey(table.rowHeaderLevelCount, row);\n } else {\n const headerPaths = layout.getCellHeaderPaths(table.rowHeaderLevelCount - 1, row);\n const headerPath = headerPaths.rowHeaderPaths?.[headerPaths.rowHeaderPaths.length - 1];\n resizeDimensionKey = headerPath?.dimensionKey;\n resizeDimensionValue = headerPath?.value;\n }\n } else if (rowResizeType === 'indicatorGroup') {\n const layout = table.internalProps.layoutMap as PivotHeaderLayoutMap;\n //通过getCellHeaderPaths接口获取列表头最后一层指标维度的path\n const headerPaths = layout.getCellHeaderPaths(table.rowHeaderLevelCount, row);\n const node = layout.getHeadNodeByRowOrColDimensions(\n headerPaths.rowHeaderPaths.slice(0, headerPaths.rowHeaderPaths.length - 1)\n ) as any;\n // 计算宽度受影响列的起止\n startRow = node.startInTotal + table.frozenRowCount;\n endRow = node.startInTotal + table.frozenRowCount + node.size - 1;\n }\n\n for (let col = scenegraph.proxy.colStart; col <= scenegraph.proxy.colEnd; col++) {\n if (rowResizeType === 'row') {\n const cellNode = scenegraph.highPerformanceGetCell(col, row);\n if (cellNode.role !== 'cell') {\n continue;\n }\n const width = table.getColWidth(cellNode.col);\n const height = table.getRowHeight(cellNode.row);\n updateChartGraphicSize(cellNode, width, height);\n\n if (table.heightMode === 'adaptive' && row < table.rowCount - 1) {\n const cellNode = scenegraph.highPerformanceGetCell(col, row + 1);\n const width = table.getColWidth(cellNode.col);\n const height = table.getRowHeight(cellNode.row);\n updateChartGraphicSize(cellNode, width, height);\n }\n } else {\n for (let r = startRow; r <= endRow; r++) {\n if (rowResizeType === 'indicator') {\n const indicatorKey = layout.getIndicatorKey(state.table.rowHeaderLevelCount, r);\n if (!layout.indicatorsAsCol && indicatorKey !== resizeIndicatorKey) {\n continue;\n } else if (layout.indicatorsAsCol) {\n const headerPaths = layout.getCellHeaderPaths(state.table.rowHeaderLevelCount - 1, r);\n const headerPath = headerPaths?.rowHeaderPaths[headerPaths.rowHeaderPaths.length - 1];\n if (\n !headerPath ||\n resizeDimensionKey !== headerPath.dimensionKey ||\n resizeDimensionValue !== headerPath.value\n ) {\n continue;\n }\n }\n }\n const cellNode = scenegraph.highPerformanceGetCell(col, r);\n if (cellNode.role !== 'cell') {\n continue;\n }\n const width = table.getColWidth(cellNode.col);\n const height = table.getRowHeight(cellNode.row);\n updateChartGraphicSize(cellNode, width, height);\n }\n }\n }\n\n // const updateCellNode = (c: number, r: number) => {\n // const cellNode = scenegraph.getCell(c, r);\n // const width = scenegraph.table.getColWidth(cellNode.col);\n // const height = scenegraph.table.getRowHeight(cellNode.row);\n // cellNode.children.forEach((node: Chart) => {\n // if ((node as any).type === 'chart') {\n // node.cacheCanvas = null;\n // console.log('bf', c, r, node.attribute.width, node.attribute.height);\n\n // node.setAttribute('width', Math.ceil(width - node.attribute.cellPadding[3] - node.attribute.cellPadding[1]));\n // node.setAttribute('height', Math.ceil(height - node.attribute.cellPadding[0] - node.attribute.cellPadding[2]));\n // console.log('af', c, r, node.attribute.width, node.attribute.height);\n // }\n // });\n // };\n // // 将调整列宽的后面的面也都一起需要调整viewbox。 TODO:columnResizeType支持后需要根据变化的列去调整,范围可能变多或者变少\n // for (let c = scenegraph.proxy.colStart; c <= scenegraph.proxy.colEnd; c++) {\n // for (let r = row; r <= scenegraph.proxy.rowEnd; r++) {\n // updateCellNode(c, r);\n // }\n // }\n\n // // 右侧冻结的单元格也需要调整\n // if (scenegraph.table.rightFrozenColCount >= 1) {\n // for (\n // let c = scenegraph.table.colCount - scenegraph.table.rightFrozenColCount;\n // c <= scenegraph.table.colCount - 1;\n // c++\n // ) {\n // for (let r = row; r <= scenegraph.proxy.rowEnd; r++) {\n // updateCellNode(c, r);\n // }\n // }\n // }\n // // 左侧冻结的单元格\n // if (scenegraph.table.frozenColCount >= 1) {\n // for (let c = 0; c <= scenegraph.table.frozenColCount - 1; c++) {\n // for (let r = row; r <= scenegraph.proxy.rowEnd; r++) {\n // updateCellNode(c, r);\n // }\n // }\n // }\n}\n/** 清理所有chart节点的 图表缓存图片 */\nexport function clearChartCacheImage(scenegraph: Scenegraph) {\n // 将调整列宽的后面的面也都一起需要调整viewbox。 TODO:columnResizeType支持后需要根据变化的列去调整,范围可能变多或者变少\n for (let c = scenegraph.proxy.colStart; c <= scenegraph.proxy.colEnd; c++) {\n const columnGroup = scenegraph.getColGroup(c);\n columnGroup?.getChildren()?.forEach((cellNode: Group) => {\n cellNode.children.forEach((node: Chart) => {\n if ((node as any).type === 'chart') {\n node.cacheCanvas = null;\n node.addUpdateBoundTag();\n }\n });\n });\n }\n}\n\nexport function clearCellChartCacheImage(col: number, row: number, scenegraph: Scenegraph) {\n // 将调整列宽的后面的面也都一起需要调整viewbox。 TODO:columnResizeType支持后需要根据变化的列去调整,范围可能变多或者变少\n const cellGroup = scenegraph.getCell(col, row);\n cellGroup.children.forEach((node: Chart) => {\n if ((node as any).type === 'chart') {\n node.cacheCanvas = null;\n node.addUpdateBoundTag();\n }\n });\n}\n\n/** 更新所有的图表chart节点上缓存attribute中的data数据 */\nexport function updateChartData(scenegraph: Scenegraph) {\n const table = scenegraph.table;\n // 将调整列宽的后面的面也都一起需要调整viewbox。 TODO:columnResizeType支持后需要根据变化的列去调整,范围可能变多或者变少\n for (let c = scenegraph.proxy.colStart; c <= scenegraph.proxy.colEnd; c++) {\n const columnGroup = scenegraph.getColGroup(c);\n columnGroup?.getChildren()?.forEach((cellNode: Group) => {\n const col = cellNode.col;\n const row = cellNode.row;\n cellNode.children.forEach((node: Chart) => {\n if ((node as any).type === 'chart') {\n node.updateData(table.getCellValue(col, row));\n const chartSpec = node.attribute.spec;\n const chartType = chartSpec.type;\n if (chartType !== 'gauge' && chartType !== 'rose' && chartType !== 'radar') {\n const newAxes = table.internalProps.layoutMap.getChartAxes(col, row);\n node.setAttribute('axes', newAxes);\n chartSpec.axes = newAxes;\n }\n node.setAttribute('spec', chartSpec);\n // node.addUpdateBoundTag();\n }\n });\n });\n }\n\n // update left axes\n updateTableAxes(scenegraph.rowHeaderGroup, scenegraph.table);\n // update top axes\n updateTableAxes(scenegraph.colHeaderGroup, scenegraph.table);\n // update right axes\n updateTableAxes(scenegraph.rightFrozenGroup, scenegraph.table);\n // update bottom axes\n updateTableAxes(scenegraph.bottomFrozenGroup, scenegraph.table);\n}\n/** 组织图表数据状态_selectedDataItemsInChart 更新选中的图表图元状态 */\nexport function updateChartState(scenegraph: Scenegraph, datum: any) {\n const table = scenegraph.table;\n if (table.isPivotChart()) {\n const preSelectItemsCount = (table as PivotChart)._selectedDataItemsInChart.length;\n if ((datum === null || datum?.length === 0 || Object.keys(datum).length === 0) && preSelectItemsCount === 0) {\n //避免无效的更新\n return;\n }\n // (table as PivotChart)._selectedDataItemsInChart = [];\n const newSelectedDataItemsInChart = [];\n if (Array.isArray(datum)) {\n datum.forEach((dataItem: any) => {\n if (dataItem && dataItem.key !== 0 && Object.keys(dataItem).length > 0) {\n //本以为没有点击到图元上 datum为空 发现是{key:0}或者{}\n const selectedState = {} as any;\n for (const itemKey in dataItem) {\n if (!itemKey.startsWith('VGRAMMAR_') && !itemKey.startsWith('__VCHART')) {\n selectedState[itemKey] = dataItem[itemKey];\n }\n }\n newSelectedDataItemsInChart.push(selectedState);\n }\n });\n } else if (datum && datum.key !== 0 && Object.keys(datum).length > 0) {\n //本以为没有点击到图元上 datum为空 发现是{key:0}或者{}\n const selectedState = {} as any;\n for (const itemKey in datum) {\n if (!itemKey.startsWith('VGRAMMAR_') && !itemKey.startsWith('__VCHART')) {\n selectedState[itemKey] = datum[itemKey];\n }\n }\n newSelectedDataItemsInChart.push(selectedState);\n }\n //避免无效的更新\n if (!isEqual((table as PivotChart)._selectedDataItemsInChart, newSelectedDataItemsInChart)) {\n (table as PivotChart)._selectedDataItemsInChart = newSelectedDataItemsInChart;\n (table.internalProps.layoutMap as PivotHeaderLayoutMap).updateDataStateToChartInstance();\n // 清楚chart缓存图片\n clearChartCacheImage(scenegraph);\n table.scenegraph.updateNextFrame();\n }\n }\n}\n\n/**\n * @description: update table axis component\n * @param {Group} containerGroup\n * @param {BaseTableAPI} table\n * @return {*}\n */\nfunction updateTableAxes(containerGroup: Group, table: BaseTableAPI) {\n containerGroup.forEachChildren((column: Group) => {\n if (column.role === 'column') {\n column.forEachChildren((cell: Group) => {\n if (cell.role === 'cell') {\n let isAxisComponent = false;\n cell.forEachChildren((mark: Group) => {\n if (mark.name === 'axis') {\n isAxisComponent = true;\n return true;\n }\n return false;\n });\n if (isAxisComponent) {\n const axisConfig = table.internalProps.layoutMap.getAxisConfigInPivotChart(cell.col, cell.row);\n const cellStyle = table._getCellStyle(cell.col, cell.row);\n const padding = getQuadProps(getProp('padding', cellStyle, cell.col, cell.row, table));\n const CartesianAxis: ICartesianAxis = Factory.getComponent('axis');\n const axis = new CartesianAxis(\n axisConfig,\n cell.attribute.width,\n cell.attribute.height,\n axisConfig.__vtablePadding ?? padding,\n table\n );\n cell.clear();\n cell.appendChild(axis.component);\n axis.overlap();\n }\n }\n });\n }\n });\n}\n\nfunction updateChartGraphicSize(cellNode: Group, width: number, height: number) {\n cellNode.forEachChildren((graphic: Chart) => {\n if ((graphic as any).type === 'chart') {\n graphic.cacheCanvas = null;\n graphic.setAttributes({\n width: Math.ceil(width - graphic.attribute.cellPadding[3] - graphic.attribute.cellPadding[1]),\n height: Math.ceil(height - graphic.attribute.cellPadding[0] - graphic.attribute.cellPadding[2])\n });\n }\n });\n}\n"]}
1
+ {"version":3,"sources":["../src/scenegraph/refresh-node/update-chart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAG3C,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAM7C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAG5C,MAAM,UAAU,gCAAgC,CAAC,UAAsB,EAAE,GAAW;IAClF,MAAM,EAAE,KAAK,EAAE,GAAG,UAAU,CAAC;IAC7B,MAAM,MAAM,GAAG,KAAK,CAAC,aAAa,CAAC,SAAiC,CAAC;IACrE,MAAM,gBAAgB,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC;IACnF,IAAI,gBAAgB,KAAK,QAAQ,EAAE;QACjC,MAAM,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QAChD,MAAM,iBAAiB,GAAG,UAAU,CAAC,WAAW,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAC5D,MAAM,iBAAiB,GAAG,UAAU,CAAC,mBAAmB,CAAC,GAAG,EAA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,CAAC,KAAK,GAAG,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;gBAC7F,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;aAChG,CAAC,CAAC;SACJ;IACH,CAAC,CAAC,CAAC;AACL,CAAC","file":"update-chart.js","sourcesContent":["import { isEqual } from '@visactor/vutils';\nimport type { PivotChart } from '../../PivotChart';\nimport type { ICartesianAxis } from '../../components/axis/axis';\nimport { Factory } from '../../core/factory';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport type { Chart } from '../graphic/chart';\nimport type { Group } from '../graphic/group';\nimport type { Scenegraph } from '../scenegraph';\nimport type { PivotHeaderLayoutMap } from '../../layout/pivot-header-layout';\nimport { getQuadProps } from '../utils/padding';\nimport { getProp } from '../utils/get-prop';\n\n/** 供调整列宽后更新chart使用 */\nexport function updateChartSizeForResizeColWidth(scenegraph: Scenegraph, col: number) {\n const { table } = scenegraph;\n const layout = table.internalProps.layoutMap as PivotHeaderLayoutMap;\n const columnResizeType = col === -1 ? 'all' : table.internalProps.columnResizeType;\n if (columnResizeType === 'column') {\n const columnGroup = scenegraph.getColGroup(col);\n const columnHeaderGroup = scenegraph.getColGroup(col, true);\n const columnBottomGroup = scenegraph.getColGroupInBottom(col, true);\n columnGroup?.forEachChildren((cellNode: Group) => {\n const width = table.getColWidth(cellNode.col);\n const height = table.getRowHeight(cellNode.row);\n updateChartGraphicSize(cellNode, width, height);\n });\n columnHeaderGroup?.forEachChildren((cellNode: Group) => {\n const width = table.getColWidth(cellNode.col);\n const height = table.getRowHeight(cellNode.row);\n updateChartGraphicSize(cellNode, width, height);\n });\n columnBottomGroup?.forEachChildren((cellNode: Group) => {\n const width = table.getColWidth(cellNode.col);\n const height = table.getRowHeight(cellNode.row);\n updateChartGraphicSize(cellNode, width, height);\n });\n if (table.widthMode === 'adaptive' && col < table.colCount - 1) {\n const columnGroup = scenegraph.getColGroup(col + 1);\n const columnHeaderGroup = scenegraph.getColGroup(col + 1, true);\n const columnBottomGroup = scenegraph.getColGroupInBottom(col + 1, true);\n columnGroup?.forEachChildren((cellNode: Group) => {\n const width = table.getColWidth(cellNode.col);\n const height = table.getRowHeight(cellNode.row);\n updateChartGraphicSize(cellNode, width, height);\n });\n columnHeaderGroup?.forEachChildren((cellNode: Group) => {\n const width = table.getColWidth(cellNode.col);\n const height = table.getRowHeight(cellNode.row);\n updateChartGraphicSize(cellNode, width, height);\n });\n columnBottomGroup?.forEachChildren((cellNode: Group) => {\n const width = table.getColWidth(cellNode.col);\n const height = table.getRowHeight(cellNode.row);\n updateChartGraphicSize(cellNode, width, height);\n });\n }\n } else {\n let startCol = table.rowHeaderLevelCount;\n let endCol = table.colCount - 1;\n let resizeIndicatorKey;\n let resizeDimensionKey;\n let resizeDimensionValue;\n if (columnResizeType === 'indicator') {\n if (layout.indicatorsAsCol) {\n resizeIndicatorKey = layout.getIndicatorKey(col, table.columnHeaderLevelCount);\n } else {\n const headerPaths = layout.getCellHeaderPaths(col, table.columnHeaderLevelCount - 1);\n const headerPath = headerPaths.colHeaderPaths[headerPaths.colHeaderPaths.length - 1];\n resizeDimensionKey = headerPath.dimensionKey;\n resizeDimensionValue = headerPath.value;\n }\n } else if (columnResizeType === 'indicatorGroup') {\n const layout = table.internalProps.layoutMap as PivotHeaderLayoutMap;\n //通过getCellHeaderPaths接口获取列表头最后一层指标维度的path\n const headerPaths = layout.getCellHeaderPaths(table.stateManager.columnResize.col, table.columnHeaderLevelCount);\n const node = layout.getHeadNodeByRowOrColDimensions(\n headerPaths.colHeaderPaths.slice(0, headerPaths.colHeaderPaths.length - 1)\n ) as any;\n // 计算宽度受影响列的起止\n startCol = node.startInTotal + table.frozenColCount;\n endCol = node.startInTotal + table.frozenColCount + node.size - 1;\n }\n\n for (let c = startCol; c <= endCol; c++) {\n const columnGroup = scenegraph.getColGroup(c);\n const columnHeaderGroup = scenegraph.getColGroup(c, true);\n const columnBottomGroup = scenegraph.getColGroupInBottom(c, true);\n if (columnGroup) {\n if (columnResizeType === 'indicator') {\n const indicatorKey = layout.getIndicatorKey(c, table.columnHeaderLevelCount);\n if (layout.indicatorsAsCol && indicatorKey !== resizeIndicatorKey) {\n continue;\n } else if (!layout.indicatorsAsCol) {\n const headerPaths = layout.getCellHeaderPaths(c, table.columnHeaderLevelCount - 1);\n const headerPath = headerPaths?.colHeaderPaths[headerPaths.colHeaderPaths.length - 1];\n if (\n !headerPath ||\n resizeDimensionKey !== headerPath.dimensionKey ||\n resizeDimensionValue !== headerPath.value\n ) {\n continue;\n }\n }\n }\n columnGroup.forEachChildren((cellNode: Group) => {\n const width = table.getColWidth(cellNode.col);\n const height = table.getRowHeight(cellNode.row);\n updateChartGraphicSize(cellNode, width, height);\n });\n columnHeaderGroup?.forEachChildren((cellNode: Group) => {\n const width = table.getColWidth(cellNode.col);\n const height = table.getRowHeight(cellNode.row);\n updateChartGraphicSize(cellNode, width, height);\n });\n columnBottomGroup?.forEachChildren((cellNode: Group) => {\n const width = table.getColWidth(cellNode.col);\n const height = table.getRowHeight(cellNode.row);\n updateChartGraphicSize(cellNode, width, height);\n });\n }\n }\n }\n\n // // 将调整列宽的后面的面也都一起需要调整viewbox。 TODO:columnResizeType支持后需要根据变化的列去调整,范围可能变多或者变少\n // for (let c = col; c <= scenegraph.proxy.colEnd; c++) {\n // const columnGroup = scenegraph.getColGroup(c);\n // // const chartInstance = (columnGroup.attribute as any)?.chartInstance;\n // // if (chartInstance) {\n // columnGroup?.getChildren()?.forEach((cellNode: Group) => {\n // const width = scenegraph.table.getColWidth(cellNode.col);\n // const height = scenegraph.table.getRowHeight(cellNode.row);\n\n // cellNode.children.forEach((node: Chart) => {\n // if ((node as any).type === 'chart') {\n // node.cacheCanvas = null;\n // node.setAttribute('width', Math.ceil(width - node.attribute.cellPadding[3] - node.attribute.cellPadding[1]));\n // node.setAttribute(\n // 'height',\n // Math.ceil(height - node.attribute.cellPadding[0] - node.attribute.cellPadding[2])\n // );\n // }\n // });\n // });\n // // }\n // }\n // // 右侧冻结的单元格也需要调整\n // if (!scenegraph.table.isPivotChart() && scenegraph.table.rightFrozenColCount >= 1) {\n // for (\n // let c = scenegraph.table.colCount - scenegraph.table.rightFrozenColCount;\n // c <= scenegraph.table.colCount - 1;\n // c++\n // ) {\n // const columnGroup = scenegraph.getColGroup(c);\n // columnGroup?.getChildren()?.forEach((cellNode: Group) => {\n // const width = scenegraph.table.getColWidth(cellNode.col);\n // const height = scenegraph.table.getRowHeight(cellNode.row);\n\n // cellNode.children.forEach((node: Chart) => {\n // if ((node as any).type === 'chart') {\n // node.cacheCanvas = null;\n // node.setAttribute(\n // 'width',\n // Math.ceil(width - node.attribute.cellPadding[3] - node.attribute.cellPadding[1])\n // );\n // node.setAttribute(\n // 'height',\n // Math.ceil(height - node.attribute.cellPadding[0] - node.attribute.cellPadding[2])\n // );\n // }\n // });\n // });\n // }\n // }\n}\n/** 供调整列宽后更新chart使用 */\nexport function updateChartSizeForResizeRowHeight(scenegraph: Scenegraph, row: number) {\n const { table } = scenegraph;\n const layout = table.internalProps.layoutMap as PivotHeaderLayoutMap;\n const state = table.stateManager;\n const rowResizeType = row === -1 ? 'all' : table.internalProps.rowResizeType;\n\n let startRow = table.columnHeaderLevelCount;\n let endRow = table.rowCount - 1;\n let resizeIndicatorKey: string;\n let resizeDimensionKey: string;\n let resizeDimensionValue: string;\n if (rowResizeType === 'indicator') {\n if (!layout.indicatorsAsCol) {\n resizeIndicatorKey = layout.getIndicatorKey(table.rowHeaderLevelCount, row);\n } else {\n const headerPaths = layout.getCellHeaderPaths(table.rowHeaderLevelCount - 1, row);\n const headerPath = headerPaths.rowHeaderPaths?.[headerPaths.rowHeaderPaths.length - 1];\n resizeDimensionKey = headerPath?.dimensionKey;\n resizeDimensionValue = headerPath?.value;\n }\n } else if (rowResizeType === 'indicatorGroup') {\n const layout = table.internalProps.layoutMap as PivotHeaderLayoutMap;\n //通过getCellHeaderPaths接口获取列表头最后一层指标维度的path\n const headerPaths = layout.getCellHeaderPaths(table.rowHeaderLevelCount, row);\n const node = layout.getHeadNodeByRowOrColDimensions(\n headerPaths.rowHeaderPaths.slice(0, headerPaths.rowHeaderPaths.length - 1)\n ) as any;\n // 计算宽度受影响列的起止\n startRow = node.startInTotal + table.frozenRowCount;\n endRow = node.startInTotal + table.frozenRowCount + node.size - 1;\n }\n\n const colsRange = [{ startCol: scenegraph.proxy.colStart, endCol: scenegraph.proxy.colEnd }];\n if (table.frozenColCount) {\n colsRange.push({ startCol: 0, endCol: table.frozenColCount - 1 });\n }\n if (table.rightFrozenColCount) {\n colsRange.push({ startCol: table.colCount - table.rightFrozenColCount, endCol: table.colCount - 1 });\n }\n colsRange.forEach(({ startCol, endCol }) => {\n for (let col = startCol; col <= endCol; col++) {\n if (rowResizeType === 'row') {\n const cellNode = scenegraph.highPerformanceGetCell(col, row);\n if (cellNode.role !== 'cell') {\n continue;\n }\n const width = table.getColWidth(cellNode.col);\n const height = table.getRowHeight(cellNode.row);\n updateChartGraphicSize(cellNode, width, height);\n\n if (table.heightMode === 'adaptive' && row < table.rowCount - 1) {\n const cellNode = scenegraph.highPerformanceGetCell(col, row + 1);\n const width = table.getColWidth(cellNode.col);\n const height = table.getRowHeight(cellNode.row);\n updateChartGraphicSize(cellNode, width, height);\n }\n } else {\n for (let r = startRow; r <= endRow; r++) {\n if (rowResizeType === 'indicator') {\n const indicatorKey = layout.getIndicatorKey(state.table.rowHeaderLevelCount, r);\n if (!layout.indicatorsAsCol && indicatorKey !== resizeIndicatorKey) {\n continue;\n } else if (layout.indicatorsAsCol) {\n const headerPaths = layout.getCellHeaderPaths(state.table.rowHeaderLevelCount - 1, r);\n const headerPath = headerPaths?.rowHeaderPaths[headerPaths.rowHeaderPaths.length - 1];\n if (\n !headerPath ||\n resizeDimensionKey !== headerPath.dimensionKey ||\n resizeDimensionValue !== headerPath.value\n ) {\n continue;\n }\n }\n }\n const cellNode = scenegraph.highPerformanceGetCell(col, r);\n if (cellNode.role !== 'cell') {\n continue;\n }\n const width = table.getColWidth(cellNode.col);\n const height = table.getRowHeight(cellNode.row);\n updateChartGraphicSize(cellNode, width, height);\n }\n }\n }\n });\n\n // const updateCellNode = (c: number, r: number) => {\n // const cellNode = scenegraph.getCell(c, r);\n // const width = scenegraph.table.getColWidth(cellNode.col);\n // const height = scenegraph.table.getRowHeight(cellNode.row);\n // cellNode.children.forEach((node: Chart) => {\n // if ((node as any).type === 'chart') {\n // node.cacheCanvas = null;\n // console.log('bf', c, r, node.attribute.width, node.attribute.height);\n\n // node.setAttribute('width', Math.ceil(width - node.attribute.cellPadding[3] - node.attribute.cellPadding[1]));\n // node.setAttribute('height', Math.ceil(height - node.attribute.cellPadding[0] - node.attribute.cellPadding[2]));\n // console.log('af', c, r, node.attribute.width, node.attribute.height);\n // }\n // });\n // };\n // // 将调整列宽的后面的面也都一起需要调整viewbox。 TODO:columnResizeType支持后需要根据变化的列去调整,范围可能变多或者变少\n // for (let c = scenegraph.proxy.colStart; c <= scenegraph.proxy.colEnd; c++) {\n // for (let r = row; r <= scenegraph.proxy.rowEnd; r++) {\n // updateCellNode(c, r);\n // }\n // }\n\n // // 右侧冻结的单元格也需要调整\n // if (scenegraph.table.rightFrozenColCount >= 1) {\n // for (\n // let c = scenegraph.table.colCount - scenegraph.table.rightFrozenColCount;\n // c <= scenegraph.table.colCount - 1;\n // c++\n // ) {\n // for (let r = row; r <= scenegraph.proxy.rowEnd; r++) {\n // updateCellNode(c, r);\n // }\n // }\n // }\n // // 左侧冻结的单元格\n // if (scenegraph.table.frozenColCount >= 1) {\n // for (let c = 0; c <= scenegraph.table.frozenColCount - 1; c++) {\n // for (let r = row; r <= scenegraph.proxy.rowEnd; r++) {\n // updateCellNode(c, r);\n // }\n // }\n // }\n}\n/** 清理所有chart节点的 图表缓存图片 */\nexport function clearChartCacheImage(scenegraph: Scenegraph) {\n // 将调整列宽的后面的面也都一起需要调整viewbox。 TODO:columnResizeType支持后需要根据变化的列去调整,范围可能变多或者变少\n for (let c = scenegraph.proxy.colStart; c <= scenegraph.proxy.colEnd; c++) {\n const columnGroup = scenegraph.getColGroup(c);\n columnGroup?.getChildren()?.forEach((cellNode: Group) => {\n cellNode.children.forEach((node: Chart) => {\n if ((node as any).type === 'chart') {\n node.cacheCanvas = null;\n node.addUpdateBoundTag();\n }\n });\n });\n }\n}\n\nexport function clearCellChartCacheImage(col: number, row: number, scenegraph: Scenegraph) {\n // 将调整列宽的后面的面也都一起需要调整viewbox。 TODO:columnResizeType支持后需要根据变化的列去调整,范围可能变多或者变少\n const cellGroup = scenegraph.getCell(col, row);\n cellGroup.children.forEach((node: Chart) => {\n if ((node as any).type === 'chart') {\n node.cacheCanvas = null;\n node.addUpdateBoundTag();\n }\n });\n}\n\n/** 更新所有的图表chart节点上缓存attribute中的data数据 */\nexport function updateChartData(scenegraph: Scenegraph) {\n const table = scenegraph.table;\n // 将调整列宽的后面的面也都一起需要调整viewbox。 TODO:columnResizeType支持后需要根据变化的列去调整,范围可能变多或者变少\n for (let c = scenegraph.proxy.colStart; c <= scenegraph.proxy.colEnd; c++) {\n const columnGroup = scenegraph.getColGroup(c);\n columnGroup?.getChildren()?.forEach((cellNode: Group) => {\n const col = cellNode.col;\n const row = cellNode.row;\n cellNode.children.forEach((node: Chart) => {\n if ((node as any).type === 'chart') {\n node.updateData(table.getCellValue(col, row));\n const chartSpec = node.attribute.spec;\n const chartType = chartSpec.type;\n if (chartType !== 'gauge' && chartType !== 'rose' && chartType !== 'radar') {\n const newAxes = table.internalProps.layoutMap.getChartAxes(col, row);\n node.setAttribute('axes', newAxes);\n chartSpec.axes = newAxes;\n }\n node.setAttribute('spec', chartSpec);\n // node.addUpdateBoundTag();\n }\n });\n });\n }\n\n // update left axes\n updateTableAxes(scenegraph.rowHeaderGroup, scenegraph.table);\n // update top axes\n updateTableAxes(scenegraph.colHeaderGroup, scenegraph.table);\n // update right axes\n updateTableAxes(scenegraph.rightFrozenGroup, scenegraph.table);\n // update bottom axes\n updateTableAxes(scenegraph.bottomFrozenGroup, scenegraph.table);\n}\n/** 组织图表数据状态_selectedDataItemsInChart 更新选中的图表图元状态 */\nexport function updateChartState(scenegraph: Scenegraph, datum: any) {\n const table = scenegraph.table;\n if (table.isPivotChart()) {\n const preSelectItemsCount = (table as PivotChart)._selectedDataItemsInChart.length;\n if ((datum === null || datum?.length === 0 || Object.keys(datum).length === 0) && preSelectItemsCount === 0) {\n //避免无效的更新\n return;\n }\n // (table as PivotChart)._selectedDataItemsInChart = [];\n const newSelectedDataItemsInChart = [];\n if (Array.isArray(datum)) {\n datum.forEach((dataItem: any) => {\n if (dataItem && dataItem.key !== 0 && Object.keys(dataItem).length > 0) {\n //本以为没有点击到图元上 datum为空 发现是{key:0}或者{}\n const selectedState = {} as any;\n for (const itemKey in dataItem) {\n if (!itemKey.startsWith('VGRAMMAR_') && !itemKey.startsWith('__VCHART')) {\n selectedState[itemKey] = dataItem[itemKey];\n }\n }\n newSelectedDataItemsInChart.push(selectedState);\n }\n });\n } else if (datum && datum.key !== 0 && Object.keys(datum).length > 0) {\n //本以为没有点击到图元上 datum为空 发现是{key:0}或者{}\n const selectedState = {} as any;\n for (const itemKey in datum) {\n if (!itemKey.startsWith('VGRAMMAR_') && !itemKey.startsWith('__VCHART')) {\n selectedState[itemKey] = datum[itemKey];\n }\n }\n newSelectedDataItemsInChart.push(selectedState);\n }\n //避免无效的更新\n if (!isEqual((table as PivotChart)._selectedDataItemsInChart, newSelectedDataItemsInChart)) {\n (table as PivotChart)._selectedDataItemsInChart = newSelectedDataItemsInChart;\n (table.internalProps.layoutMap as PivotHeaderLayoutMap).updateDataStateToChartInstance();\n // 清楚chart缓存图片\n clearChartCacheImage(scenegraph);\n table.scenegraph.updateNextFrame();\n }\n }\n}\n\n/**\n * @description: update table axis component\n * @param {Group} containerGroup\n * @param {BaseTableAPI} table\n * @return {*}\n */\nfunction updateTableAxes(containerGroup: Group, table: BaseTableAPI) {\n containerGroup.forEachChildren((column: Group) => {\n if (column.role === 'column') {\n column.forEachChildren((cell: Group) => {\n if (cell.role === 'cell') {\n let isAxisComponent = false;\n cell.forEachChildren((mark: Group) => {\n if (mark.name === 'axis') {\n isAxisComponent = true;\n return true;\n }\n return false;\n });\n if (isAxisComponent) {\n const axisConfig = table.internalProps.layoutMap.getAxisConfigInPivotChart(cell.col, cell.row);\n const cellStyle = table._getCellStyle(cell.col, cell.row);\n const padding = getQuadProps(getProp('padding', cellStyle, cell.col, cell.row, table));\n const CartesianAxis: ICartesianAxis = Factory.getComponent('axis');\n const axis = new CartesianAxis(\n axisConfig,\n cell.attribute.width,\n cell.attribute.height,\n axisConfig.__vtablePadding ?? padding,\n table\n );\n cell.clear();\n cell.appendChild(axis.component);\n axis.overlap();\n }\n }\n });\n }\n });\n}\n\nfunction updateChartGraphicSize(cellNode: Group, width: number, height: number) {\n cellNode.forEachChildren((graphic: Chart) => {\n if ((graphic as any).type === 'chart') {\n graphic.cacheCanvas = null;\n graphic.setAttributes({\n width: Math.ceil(width - graphic.attribute.cellPadding[3] - graphic.attribute.cellPadding[1]),\n height: Math.ceil(height - graphic.attribute.cellPadding[0] - graphic.attribute.cellPadding[2])\n });\n }\n });\n}\n"]}
@@ -68,7 +68,7 @@ export declare class Scenegraph {
68
68
  getCell(col: number, row: number, getShadow?: boolean): Group;
69
69
  highPerformanceGetCell(col: number, row: number, getShadow?: boolean): Group;
70
70
  getColGroup(col: number, isCornerOrColHeader?: boolean): Group;
71
- getColGroupInBottom(col: number): Group | undefined;
71
+ getColGroupInBottom(col: number, isCornerOrColHeader?: boolean): Group | undefined;
72
72
  getColGroupInLeftBottomCorner(col: number): Group | undefined;
73
73
  getColGroupInRightTopCorner(col: number): Group | undefined;
74
74
  getColGroupInRightBottomCorner(col: number): Group | undefined;
@@ -260,7 +260,12 @@ export class Scenegraph {
260
260
  return element = col < this.frozenColCount && isCornerOrColHeader ? this.cornerHeaderGroup.getColGroup(col) : col < this.frozenColCount ? this.rowHeaderGroup.getColGroup(col) : isCornerOrColHeader && this.table.rightFrozenColCount > 0 && col > this.table.colCount - 1 - this.table.rightFrozenColCount ? this.rightTopCornerGroup.getColGroup(col) : !isCornerOrColHeader && this.table.rightFrozenColCount > 0 && col > this.table.colCount - 1 - this.table.rightFrozenColCount ? this.rightFrozenGroup.getColGroup(col) : isCornerOrColHeader ? this.colHeaderGroup.getColGroup(col) : this.bodyGroup.getColGroup(col),
261
261
  element || void 0;
262
262
  }
263
- getColGroupInBottom(col) {
263
+ getColGroupInBottom(col, isCornerOrColHeader = !1) {
264
+ var _a;
265
+ if (isCornerOrColHeader) {
266
+ const element = null !== (_a = this.getColGroupInLeftBottomCorner(col)) && void 0 !== _a ? _a : this.getColGroupInRightBottomCorner(col);
267
+ if (element) return element;
268
+ }
264
269
  if (this.table.bottomFrozenRowCount > 0) return this.bottomFrozenGroup.getColGroup(col);
265
270
  }
266
271
  getColGroupInLeftBottomCorner(col) {