@visactor/vtable 0.9.2 → 0.9.3-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/ListTable.d.ts +2 -1
- package/cjs/ListTable.js +17 -13
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.d.ts +69 -0
- package/cjs/PivotChart.js +435 -0
- package/cjs/PivotChart.js.map +1 -0
- package/cjs/PivotTable.d.ts +2 -1
- package/cjs/PivotTable.js +18 -13
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/body-helper/style/MultilineTextStyle.js +2 -2
- package/cjs/body-helper/style/MultilineTextStyle.js.map +1 -1
- package/cjs/body-helper/style/ProgressBarStyle.js +15 -15
- package/cjs/body-helper/style/ProgressBarStyle.js.map +1 -1
- package/cjs/body-helper/style/Style.d.ts +0 -1
- package/cjs/body-helper/style/Style.js +25 -28
- package/cjs/body-helper/style/Style.js.map +1 -1
- package/cjs/chartModule.js +14 -0
- package/cjs/chartModule.js.map +1 -0
- package/cjs/components/axis/axis.d.ts +45 -0
- package/cjs/components/axis/axis.js +146 -0
- package/cjs/components/axis/axis.js.map +1 -0
- package/cjs/components/axis/band-scale.d.ts +18 -0
- package/cjs/components/axis/band-scale.js +54 -0
- package/cjs/components/axis/band-scale.js.map +1 -0
- package/cjs/components/axis/get-axis-attributes.d.ts +136 -0
- package/cjs/components/axis/get-axis-attributes.js +169 -0
- package/cjs/components/axis/get-axis-attributes.js.map +1 -0
- package/cjs/components/axis/label-overlap.d.ts +3 -0
- package/cjs/components/axis/label-overlap.js +46 -0
- package/cjs/components/axis/label-overlap.js.map +1 -0
- package/cjs/components/axis/linear-scale.d.ts +45 -0
- package/cjs/components/axis/linear-scale.js +120 -0
- package/cjs/components/axis/linear-scale.js.map +1 -0
- package/cjs/components/legend/get-legend-attributes.d.ts +5 -0
- package/cjs/components/legend/get-legend-attributes.js +90 -0
- package/cjs/components/legend/get-legend-attributes.js.map +1 -0
- package/cjs/components/legend/legend.d.ts +23 -0
- package/cjs/components/legend/legend.js +94 -0
- package/cjs/components/legend/legend.js.map +1 -0
- package/{es → cjs/components}/menu/dom/BaseMenu.d.ts +2 -2
- package/cjs/components/menu/dom/BaseMenu.js.map +1 -0
- package/cjs/components/menu/dom/Menu.js.map +1 -0
- package/cjs/{menu → components/menu}/dom/MenuHandler.d.ts +2 -2
- package/cjs/{menu → components/menu}/dom/MenuHandler.js +1 -1
- package/cjs/components/menu/dom/MenuHandler.js.map +1 -0
- package/cjs/{menu → components/menu}/dom/logic/MenuContainer.d.ts +2 -2
- package/cjs/{menu → components/menu}/dom/logic/MenuContainer.js +2 -2
- package/cjs/components/menu/dom/logic/MenuContainer.js.map +1 -0
- package/cjs/{menu → components/menu}/dom/logic/MenuElement.d.ts +2 -2
- package/cjs/{menu → components/menu}/dom/logic/MenuElement.js +4 -4
- package/cjs/components/menu/dom/logic/MenuElement.js.map +1 -0
- package/cjs/components/menu/dom/logic/MenuElementStyle.js.map +1 -0
- package/cjs/components/title/title.d.ts +12 -0
- package/cjs/components/title/title.js +66 -0
- package/cjs/components/title/title.js.map +1 -0
- package/{es → cjs/components}/tooltip/BaseTooltip.d.ts +3 -3
- package/cjs/components/tooltip/BaseTooltip.js.map +1 -0
- package/cjs/components/tooltip/Tooltip.js.map +1 -0
- package/cjs/{tooltip → components/tooltip}/TooltipHandler.d.ts +4 -4
- package/cjs/{tooltip → components/tooltip}/TooltipHandler.js +1 -1
- package/cjs/components/tooltip/TooltipHandler.js.map +1 -0
- package/{es → cjs/components}/tooltip/logic/BubbleTooltipElement.d.ts +4 -4
- package/cjs/{tooltip → components/tooltip}/logic/BubbleTooltipElement.js +1 -1
- package/cjs/components/tooltip/logic/BubbleTooltipElement.js.map +1 -0
- package/cjs/components/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -0
- package/cjs/components/util/orient.d.ts +3 -0
- package/cjs/components/util/orient.js +14 -0
- package/cjs/components/util/orient.js.map +1 -0
- package/cjs/components/util/register.d.ts +3 -0
- package/cjs/components/util/register.js +15 -0
- package/cjs/components/util/register.js.map +1 -0
- package/cjs/components/util/tick-data/config.d.ts +1 -0
- package/cjs/components/util/tick-data/config.js +6 -0
- package/cjs/components/util/tick-data/config.js.map +1 -0
- package/cjs/components/util/tick-data/continuous.d.ts +2 -0
- package/cjs/components/util/tick-data/continuous.js +39 -0
- package/cjs/components/util/tick-data/continuous.js.map +1 -0
- package/cjs/components/util/tick-data/discrete/linear.d.ts +2 -0
- package/cjs/components/util/tick-data/discrete/linear.js +66 -0
- package/cjs/components/util/tick-data/discrete/linear.js.map +1 -0
- package/cjs/components/util/tick-data/discrete/polar-angle.d.ts +2 -0
- package/cjs/components/util/tick-data/discrete/polar-angle.js +46 -0
- package/cjs/components/util/tick-data/discrete/polar-angle.js.map +1 -0
- package/cjs/components/util/tick-data/index.d.ts +2 -0
- package/cjs/components/util/tick-data/index.js +17 -0
- package/cjs/components/util/tick-data/index.js.map +1 -0
- package/cjs/components/util/tick-data/util.d.ts +21 -0
- package/cjs/components/util/tick-data/util.js +115 -0
- package/cjs/components/util/tick-data/util.js.map +1 -0
- package/cjs/components/util/transform.d.ts +5 -0
- package/cjs/components/util/transform.js +45 -0
- package/cjs/components/util/transform.js.map +1 -0
- package/cjs/core/BaseTable.d.ts +18 -5
- package/cjs/core/BaseTable.js +115 -41
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/TABLE_EVENT_TYPE.d.ts +5 -0
- package/cjs/core/TABLE_EVENT_TYPE.js +6 -1
- package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/cjs/core/style.js +1 -1
- package/cjs/core/style.js.map +1 -1
- package/cjs/core/tableHelper.js +1 -2
- package/cjs/data/CachedDataSource.js +2 -1
- package/cjs/data/DataSource.js +2 -2
- package/cjs/data/DataSource.js.map +1 -1
- package/cjs/dataset/dataset-pivot-table.d.ts +60 -0
- package/cjs/dataset/dataset-pivot-table.js +387 -0
- package/cjs/dataset/dataset-pivot-table.js.map +1 -0
- package/cjs/dataset/dataset.d.ts +14 -19
- package/cjs/dataset/dataset.js +183 -200
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/dataset/statistics-helper.d.ts +68 -0
- package/cjs/dataset/statistics-helper.js +173 -0
- package/cjs/dataset/statistics-helper.js.map +1 -0
- package/cjs/dataset/util/zero-align.d.ts +10 -0
- package/cjs/dataset/util/zero-align.js +119 -0
- package/cjs/dataset/util/zero-align.js.map +1 -0
- package/cjs/event/EventHandler.js.map +1 -1
- package/cjs/event/EventTarget.d.ts +5 -5
- package/cjs/event/EventTarget.js +2 -2
- package/cjs/event/EventTarget.js.map +1 -1
- package/cjs/event/VChartEventProxy.d.ts +1 -0
- package/cjs/event/VChartEventProxy.js +1 -0
- package/cjs/event/VChartEventProxy.js.map +1 -0
- package/cjs/event/event.js +7 -4
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/table-group.js +8 -6
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/event/pivot-chart/axis-click.d.ts +2 -0
- package/cjs/event/pivot-chart/axis-click.js +42 -0
- package/cjs/event/pivot-chart/axis-click.js.map +1 -0
- package/cjs/event/pivot-chart/axis-hover.d.ts +2 -0
- package/cjs/event/pivot-chart/axis-hover.js +41 -0
- package/cjs/event/pivot-chart/axis-hover.js.map +1 -0
- package/cjs/event/scroll.js +4 -3
- package/cjs/event/scroll.js.map +1 -1
- package/cjs/event/sparkline-event.js +1 -2
- package/cjs/event/sparkline-event.js.map +1 -1
- package/cjs/header-helper/header-helper.js +1 -1
- package/cjs/header-helper/header-helper.js.map +1 -1
- package/cjs/header-helper/style/MultilineTextHeaderStyle.js +2 -2
- package/cjs/header-helper/style/MultilineTextHeaderStyle.js.map +1 -1
- package/cjs/header-helper/style/Style.d.ts +0 -1
- package/cjs/header-helper/style/Style.js +25 -28
- package/cjs/header-helper/style/Style.js.map +1 -1
- package/cjs/index.d.ts +4 -3
- package/cjs/index.js +11 -2
- package/cjs/index.js.map +1 -1
- package/cjs/layout/chart-helper/get-axis-config.d.ts +2 -0
- package/cjs/layout/chart-helper/get-axis-config.js +118 -0
- package/cjs/layout/chart-helper/get-axis-config.js.map +1 -0
- package/cjs/layout/chart-helper/get-chart-spec.d.ts +7 -0
- package/cjs/layout/chart-helper/get-chart-spec.js +135 -0
- package/cjs/layout/chart-helper/get-chart-spec.js.map +1 -0
- package/cjs/layout/index.js +2 -1
- package/cjs/layout/pivot-header-layout.d.ts +13 -5
- package/cjs/layout/pivot-header-layout.js +50 -14
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/pivot-layout.d.ts +54 -8
- package/cjs/layout/pivot-layout.js +399 -91
- package/cjs/layout/pivot-layout.js.map +1 -1
- package/cjs/layout/simple-header-layout.d.ts +10 -0
- package/cjs/layout/simple-header-layout.js +43 -2
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/cjs/plugins/{chartTypes.js → chartModules.js} +1 -1
- package/cjs/plugins/chartModules.js.map +1 -0
- package/cjs/register.d.ts +1 -1
- package/cjs/register.js +6 -6
- package/cjs/register.js.map +1 -1
- package/cjs/render/layout/text.d.ts +33 -4
- package/cjs/render/layout/text.js +9 -3
- package/cjs/render/layout/text.js.map +1 -1
- package/cjs/scenegraph/component/custom.js +17 -16
- package/cjs/scenegraph/component/custom.js.map +1 -1
- package/cjs/scenegraph/component/menu.d.ts +41 -0
- package/cjs/scenegraph/component/table-component.js +3 -3
- package/cjs/scenegraph/component/table-component.js.map +1 -1
- package/cjs/scenegraph/graphic/chart.d.ts +4 -1
- package/cjs/scenegraph/graphic/chart.js +29 -17
- package/cjs/scenegraph/graphic/chart.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render.js +22 -3
- package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.d.ts +9 -9
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +48 -29
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/image-contribution-render.d.ts +3 -3
- package/cjs/scenegraph/graphic/contributions/image-contribution-render.js +2 -2
- package/cjs/scenegraph/graphic/contributions/image-contribution-render.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/rect-contribution-render.d.ts +3 -3
- package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js +2 -2
- package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
- package/cjs/scenegraph/graphic/text.d.ts +15 -0
- package/cjs/scenegraph/group-creater/cell-helper.js +9 -3
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.d.ts +1 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +6 -5
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/column.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.d.ts +3 -0
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +71 -0
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -0
- package/cjs/scenegraph/group-creater/progress/proxy.d.ts +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.js +29 -35
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +6 -6
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js +23 -15
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js +20 -9
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
- package/cjs/scenegraph/layout/move-cell.js +1 -1
- package/cjs/scenegraph/layout/move-cell.js.map +1 -1
- package/cjs/scenegraph/layout/update-cell.js +3 -2
- package/cjs/scenegraph/layout/update-cell.js.map +1 -1
- package/cjs/scenegraph/layout/update-height.js +1 -1
- package/cjs/scenegraph/layout/update-height.js.map +1 -1
- package/cjs/scenegraph/layout/update-row.js +1 -1
- package/cjs/scenegraph/layout/update-row.js.map +1 -1
- package/cjs/scenegraph/layout/update-width.js +33 -3
- package/cjs/scenegraph/layout/update-width.js.map +1 -1
- package/cjs/scenegraph/refresh-node/update-chart.d.ts +3 -0
- package/cjs/scenegraph/refresh-node/update-chart.js +76 -7
- package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +8 -0
- package/cjs/scenegraph/scenegraph.js +115 -19
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/stick-text/index.js +10 -8
- package/cjs/scenegraph/stick-text/index.js.map +1 -1
- package/cjs/scenegraph/style/corner-cell.d.ts +3 -0
- package/cjs/scenegraph/style/corner-cell.js +29 -0
- package/cjs/scenegraph/style/corner-cell.js.map +1 -0
- package/cjs/scenegraph/style/frame-border.d.ts +1 -0
- package/cjs/scenegraph/style/frame-border.js +3 -7
- package/cjs/scenegraph/style/frame-border.js.map +1 -1
- package/cjs/scenegraph/utils/get-cell-merge.js +2 -1
- package/cjs/scenegraph/utils/get-cell-merge.js.map +1 -1
- package/cjs/state/state.js +1 -1
- package/cjs/state/state.js.map +1 -1
- package/cjs/themes/DARK.js +1 -2
- package/cjs/themes/theme.d.ts +10 -0
- package/cjs/themes/theme.js +50 -4
- package/cjs/themes/theme.js.map +1 -1
- package/cjs/tools/LimitPromiseQueue.js +2 -1
- package/cjs/tools/calc.d.ts +3 -0
- package/cjs/tools/calc.js +11 -3
- package/cjs/tools/calc.js.map +1 -1
- package/cjs/tools/debounce.js +1 -1
- package/cjs/tools/diff-cell.js +2 -2
- package/cjs/tools/dom.js +1 -1
- package/cjs/tools/env.js +1 -1
- package/cjs/ts-types/base-table.d.ts +29 -12
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/column/style.d.ts +0 -1
- package/cjs/ts-types/column/style.js.map +1 -1
- package/cjs/ts-types/component/axis.d.ts +12 -0
- package/cjs/ts-types/component/axis.js +6 -0
- package/cjs/ts-types/component/axis.js.map +1 -0
- package/cjs/ts-types/component/legend.d.ts +5 -0
- package/cjs/ts-types/component/legend.js +6 -0
- package/cjs/ts-types/component/legend.js.map +1 -0
- package/cjs/ts-types/component/title.d.ts +47 -0
- package/cjs/ts-types/component/title.js +6 -0
- package/cjs/ts-types/component/title.js.map +1 -0
- package/cjs/ts-types/component/util.d.ts +1 -0
- package/cjs/ts-types/component/util.js +6 -0
- package/cjs/ts-types/component/util.js.map +1 -0
- package/cjs/ts-types/customElement.d.ts +2 -0
- package/cjs/ts-types/customElement.js.map +1 -1
- package/cjs/ts-types/events.d.ts +108 -83
- package/cjs/ts-types/events.js.map +1 -1
- package/cjs/ts-types/list-table/define/basic-define.js.map +1 -1
- package/cjs/ts-types/list-table/define/chart-define.d.ts +1 -1
- package/cjs/ts-types/list-table/define/chart-define.js.map +1 -1
- package/cjs/ts-types/list-table/layout-map/api.d.ts +4 -2
- package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
- package/cjs/ts-types/new-data-set.d.ts +19 -5
- package/cjs/ts-types/new-data-set.js +2 -2
- package/cjs/ts-types/new-data-set.js.map +1 -1
- package/cjs/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.d.ts +4 -0
- package/cjs/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js +3 -1
- package/cjs/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js.map +1 -1
- package/cjs/ts-types/pivot-table/corner.d.ts +3 -3
- package/cjs/ts-types/pivot-table/corner.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/chart-indicator.d.ts +1 -1
- package/cjs/ts-types/pivot-table/indicator/chart-indicator.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/index.d.ts +1 -0
- package/cjs/ts-types/pivot-table/indicator/index.js.map +1 -1
- package/cjs/ts-types/pivot-table/title.d.ts +1 -1
- package/cjs/ts-types/pivot-table/title.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +27 -3
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/ts-types/theme.d.ts +5 -0
- package/cjs/ts-types/theme.js.map +1 -1
- package/dist/vtable.js +37522 -24362
- package/dist/vtable.min.js +4 -2
- package/es/ListTable.d.ts +2 -1
- package/es/ListTable.js +17 -13
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.d.ts +69 -0
- package/es/PivotChart.js +445 -0
- package/es/PivotChart.js.map +1 -0
- package/es/PivotTable.d.ts +2 -1
- package/es/PivotTable.js +19 -14
- package/es/PivotTable.js.map +1 -1
- package/es/body-helper/style/MultilineTextStyle.js +2 -2
- package/es/body-helper/style/MultilineTextStyle.js.map +1 -1
- package/es/body-helper/style/ProgressBarStyle.js +15 -15
- package/es/body-helper/style/ProgressBarStyle.js.map +1 -1
- package/es/body-helper/style/Style.d.ts +0 -1
- package/es/body-helper/style/Style.js +25 -28
- package/es/body-helper/style/Style.js.map +1 -1
- package/es/{chartType.js → chartModule.js} +2 -2
- package/es/chartModule.js.map +1 -0
- package/es/components/axis/axis.d.ts +45 -0
- package/es/components/axis/axis.js +155 -0
- package/es/components/axis/axis.js.map +1 -0
- package/es/components/axis/band-scale.d.ts +18 -0
- package/es/components/axis/band-scale.js +46 -0
- package/es/components/axis/band-scale.js.map +1 -0
- package/es/components/axis/get-axis-attributes.d.ts +136 -0
- package/es/components/axis/get-axis-attributes.js +166 -0
- package/es/components/axis/get-axis-attributes.js.map +1 -0
- package/es/components/axis/label-overlap.d.ts +3 -0
- package/es/components/axis/label-overlap.js +39 -0
- package/es/components/axis/label-overlap.js.map +1 -0
- package/es/components/axis/linear-scale.d.ts +45 -0
- package/es/components/axis/linear-scale.js +104 -0
- package/es/components/axis/linear-scale.js.map +1 -0
- package/es/components/legend/get-legend-attributes.d.ts +5 -0
- package/es/components/legend/get-legend-attributes.js +84 -0
- package/es/components/legend/get-legend-attributes.js.map +1 -0
- package/es/components/legend/legend.d.ts +23 -0
- package/es/components/legend/legend.js +93 -0
- package/es/components/legend/legend.js.map +1 -0
- package/{cjs → es/components}/menu/dom/BaseMenu.d.ts +2 -2
- package/es/components/menu/dom/BaseMenu.js.map +1 -0
- package/es/components/menu/dom/Menu.js.map +1 -0
- package/es/{menu → components/menu}/dom/MenuHandler.d.ts +2 -2
- package/es/{menu → components/menu}/dom/MenuHandler.js +2 -2
- package/es/components/menu/dom/MenuHandler.js.map +1 -0
- package/es/{menu → components/menu}/dom/logic/MenuContainer.d.ts +2 -2
- package/es/{menu → components/menu}/dom/logic/MenuContainer.js +4 -4
- package/es/components/menu/dom/logic/MenuContainer.js.map +1 -0
- package/es/{menu → components/menu}/dom/logic/MenuElement.d.ts +2 -2
- package/es/{menu → components/menu}/dom/logic/MenuElement.js +9 -9
- package/es/components/menu/dom/logic/MenuElement.js.map +1 -0
- package/es/components/menu/dom/logic/MenuElementStyle.js.map +1 -0
- package/es/components/title/title.d.ts +12 -0
- package/es/components/title/title.js +61 -0
- package/es/components/title/title.js.map +1 -0
- package/{cjs → es/components}/tooltip/BaseTooltip.d.ts +3 -3
- package/es/components/tooltip/BaseTooltip.js.map +1 -0
- package/es/components/tooltip/Tooltip.js.map +1 -0
- package/es/{tooltip → components/tooltip}/TooltipHandler.d.ts +4 -4
- package/es/{tooltip → components/tooltip}/TooltipHandler.js +4 -4
- package/es/components/tooltip/TooltipHandler.js.map +1 -0
- package/{cjs → es/components}/tooltip/logic/BubbleTooltipElement.d.ts +4 -4
- package/es/{tooltip → components/tooltip}/logic/BubbleTooltipElement.js +4 -4
- package/es/components/tooltip/logic/BubbleTooltipElement.js.map +1 -0
- package/es/components/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -0
- package/es/components/util/orient.d.ts +3 -0
- package/es/components/util/orient.js +8 -0
- package/es/components/util/orient.js.map +1 -0
- package/es/components/util/register.d.ts +3 -0
- package/es/components/util/register.js +8 -0
- package/es/components/util/register.js.map +1 -0
- package/es/components/util/tick-data/config.d.ts +1 -0
- package/es/components/util/tick-data/config.js +2 -0
- package/es/components/util/tick-data/config.js.map +1 -0
- package/es/components/util/tick-data/continuous.d.ts +2 -0
- package/es/components/util/tick-data/continuous.js +38 -0
- package/es/components/util/tick-data/continuous.js.map +1 -0
- package/es/components/util/tick-data/discrete/linear.d.ts +2 -0
- package/es/components/util/tick-data/discrete/linear.js +59 -0
- package/es/components/util/tick-data/discrete/linear.js.map +1 -0
- package/es/components/util/tick-data/discrete/polar-angle.d.ts +2 -0
- package/es/components/util/tick-data/discrete/polar-angle.js +39 -0
- package/es/components/util/tick-data/discrete/polar-angle.js.map +1 -0
- package/es/components/util/tick-data/index.d.ts +2 -0
- package/es/components/util/tick-data/index.js +19 -0
- package/es/components/util/tick-data/index.js.map +1 -0
- package/es/components/util/tick-data/util.d.ts +21 -0
- package/es/components/util/tick-data/util.js +104 -0
- package/es/components/util/tick-data/util.js.map +1 -0
- package/es/components/util/transform.d.ts +5 -0
- package/es/components/util/transform.js +34 -0
- package/es/components/util/transform.js.map +1 -0
- package/es/core/BaseTable.d.ts +18 -5
- package/es/core/BaseTable.js +119 -43
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/TABLE_EVENT_TYPE.d.ts +5 -0
- package/es/core/TABLE_EVENT_TYPE.js +6 -1
- package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/es/core/style.js +1 -1
- package/es/core/style.js.map +1 -1
- package/es/core/tableHelper.js +1 -2
- package/es/data/CachedDataSource.js +2 -1
- package/es/data/DataSource.js +2 -2
- package/es/data/DataSource.js.map +1 -1
- package/es/dataset/dataset-pivot-table.d.ts +60 -0
- package/es/dataset/dataset-pivot-table.js +378 -0
- package/es/dataset/dataset-pivot-table.js.map +1 -0
- package/es/dataset/dataset.d.ts +14 -19
- package/es/dataset/dataset.js +175 -190
- package/es/dataset/dataset.js.map +1 -1
- package/es/dataset/statistics-helper.d.ts +68 -0
- package/es/dataset/statistics-helper.js +152 -0
- package/es/dataset/statistics-helper.js.map +1 -0
- package/es/dataset/util/zero-align.d.ts +10 -0
- package/es/dataset/util/zero-align.js +111 -0
- package/es/dataset/util/zero-align.js.map +1 -0
- package/es/event/EventHandler.js.map +1 -1
- package/es/event/EventTarget.d.ts +5 -5
- package/es/event/EventTarget.js +2 -2
- package/es/event/EventTarget.js.map +1 -1
- package/es/event/VChartEventProxy.d.ts +1 -0
- package/es/event/VChartEventProxy.js +1 -0
- package/es/event/VChartEventProxy.js.map +1 -0
- package/es/event/event.js +10 -3
- package/es/event/event.js.map +1 -1
- package/es/event/listener/table-group.js +8 -6
- package/es/event/listener/table-group.js.map +1 -1
- package/es/event/pivot-chart/axis-click.d.ts +2 -0
- package/es/event/pivot-chart/axis-click.js +36 -0
- package/es/event/pivot-chart/axis-click.js.map +1 -0
- package/es/event/pivot-chart/axis-hover.d.ts +2 -0
- package/es/event/pivot-chart/axis-hover.js +33 -0
- package/es/event/pivot-chart/axis-hover.js.map +1 -0
- package/es/event/scroll.js +4 -3
- package/es/event/scroll.js.map +1 -1
- package/es/event/sparkline-event.js +1 -2
- package/es/event/sparkline-event.js.map +1 -1
- package/es/header-helper/header-helper.js +1 -1
- package/es/header-helper/header-helper.js.map +1 -1
- package/es/header-helper/style/MultilineTextHeaderStyle.js +2 -2
- package/es/header-helper/style/MultilineTextHeaderStyle.js.map +1 -1
- package/es/header-helper/style/Style.d.ts +0 -1
- package/es/header-helper/style/Style.js +25 -28
- package/es/header-helper/style/Style.js.map +1 -1
- package/es/index.d.ts +4 -3
- package/es/index.js +4 -2
- package/es/index.js.map +1 -1
- package/es/layout/chart-helper/get-axis-config.d.ts +2 -0
- package/es/layout/chart-helper/get-axis-config.js +110 -0
- package/es/layout/chart-helper/get-axis-config.js.map +1 -0
- package/es/layout/chart-helper/get-chart-spec.d.ts +7 -0
- package/es/layout/chart-helper/get-chart-spec.js +126 -0
- package/es/layout/chart-helper/get-chart-spec.js.map +1 -0
- package/es/layout/index.js +2 -1
- package/es/layout/pivot-header-layout.d.ts +13 -5
- package/es/layout/pivot-header-layout.js +50 -12
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/pivot-layout.d.ts +54 -8
- package/es/layout/pivot-layout.js +402 -89
- package/es/layout/pivot-layout.js.map +1 -1
- package/es/layout/simple-header-layout.d.ts +10 -0
- package/es/layout/simple-header-layout.js +44 -1
- package/es/layout/simple-header-layout.js.map +1 -1
- package/es/plugins/chartModules.js +2 -0
- package/es/plugins/chartModules.js.map +1 -0
- package/es/register.d.ts +1 -1
- package/es/register.js +3 -3
- package/es/register.js.map +1 -1
- package/es/render/layout/text.d.ts +33 -4
- package/es/render/layout/text.js +9 -3
- package/es/render/layout/text.js.map +1 -1
- package/es/scenegraph/component/custom.js +17 -16
- package/es/scenegraph/component/custom.js.map +1 -1
- package/es/scenegraph/component/menu.d.ts +41 -0
- package/es/scenegraph/component/table-component.js +3 -3
- package/es/scenegraph/component/table-component.js.map +1 -1
- package/es/scenegraph/graphic/chart.d.ts +4 -1
- package/es/scenegraph/graphic/chart.js +29 -15
- package/es/scenegraph/graphic/chart.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render.js +22 -3
- package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/es/scenegraph/graphic/contributions/group-contribution-render.d.ts +9 -9
- package/es/scenegraph/graphic/contributions/group-contribution-render.js +48 -29
- package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/es/scenegraph/graphic/contributions/image-contribution-render.d.ts +3 -3
- package/es/scenegraph/graphic/contributions/image-contribution-render.js +2 -2
- package/es/scenegraph/graphic/contributions/image-contribution-render.js.map +1 -1
- package/es/scenegraph/graphic/contributions/rect-contribution-render.d.ts +3 -3
- package/es/scenegraph/graphic/contributions/rect-contribution-render.js +2 -2
- package/es/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
- package/es/scenegraph/graphic/text.d.ts +15 -0
- package/es/scenegraph/group-creater/cell-helper.js +10 -2
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.d.ts +1 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.js +6 -5
- package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/es/scenegraph/group-creater/column.js.map +1 -1
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.d.ts +3 -0
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +65 -0
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -0
- package/es/scenegraph/group-creater/progress/proxy.d.ts +1 -1
- package/es/scenegraph/group-creater/progress/proxy.js +27 -34
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +6 -6
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/es/scenegraph/layout/compute-col-width.js +23 -15
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.js +20 -9
- package/es/scenegraph/layout/compute-row-height.js.map +1 -1
- package/es/scenegraph/layout/move-cell.js +1 -1
- package/es/scenegraph/layout/move-cell.js.map +1 -1
- package/es/scenegraph/layout/update-cell.js +3 -1
- package/es/scenegraph/layout/update-cell.js.map +1 -1
- package/es/scenegraph/layout/update-height.js +1 -1
- package/es/scenegraph/layout/update-height.js.map +1 -1
- package/es/scenegraph/layout/update-row.js +1 -1
- package/es/scenegraph/layout/update-row.js.map +1 -1
- package/es/scenegraph/layout/update-width.js +34 -2
- package/es/scenegraph/layout/update-width.js.map +1 -1
- package/es/scenegraph/refresh-node/update-chart.d.ts +3 -0
- package/es/scenegraph/refresh-node/update-chart.js +70 -4
- package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +8 -0
- package/es/scenegraph/scenegraph.js +117 -19
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/stick-text/index.js +10 -8
- package/es/scenegraph/stick-text/index.js.map +1 -1
- package/es/scenegraph/style/corner-cell.d.ts +3 -0
- package/es/scenegraph/style/corner-cell.js +25 -0
- package/es/scenegraph/style/corner-cell.js.map +1 -0
- package/es/scenegraph/style/frame-border.d.ts +1 -0
- package/es/scenegraph/style/frame-border.js +2 -6
- package/es/scenegraph/style/frame-border.js.map +1 -1
- package/es/scenegraph/utils/get-cell-merge.js +2 -1
- package/es/scenegraph/utils/get-cell-merge.js.map +1 -1
- package/es/state/state.js +1 -1
- package/es/state/state.js.map +1 -1
- package/es/themes/DARK.js +1 -2
- package/es/themes/theme.d.ts +10 -0
- package/es/themes/theme.js +50 -4
- package/es/themes/theme.js.map +1 -1
- package/es/tools/LimitPromiseQueue.js +2 -1
- package/es/tools/calc.d.ts +3 -0
- package/es/tools/calc.js +10 -0
- package/es/tools/calc.js.map +1 -1
- package/es/tools/debounce.js +1 -1
- package/es/tools/diff-cell.js +1 -1
- package/es/tools/dom.js +1 -1
- package/es/tools/env.js +1 -1
- package/es/ts-types/base-table.d.ts +29 -12
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/column/style.d.ts +0 -1
- package/es/ts-types/column/style.js.map +1 -1
- package/es/ts-types/component/axis.d.ts +12 -0
- package/es/ts-types/component/axis.js +2 -0
- package/es/ts-types/component/axis.js.map +1 -0
- package/es/ts-types/component/legend.d.ts +5 -0
- package/es/ts-types/component/legend.js +2 -0
- package/es/ts-types/component/legend.js.map +1 -0
- package/es/ts-types/component/title.d.ts +47 -0
- package/es/ts-types/component/title.js +2 -0
- package/es/ts-types/component/title.js.map +1 -0
- package/es/ts-types/component/util.d.ts +1 -0
- package/es/ts-types/component/util.js +2 -0
- package/es/ts-types/component/util.js.map +1 -0
- package/es/ts-types/customElement.d.ts +2 -0
- package/es/ts-types/customElement.js.map +1 -1
- package/es/ts-types/events.d.ts +108 -83
- package/es/ts-types/events.js.map +1 -1
- package/es/ts-types/list-table/define/basic-define.js.map +1 -1
- package/es/ts-types/list-table/define/chart-define.d.ts +1 -1
- package/es/ts-types/list-table/define/chart-define.js.map +1 -1
- package/es/ts-types/list-table/layout-map/api.d.ts +4 -2
- package/es/ts-types/list-table/layout-map/api.js.map +1 -1
- package/es/ts-types/new-data-set.d.ts +19 -5
- package/es/ts-types/new-data-set.js +2 -2
- package/es/ts-types/new-data-set.js.map +1 -1
- package/es/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.d.ts +4 -0
- package/es/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js +4 -0
- package/es/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js.map +1 -1
- package/es/ts-types/pivot-table/corner.d.ts +3 -3
- package/es/ts-types/pivot-table/corner.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/chart-indicator.d.ts +1 -1
- package/es/ts-types/pivot-table/indicator/chart-indicator.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/index.d.ts +1 -0
- package/es/ts-types/pivot-table/indicator/index.js.map +1 -1
- package/es/ts-types/pivot-table/title.d.ts +1 -1
- package/es/ts-types/pivot-table/title.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +27 -3
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/ts-types/theme.d.ts +5 -0
- package/es/ts-types/theme.js.map +1 -1
- package/package.json +16 -10
- package/cjs/chartType.js +0 -14
- package/cjs/chartType.js.map +0 -1
- package/cjs/menu/dom/BaseMenu.js.map +0 -1
- package/cjs/menu/dom/Menu.js.map +0 -1
- package/cjs/menu/dom/MenuHandler.js.map +0 -1
- package/cjs/menu/dom/logic/MenuContainer.js.map +0 -1
- package/cjs/menu/dom/logic/MenuElement.js.map +0 -1
- package/cjs/menu/dom/logic/MenuElementStyle.js.map +0 -1
- package/cjs/plugins/chartTypes.js.map +0 -1
- package/cjs/scenegraph/layout/auto-width.d.ts +0 -2
- package/cjs/scenegraph/layout/auto-width.js +0 -85
- package/cjs/scenegraph/layout/auto-width.js.map +0 -1
- package/cjs/tooltip/BaseTooltip.js.map +0 -1
- package/cjs/tooltip/Tooltip.js.map +0 -1
- package/cjs/tooltip/TooltipHandler.js.map +0 -1
- package/cjs/tooltip/logic/BubbleTooltipElement.js.map +0 -1
- package/cjs/tooltip/logic/BubbleTooltipElementStyle.js.map +0 -1
- package/es/chartType.js.map +0 -1
- package/es/menu/dom/BaseMenu.js.map +0 -1
- package/es/menu/dom/Menu.js.map +0 -1
- package/es/menu/dom/MenuHandler.js.map +0 -1
- package/es/menu/dom/logic/MenuContainer.js.map +0 -1
- package/es/menu/dom/logic/MenuElement.js.map +0 -1
- package/es/menu/dom/logic/MenuElementStyle.js.map +0 -1
- package/es/plugins/chartTypes.js +0 -2
- package/es/plugins/chartTypes.js.map +0 -1
- package/es/scenegraph/layout/auto-width.d.ts +0 -2
- package/es/scenegraph/layout/auto-width.js +0 -82
- package/es/scenegraph/layout/auto-width.js.map +0 -1
- package/es/tooltip/BaseTooltip.js.map +0 -1
- package/es/tooltip/Tooltip.js.map +0 -1
- package/es/tooltip/TooltipHandler.js.map +0 -1
- package/es/tooltip/logic/BubbleTooltipElement.js.map +0 -1
- package/es/tooltip/logic/BubbleTooltipElementStyle.js.map +0 -1
- /package/cjs/{chartType.d.ts → chartModule.d.ts} +0 -0
- /package/cjs/{menu → components/menu}/dom/BaseMenu.js +0 -0
- /package/cjs/{menu → components/menu}/dom/Menu.d.ts +0 -0
- /package/cjs/{menu → components/menu}/dom/Menu.js +0 -0
- /package/cjs/{menu → components/menu}/dom/logic/MenuElementStyle.d.ts +0 -0
- /package/cjs/{menu → components/menu}/dom/logic/MenuElementStyle.js +0 -0
- /package/cjs/{tooltip → components/tooltip}/BaseTooltip.js +0 -0
- /package/cjs/{tooltip → components/tooltip}/Tooltip.d.ts +0 -0
- /package/cjs/{tooltip → components/tooltip}/Tooltip.js +0 -0
- /package/cjs/{tooltip → components/tooltip}/logic/BubbleTooltipElementStyle.d.ts +0 -0
- /package/cjs/{tooltip → components/tooltip}/logic/BubbleTooltipElementStyle.js +0 -0
- /package/cjs/plugins/{chartTypes.d.ts → chartModules.d.ts} +0 -0
- /package/es/{chartType.d.ts → chartModule.d.ts} +0 -0
- /package/es/{menu → components/menu}/dom/BaseMenu.js +0 -0
- /package/es/{menu → components/menu}/dom/Menu.d.ts +0 -0
- /package/es/{menu → components/menu}/dom/Menu.js +0 -0
- /package/es/{menu → components/menu}/dom/logic/MenuElementStyle.d.ts +0 -0
- /package/es/{menu → components/menu}/dom/logic/MenuElementStyle.js +0 -0
- /package/es/{tooltip → components/tooltip}/BaseTooltip.js +0 -0
- /package/es/{tooltip → components/tooltip}/Tooltip.d.ts +0 -0
- /package/es/{tooltip → components/tooltip}/Tooltip.js +0 -0
- /package/es/{tooltip → components/tooltip}/logic/BubbleTooltipElementStyle.d.ts +0 -0
- /package/es/{tooltip → components/tooltip}/logic/BubbleTooltipElementStyle.js +0 -0
- /package/es/plugins/{chartTypes.d.ts → chartModules.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["scenegraph/group-creater/cell-helper.ts"],"names":[],"mappings":";;;AAEA,+CAA4C;AAY5C,gDAAqD;AACrD,4CAAyC;AACzC,gDAA4C;AAC5C,uDAA8D;AAC9D,uDAA8D;AAC9D,qEAAsE;AACtE,iEAAuE;AACvE,qDAAwD;AACxD,uDAA8D;AAG9D,wDAAuD;AACvD,+CAA+C;AAC/C,kEAA6D;AAE7D,SAAgB,UAAU,CACxB,IAAsB,EACtB,MAAoB,EACpB,KAAmB,EACnB,GAAW,EACX,GAAW,EACX,QAAgB,EAChB,WAAqB,EACrB,SAAiB,EACjB,UAAkB,EAClB,WAAkB,EAClB,CAAS,EACT,OAAyC,EACzC,SAA0B,EAC1B,YAAgC,EAChC,WAAoB,EACpB,OAAgB,EAChB,KAAgB,EAChB,SAAqB;IAErB,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EAEhE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,EACrC,OAAO,EACP,SAAS,EACT,YAAY,EACZ,WAAW,EACX,OAAO,EACP,KAAK,EACL,SAAS,CACV,CAAC;IACF,IAAI,CAAC,MAAM,EAAE;QACX,YAAY,CAAC,MAAM,CAAC,WAAW,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;QAC5D,YAAY,CAAC,MAAM,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;QAG9C,IAAI,MAAA,KAAK,CAAC,UAAU,0CAAE,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;YAC9C,MAAA,KAAK,CAAC,UAAU,0CAAE,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;SAC1D;KACF;IACD,OAAO,YAAY,CAAC;AACtB,CAAC","file":"cell-helper.js","sourcesContent":["import type { Cursor, IThemeSpec } from '@visactor/vrender';\nimport type { ProgressBarStyle } from '../../body-helper/style/ProgressBarStyle';\nimport { regUrl } from '../../tools/global';\nimport type {\n CellRange,\n ChartColumnDefine,\n ColumnDefine,\n ColumnTypeOption,\n ICustomRender,\n ImageColumnDefine,\n MappingRule,\n ProgressbarColumnDefine,\n TextColumnDefine\n} from '../../ts-types';\nimport { dealWithCustom } from '../component/custom';\nimport { Group } from '../graphic/group';\nimport { getProp } from '../utils/get-prop';\nimport { createChartCellGroup } from './cell-type/chart-cell';\nimport { createImageCellGroup } from './cell-type/image-cell';\nimport { createProgressBarCell } from './cell-type/progress-bar-cell';\nimport { createSparkLineCellGroup } from './cell-type/spark-line-cell';\nimport { createCellGroup } from './cell-type/text-cell';\nimport { createVideoCellGroup } from './cell-type/video-cell';\nimport type { ICustomLayoutFuc } from '../../ts-types/customLayout';\nimport type { BaseTableAPI, PivotTableProtected } from '../../ts-types/base-table';\nimport { getStyleTheme } from '../../core/tableHelper';\nimport { isPromise } from '../../tools/helper';\nimport { dealPromiseData } from '../utils/deal-promise-data';\n\nexport function createCell(\n type: ColumnTypeOption,\n define: ColumnDefine,\n table: BaseTableAPI,\n col: number,\n row: number,\n colWidth: number,\n bgColorFunc: Function,\n cellWidth: number,\n cellHeight: number,\n columnGroup: Group,\n y: number,\n padding: [number, number, number, number],\n textAlign: CanvasTextAlign,\n textBaseline: CanvasTextBaseline,\n mayHaveIcon: boolean,\n isMerge: boolean,\n range: CellRange,\n cellTheme: IThemeSpec\n): Group {\n let cellGroup: Group;\n if (type === 'text' || type === 'link') {\n if (type === 'link') {\n //如果是超链接 颜色按照linkColor绘制 TODO:放到方法_getCellStyle中\n // const columnDefine = table.getHeaderDefine(col, row);\n const cellValue = table.getCellValue(col, row);\n const headerStyle = table._getCellStyle(col, row);\n\n if (\n type === 'link' &&\n (('templateLink' in define && define.templateLink) ||\n !('linkDetect' in define && define.linkDetect) ||\n regUrl.test(cellValue))\n ) {\n if (cellTheme) {\n cellTheme.text.fill = getProp('linkColor', headerStyle, col, row, table);\n (cellTheme as any).group.cursor = 'pointer';\n } else {\n cellTheme = {\n text: {\n fill: getProp('linkColor', headerStyle, col, row, table)\n },\n group: {\n cursor: 'pointer' as Cursor\n }\n };\n }\n }\n }\n // 判断是否有mapping 遍历dataset中mappingRules 但这里还需要根据fieldName来判断\n if (bgColorFunc) {\n const cellValue = table.getCellOriginValue(col, row);\n const bgColor = bgColorFunc(table, cellValue);\n if (bgColor) {\n if (cellTheme) {\n cellTheme.group.fill = bgColor;\n } else {\n cellTheme = {\n group: {\n fill: bgColor\n }\n };\n }\n }\n }\n\n let customElementsGroup;\n let renderDefault = true;\n let customRender;\n let customLayout;\n const cellType = table.getCellType(col, row);\n if (cellType !== 'body') {\n customRender = define?.headerCustomRender;\n customLayout = define?.headerCustomLayout;\n } else {\n customRender = define?.customRender || table.customRender;\n customLayout = define?.customLayout;\n }\n\n if (customLayout || customRender) {\n const { autoRowHeight } = table.internalProps;\n const customResult = dealWithCustom(\n customLayout,\n customRender,\n col,\n row,\n table.getColWidth(col),\n table.getRowHeight(row),\n false,\n autoRowHeight,\n table\n );\n customElementsGroup = customResult.elementsGroup;\n renderDefault = customResult.renderDefault;\n }\n cellGroup = createCellGroup(\n table,\n columnGroup,\n 0,\n y,\n col,\n row,\n colWidth,\n cellWidth,\n cellHeight,\n padding,\n textAlign,\n textBaseline,\n mayHaveIcon,\n customElementsGroup,\n renderDefault,\n cellTheme\n );\n if (isMerge) {\n cellGroup.mergeCol = range.end.col;\n cellGroup.mergeRow = range.end.row;\n }\n } else if (type === 'image') {\n // 创建图片单元格\n cellGroup = createImageCellGroup(\n columnGroup,\n 0,\n y,\n col,\n row,\n table.getColWidth(col),\n table.getRowHeight(row),\n (define as ImageColumnDefine).keepAspectRatio,\n (define as ImageColumnDefine).imageAutoSizing,\n padding,\n textAlign,\n textBaseline,\n table,\n cellTheme\n );\n } else if (type === 'video') {\n // 创建视频单元格\n cellGroup = createVideoCellGroup(\n columnGroup,\n 0,\n y,\n col,\n row,\n table.getColWidth(col),\n table.getRowHeight(row),\n (define as ImageColumnDefine).keepAspectRatio,\n (define as ImageColumnDefine).imageAutoSizing,\n padding,\n textAlign,\n textBaseline,\n table,\n cellTheme\n );\n } else if (type === 'chart') {\n const chartInstance = table.internalProps.layoutMap.getChartInstance(col, row);\n cellGroup = createChartCellGroup(\n null,\n columnGroup,\n 0,\n y,\n col,\n row,\n table.getColWidth(col),\n table.getRowHeight(row),\n padding,\n table.getCellValue(col, row),\n (define as ChartColumnDefine).chartType,\n (define as ChartColumnDefine).chartSpec,\n chartInstance,\n table,\n cellTheme\n );\n } else if (type === 'progressbar') {\n const style = table._getCellStyle(col, row) as ProgressBarStyle;\n const value = table.getCellValue(col, row);\n const dataValue = table.getCellOriginValue(col, row);\n // 创建基础文字单元格\n cellGroup = createCellGroup(\n table,\n columnGroup,\n 0,\n y,\n col,\n row,\n colWidth,\n cellWidth,\n cellHeight,\n padding,\n textAlign,\n textBaseline,\n false,\n null,\n true,\n cellTheme\n );\n\n // 创建bar group\n const progressBarGroup = createProgressBarCell(\n define as ProgressbarColumnDefine,\n style,\n colWidth,\n value,\n dataValue,\n col,\n row,\n padding,\n table\n );\n // 进度图插入到文字前,绘制在文字下\n cellGroup.insertBefore(progressBarGroup, cellGroup.firstChild);\n } else if (type === 'sparkline') {\n cellGroup = createSparkLineCellGroup(\n null,\n columnGroup,\n 0,\n y,\n col,\n row,\n cellWidth,\n cellHeight,\n padding,\n table,\n cellTheme\n );\n }\n\n return cellGroup;\n}\n\nexport function updateCell(col: number, row: number, table: BaseTableAPI, addNew?: boolean) {\n // const oldCellGroup = table.scenegraph.getCell(col, row, true);\n const oldCellGroup = table.scenegraph.highPerformanceGetCell(col, row, true);\n\n const type = table.isHeader(col, row)\n ? table._getHeaderLayoutMap(col, row).headerType\n : table.getBodyColumnType(col, row);\n const cellType = table.getCellType(col, row);\n const define = cellType !== 'body' ? table.getHeaderDefine(col, row) : table.getBodyColumnDefine(col, row);\n\n let isMerge;\n let range;\n if (cellType !== 'body' || (define as TextColumnDefine)?.mergeCell) {\n // 只有表头或者column配置合并单元格后再进行信息获取\n range = table.getCellRange(col, row);\n isMerge = range.start.col !== range.end.col || range.start.row !== range.end.row;\n }\n\n let newCellGroup;\n if (isMerge && (col !== range.start.col || row !== range.start.row)) {\n // 合并单元格的非起始单元格不需要绘制\n newCellGroup = new Group({\n x: 0,\n y: addNew ? 0 : oldCellGroup.attribute.y,\n width: 0,\n height: 0,\n visible: false,\n pickable: false\n });\n newCellGroup.role = 'shadow-cell';\n newCellGroup.col = col;\n newCellGroup.row = row;\n newCellGroup.mergeCol = range.start.col;\n newCellGroup.mergeRow = range.start.row;\n\n if (!addNew) {\n oldCellGroup.parent.insertAfter(newCellGroup, oldCellGroup);\n oldCellGroup.parent.removeChild(oldCellGroup);\n }\n } else {\n const mayHaveIcon = cellType !== 'body' ? true : !!define?.icon || !!define?.tree;\n const headerStyle = table._getCellStyle(col, row);\n const cellTheme = getStyleTheme(headerStyle, table, col, row, getProp).theme;\n const padding = cellTheme._vtable.padding;\n const textAlign = cellTheme._vtable.textAlign;\n const textBaseline = cellTheme._vtable.textBaseline;\n\n let bgColorFunc: Function;\n // 判断是否有mapping 遍历dataset中mappingRules\n if ((table.internalProps as PivotTableProtected)?.dataConfig?.mappingRules && cellType === 'body') {\n (table.internalProps as PivotTableProtected)?.dataConfig?.mappingRules?.forEach(\n (mappingRule: MappingRule, i: number) => {\n if (mappingRule.bgColor) {\n bgColorFunc = mappingRule.bgColor.mapping;\n }\n }\n );\n }\n\n let customRender;\n let customLayout;\n if (cellType !== 'body') {\n customRender = define?.headerCustomRender;\n customLayout = define?.headerCustomLayout;\n } else {\n customRender = define?.customRender || table.customRender;\n customLayout = define?.customLayout;\n }\n\n let cellWidth;\n let cellHeight;\n if (range) {\n cellWidth = table.getColsWidth(range.start.col, range.end.col);\n cellHeight = table.getRowsHeight(range.start.row, range.end.row);\n } else {\n cellWidth = table.getColWidth(col);\n cellHeight = table.getRowHeight(row);\n }\n\n // deal with promise data\n const value = table.getCellValue(col, row);\n if (isPromise(value)) {\n // clear cell content sync\n oldCellGroup.removeAllChild();\n\n // update cell content async\n dealPromiseData(\n value,\n table,\n updateCellContent.bind(\n null,\n type,\n define,\n table,\n col,\n row,\n bgColorFunc,\n cellWidth,\n cellHeight,\n oldCellGroup,\n padding,\n textAlign,\n textBaseline,\n mayHaveIcon,\n isMerge,\n range,\n addNew,\n cellTheme\n )\n );\n } else {\n newCellGroup = updateCellContent(\n type,\n define,\n table,\n col,\n row,\n bgColorFunc,\n cellWidth,\n cellHeight,\n oldCellGroup,\n padding,\n textAlign,\n textBaseline,\n mayHaveIcon,\n isMerge,\n range,\n addNew,\n cellTheme\n );\n }\n }\n\n return newCellGroup;\n}\n\nfunction updateCellContent(\n type: ColumnTypeOption,\n define: ColumnDefine,\n table: BaseTableAPI,\n col: number,\n row: number,\n bgColorFunc: Function,\n cellWidth: number,\n cellHeight: number,\n oldCellGroup: Group,\n padding: [number, number, number, number],\n textAlign: CanvasTextAlign,\n textBaseline: CanvasTextBaseline,\n mayHaveIcon: boolean,\n isMerge: boolean,\n range: CellRange,\n addNew: boolean,\n cellTheme?: IThemeSpec\n) {\n const newCellGroup = createCell(\n type,\n define,\n table,\n col,\n row,\n table.getColWidth(col),\n bgColorFunc,\n cellWidth,\n cellHeight,\n // oldCellGroup.parent,\n addNew ? table.scenegraph.getColGroup(col) : oldCellGroup.parent,\n // oldCellGroup.attribute.y,\n addNew ? 0 : oldCellGroup.attribute.y,\n padding,\n textAlign,\n textBaseline,\n mayHaveIcon,\n isMerge,\n range,\n cellTheme\n );\n if (!addNew) {\n oldCellGroup.parent.insertAfter(newCellGroup, oldCellGroup);\n oldCellGroup.parent.removeChild(oldCellGroup);\n\n // update cache\n if (table.scenegraph?.proxy.cellCache.get(col)) {\n table.scenegraph?.proxy.cellCache.set(col, newCellGroup);\n }\n }\n return newCellGroup;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["scenegraph/group-creater/cell-helper.ts"],"names":[],"mappings":";;;AAEA,+CAA4C;AAY5C,gDAAqD;AACrD,4CAAyC;AACzC,gDAA4C;AAC5C,uDAA8D;AAC9D,uDAA8D;AAC9D,qEAAsE;AACtE,iEAAuE;AACvE,qDAAwD;AACxD,uDAA8D;AAG9D,wDAAuD;AACvD,+CAA+C;AAC/C,kEAA6D;AAC7D,qDAA2D;AAG3D,SAAgB,UAAU,CACxB,IAAsB,EACtB,MAAoB,EACpB,KAAmB,EACnB,GAAW,EACX,GAAW,EACX,QAAgB,EAChB,WAAqB,EACrB,SAAiB,EACjB,UAAkB,EAClB,WAAkB,EAClB,CAAS,EACT,OAAyC,EACzC,SAA0B,EAC1B,YAAgC,EAChC,WAAoB,EACpB,OAAgB,EAChB,KAAgB,EAChB,SAAqB;;IAErB,IAAI,SAAgB,CAAC;IACrB,IAAI,IAAI,KAAK,MAAM,IAAI,IAAI,KAAK,MAAM,EAAE;QACtC,IAAI,I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C;AACtB,CAAC","file":"cell-helper.js","sourcesContent":["import type { Cursor, IThemeSpec } from '@visactor/vrender';\nimport type { ProgressBarStyle } from '../../body-helper/style/ProgressBarStyle';\nimport { regUrl } from '../../tools/global';\nimport type {\n CellRange,\n ChartColumnDefine,\n ColumnDefine,\n ColumnTypeOption,\n ICustomRender,\n ImageColumnDefine,\n MappingRule,\n ProgressbarColumnDefine,\n TextColumnDefine\n} from '../../ts-types';\nimport { dealWithCustom } from '../component/custom';\nimport { Group } from '../graphic/group';\nimport { getProp } from '../utils/get-prop';\nimport { createChartCellGroup } from './cell-type/chart-cell';\nimport { createImageCellGroup } from './cell-type/image-cell';\nimport { createProgressBarCell } from './cell-type/progress-bar-cell';\nimport { createSparkLineCellGroup } from './cell-type/spark-line-cell';\nimport { createCellGroup } from './cell-type/text-cell';\nimport { createVideoCellGroup } from './cell-type/video-cell';\nimport type { ICustomLayoutFuc } from '../../ts-types/customLayout';\nimport type { BaseTableAPI, PivotTableProtected } from '../../ts-types/base-table';\nimport { getStyleTheme } from '../../core/tableHelper';\nimport { isPromise } from '../../tools/helper';\nimport { dealPromiseData } from '../utils/deal-promise-data';\nimport { CartesianAxis } from '../../components/axis/axis';\nimport type { PivotLayoutMap } from '../../layout/pivot-layout';\n\nexport function createCell(\n type: ColumnTypeOption,\n define: ColumnDefine,\n table: BaseTableAPI,\n col: number,\n row: number,\n colWidth: number,\n bgColorFunc: Function,\n cellWidth: number,\n cellHeight: number,\n columnGroup: Group,\n y: number,\n padding: [number, number, number, number],\n textAlign: CanvasTextAlign,\n textBaseline: CanvasTextBaseline,\n mayHaveIcon: boolean,\n isMerge: boolean,\n range: CellRange,\n cellTheme: IThemeSpec\n): Group {\n let cellGroup: Group;\n if (type === 'text' || type === 'link') {\n if (type === 'link') {\n //如果是超链接 颜色按照linkColor绘制 TODO:放到方法_getCellStyle中\n // const columnDefine = table.getHeaderDefine(col, row);\n const cellValue = table.getCellValue(col, row);\n const headerStyle = table._getCellStyle(col, row);\n\n if (\n type === 'link' &&\n (('templateLink' in define && define.templateLink) ||\n !('linkDetect' in define && define.linkDetect) ||\n regUrl.test(cellValue))\n ) {\n if (cellTheme) {\n cellTheme.text.fill = getProp('linkColor', headerStyle, col, row, table);\n (cellTheme as any).group.cursor = 'pointer';\n } else {\n cellTheme = {\n text: {\n fill: getProp('linkColor', headerStyle, col, row, table)\n },\n group: {\n cursor: 'pointer' as Cursor\n }\n };\n }\n }\n }\n // 判断是否有mapping 遍历dataset中mappingRules 但这里还需要根据fieldName来判断\n if (bgColorFunc) {\n const cellValue = table.getCellOriginValue(col, row);\n const bgColor = bgColorFunc(table, cellValue);\n if (bgColor) {\n if (cellTheme) {\n cellTheme.group.fill = bgColor;\n } else {\n cellTheme = {\n group: {\n fill: bgColor\n }\n };\n }\n }\n }\n\n let customElementsGroup;\n let renderDefault = true;\n let customRender;\n let customLayout;\n const cellType = table.getCellType(col, row);\n if (cellType !== 'body') {\n customRender = define?.headerCustomRender;\n customLayout = define?.headerCustomLayout;\n } else {\n customRender = define?.customRender || table.customRender;\n customLayout = define?.customLayout;\n }\n\n if (customLayout || customRender) {\n // const { autoRowHeight } = table.internalProps;\n const customResult = dealWithCustom(\n customLayout,\n customRender,\n col,\n row,\n table.getColWidth(col),\n table.getRowHeight(row),\n false,\n table.heightMode === 'autoHeight',\n table\n );\n customElementsGroup = customResult.elementsGroup;\n renderDefault = customResult.renderDefault;\n }\n cellGroup = createCellGroup(\n table,\n columnGroup,\n 0,\n y,\n col,\n row,\n colWidth,\n cellWidth,\n cellHeight,\n padding,\n textAlign,\n textBaseline,\n mayHaveIcon,\n customElementsGroup,\n renderDefault,\n cellTheme\n );\n if (isMerge) {\n cellGroup.mergeCol = range.end.col;\n cellGroup.mergeRow = range.end.row;\n }\n\n const axisConfig = table.internalProps.layoutMap.getAxisConfigInPivotChart(col, row);\n if (axisConfig) {\n const axis = new CartesianAxis(axisConfig, cellGroup.attribute.width, cellGroup.attribute.height, table);\n cellGroup.clear();\n cellGroup.appendChild(axis.component);\n axis.overlap();\n } else if (table.internalProps.layoutMap.isEmpty(col, row)) {\n cellGroup.clear();\n }\n\n // if ((define as any)?.isAxis && cellType === 'columnHeader') {\n // cellGroup.setAttribute('clip', false);\n // const axis = new CartesianAxis(\n // {\n // orient: 'top',\n // type: 'band',\n // data: ['A', 'B', 'C'],\n // title: {\n // visible: true,\n // text: 'X Axis'\n // }\n // },\n // cellGroup.attribute.width,\n // cellGroup.attribute.height,\n // table\n // );\n // cellGroup.clear();\n // // axis.component.setAttribute('y', 40);\n // cellGroup.appendChild(axis.component);\n // } else if ((define as any)?.isAxis && cellType === 'rowHeader') {\n // cellGroup.setAttribute('clip', false);\n // const axis = new CartesianAxis(\n // {\n // orient: 'left',\n // type: 'linear',\n // range: { min: 0, max: 30 },\n // label: {\n // flush: true\n // },\n // grid: {\n // visible: true\n // },\n // title: {\n // visible: true,\n // text: 'Y Axis'\n // }\n // },\n // cellGroup.attribute.width,\n // cellGroup.attribute.height,\n // table\n // );\n // cellGroup.clear();\n // // axis.component.setAttribute('x', 80);\n // cellGroup.appendChild(axis.component);\n // axis.overlap();\n // }\n } else if (type === 'image') {\n // 创建图片单元格\n cellGroup = createImageCellGroup(\n columnGroup,\n 0,\n y,\n col,\n row,\n table.getColWidth(col),\n table.getRowHeight(row),\n (define as ImageColumnDefine).keepAspectRatio,\n (define as ImageColumnDefine).imageAutoSizing,\n padding,\n textAlign,\n textBaseline,\n table,\n cellTheme\n );\n } else if (type === 'video') {\n // 创建视频单元格\n cellGroup = createVideoCellGroup(\n columnGroup,\n 0,\n y,\n col,\n row,\n table.getColWidth(col),\n table.getRowHeight(row),\n (define as ImageColumnDefine).keepAspectRatio,\n (define as ImageColumnDefine).imageAutoSizing,\n padding,\n textAlign,\n textBaseline,\n table,\n cellTheme\n );\n } else if (type === 'chart') {\n const chartInstance = table.internalProps.layoutMap.getChartInstance(col, row);\n cellGroup = createChartCellGroup(\n null,\n columnGroup,\n 0,\n y,\n col,\n row,\n table.getColWidth(col),\n table.getRowHeight(row),\n padding,\n table.getCellValue(col, row),\n (define as ChartColumnDefine).chartModule,\n table.isPivotChart()\n ? (table.internalProps.layoutMap as PivotLayoutMap).getChartSpec(col, row)\n : (define as ChartColumnDefine).chartSpec,\n chartInstance,\n (table.internalProps.layoutMap as PivotLayoutMap)?.getChartDataId(col, row) ?? 'data',\n table,\n cellTheme\n );\n } else if (type === 'progressbar') {\n const style = table._getCellStyle(col, row) as ProgressBarStyle;\n const value = table.getCellValue(col, row);\n const dataValue = table.getCellOriginValue(col, row);\n // 创建基础文字单元格\n cellGroup = createCellGroup(\n table,\n columnGroup,\n 0,\n y,\n col,\n row,\n colWidth,\n cellWidth,\n cellHeight,\n padding,\n textAlign,\n textBaseline,\n false,\n null,\n true,\n cellTheme\n );\n\n // 创建bar group\n const progressBarGroup = createProgressBarCell(\n define as ProgressbarColumnDefine,\n style,\n colWidth,\n value,\n dataValue,\n col,\n row,\n padding,\n table\n );\n // 进度图插入到文字前,绘制在文字下\n cellGroup.insertBefore(progressBarGroup, cellGroup.firstChild);\n } else if (type === 'sparkline') {\n cellGroup = createSparkLineCellGroup(\n null,\n columnGroup,\n 0,\n y,\n col,\n row,\n cellWidth,\n cellHeight,\n padding,\n table,\n cellTheme\n );\n }\n\n return cellGroup;\n}\n\nexport function updateCell(col: number, row: number, table: BaseTableAPI, addNew?: boolean) {\n // const oldCellGroup = table.scenegraph.getCell(col, row, true);\n const oldCellGroup = table.scenegraph.highPerformanceGetCell(col, row, true);\n\n const type = table.isHeader(col, row)\n ? table._getHeaderLayoutMap(col, row).headerType\n : table.getBodyColumnType(col, row);\n const cellType = table.getCellType(col, row);\n const define = cellType !== 'body' ? table.getHeaderDefine(col, row) : table.getBodyColumnDefine(col, row);\n\n let isMerge;\n let range;\n if (cellType !== 'body' || (define as TextColumnDefine)?.mergeCell) {\n // 只有表头或者column配置合并单元格后再进行信息获取\n range = table.getCellRange(col, row);\n isMerge = range.start.col !== range.end.col || range.start.row !== range.end.row;\n }\n\n let newCellGroup;\n if (isMerge && (col !== range.start.col || row !== range.start.row)) {\n // 合并单元格的非起始单元格不需要绘制\n newCellGroup = new Group({\n x: 0,\n y: addNew ? 0 : oldCellGroup.attribute.y,\n width: 0,\n height: 0,\n visible: false,\n pickable: false\n });\n newCellGroup.role = 'shadow-cell';\n newCellGroup.col = col;\n newCellGroup.row = row;\n newCellGroup.mergeCol = range.start.col;\n newCellGroup.mergeRow = range.start.row;\n\n if (!addNew) {\n oldCellGroup.parent.insertAfter(newCellGroup, oldCellGroup);\n oldCellGroup.parent.removeChild(oldCellGroup);\n }\n } else {\n const mayHaveIcon = cellType !== 'body' ? true : !!define?.icon || !!define?.tree;\n const headerStyle = table._getCellStyle(col, row);\n const cellTheme = getStyleTheme(headerStyle, table, col, row, getProp).theme;\n const padding = cellTheme._vtable.padding;\n const textAlign = cellTheme._vtable.textAlign;\n const textBaseline = cellTheme._vtable.textBaseline;\n\n let bgColorFunc: Function;\n // 判断是否有mapping 遍历dataset中mappingRules\n if ((table.internalProps as PivotTableProtected)?.dataConfig?.mappingRules && cellType === 'body') {\n (table.internalProps as PivotTableProtected)?.dataConfig?.mappingRules?.forEach(\n (mappingRule: MappingRule, i: number) => {\n if (mappingRule.bgColor) {\n bgColorFunc = mappingRule.bgColor.mapping;\n }\n }\n );\n }\n\n let customRender;\n let customLayout;\n if (cellType !== 'body') {\n customRender = define?.headerCustomRender;\n customLayout = define?.headerCustomLayout;\n } else {\n customRender = define?.customRender || table.customRender;\n customLayout = define?.customLayout;\n }\n\n let cellWidth;\n let cellHeight;\n if (range) {\n cellWidth = table.getColsWidth(range.start.col, range.end.col);\n cellHeight = table.getRowsHeight(range.start.row, range.end.row);\n } else {\n cellWidth = table.getColWidth(col);\n cellHeight = table.getRowHeight(row);\n }\n\n // deal with promise data\n const value = table.getCellValue(col, row);\n if (isPromise(value)) {\n // clear cell content sync\n oldCellGroup.removeAllChild();\n\n // update cell content async\n dealPromiseData(\n value,\n table,\n updateCellContent.bind(\n null,\n type,\n define,\n table,\n col,\n row,\n bgColorFunc,\n cellWidth,\n cellHeight,\n oldCellGroup,\n padding,\n textAlign,\n textBaseline,\n mayHaveIcon,\n isMerge,\n range,\n addNew,\n cellTheme\n )\n );\n } else {\n newCellGroup = updateCellContent(\n type,\n define,\n table,\n col,\n row,\n bgColorFunc,\n cellWidth,\n cellHeight,\n oldCellGroup,\n padding,\n textAlign,\n textBaseline,\n mayHaveIcon,\n isMerge,\n range,\n addNew,\n cellTheme\n );\n }\n }\n\n return newCellGroup;\n}\n\nfunction updateCellContent(\n type: ColumnTypeOption,\n define: ColumnDefine,\n table: BaseTableAPI,\n col: number,\n row: number,\n bgColorFunc: Function,\n cellWidth: number,\n cellHeight: number,\n oldCellGroup: Group,\n padding: [number, number, number, number],\n textAlign: CanvasTextAlign,\n textBaseline: CanvasTextBaseline,\n mayHaveIcon: boolean,\n isMerge: boolean,\n range: CellRange,\n addNew: boolean,\n cellTheme?: IThemeSpec\n) {\n const newCellGroup = createCell(\n type,\n define,\n table,\n col,\n row,\n table.getColWidth(col),\n bgColorFunc,\n cellWidth,\n cellHeight,\n // oldCellGroup.parent,\n addNew ? table.scenegraph.getColGroup(col) : oldCellGroup.parent,\n // oldCellGroup.attribute.y,\n addNew ? 0 : oldCellGroup.attribute.y,\n padding,\n textAlign,\n textBaseline,\n mayHaveIcon,\n isMerge,\n range,\n cellTheme\n );\n if (!addNew) {\n oldCellGroup.parent.insertAfter(newCellGroup, oldCellGroup);\n oldCellGroup.parent.removeChild(oldCellGroup);\n\n // update cache\n if (table.scenegraph?.proxy.cellCache.get(col)) {\n table.scenegraph?.proxy.cellCache.set(col, newCellGroup);\n }\n }\n return newCellGroup;\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Group } from '../../graphic/group';
|
|
2
2
|
import type { BaseTableAPI } from '../../../ts-types/base-table';
|
|
3
3
|
import type { IThemeSpec } from '@visactor/vrender';
|
|
4
|
-
export declare function createChartCellGroup(cellGroup: Group | null, columnGroup: Group, xOrigin: number, yOrigin: number, col: number, row: number, width: number, height: number, padding: number[], dataValue: string,
|
|
4
|
+
export declare function createChartCellGroup(cellGroup: Group | null, columnGroup: Group, xOrigin: number, yOrigin: number, col: number, row: number, width: number, height: number, padding: number[], dataValue: string, chartModule: any, chartSpec: any, chartInstance: any, dataId: string | Record<string, string>, table: BaseTableAPI, cellTheme: IThemeSpec): Group;
|
|
@@ -29,11 +29,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
29
29
|
value: !0
|
|
30
30
|
}), exports.createChartCellGroup = void 0;
|
|
31
31
|
|
|
32
|
-
const group_1 = require("../../graphic/group"), chart_1 = require("../../graphic/chart"), registerChartTypes = __importStar(require("../../../
|
|
32
|
+
const group_1 = require("../../graphic/group"), chart_1 = require("../../graphic/chart"), registerChartTypes = __importStar(require("../../../chartModule")), get_prop_1 = require("../../utils/get-prop"), util_1 = require("../../../tools/util");
|
|
33
33
|
|
|
34
|
-
function createChartCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, width, height, padding, dataValue,
|
|
34
|
+
function createChartCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, width, height, padding, dataValue, chartModule, chartSpec, chartInstance, dataId, table, cellTheme) {
|
|
35
35
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
36
|
-
const ClassType = registerChartTypes.get()[
|
|
36
|
+
const ClassType = registerChartTypes.get()[chartModule], headerStyle = table._getCellStyle(col, row), functionalPadding = (0,
|
|
37
37
|
get_prop_1.getFunctionalProp)("padding", headerStyle, col, row, table);
|
|
38
38
|
(0, util_1.isValid)(functionalPadding) && (padding = functionalPadding), cellGroup || ((cellGroup = new group_1.Group({
|
|
39
39
|
x: xOrigin,
|
|
@@ -60,7 +60,7 @@ function createChartCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row
|
|
|
60
60
|
width: width - padding[3] - padding[1],
|
|
61
61
|
height: height - padding[2] - padding[0],
|
|
62
62
|
chartInstance: chartInstance,
|
|
63
|
-
dataId:
|
|
63
|
+
dataId: dataId,
|
|
64
64
|
data: table.getCellValue(col, row),
|
|
65
65
|
cellPadding: padding,
|
|
66
66
|
viewBox: {
|
|
@@ -68,7 +68,8 @@ function createChartCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row
|
|
|
68
68
|
x2: Math.ceil(cellGroup.globalAABBBounds.x1 + width - padding[1] + table.scrollLeft),
|
|
69
69
|
y1: Math.ceil(cellGroup.globalAABBBounds.y1 + padding[0] + table.scrollTop),
|
|
70
70
|
y2: Math.ceil(cellGroup.globalAABBBounds.y1 + height - padding[2] + table.scrollTop)
|
|
71
|
-
}
|
|
71
|
+
},
|
|
72
|
+
axes: table.internalProps.layoutMap.getChartAxes(col, row)
|
|
72
73
|
});
|
|
73
74
|
return cellGroup.appendChild(chartGroup), table.internalProps.layoutMap.setChartInstance(col, row, chartGroup.chartInstance),
|
|
74
75
|
cellGroup;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["scenegraph/group-creater/cell-type/chart-cell.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA4C;AAC5C,+CAA4C;AAC5C,
|
|
1
|
+
{"version":3,"sources":["scenegraph/group-creater/cell-type/chart-cell.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA4C;AAC5C,+CAA4C;AAC5C,yEAA2D;AAC3D,mDAAyD;AACzD,8CAA8C;AAG9C,SAAgB,oBAAoB,CAClC,SAAuB,EACvB,WAAkB,EAClB,OAAe,EACf,OAAe,EACf,GAAW,EACX,GAAW,EACX,KAAa,EACb,MAAc,EACd,OAAiB,EACjB,SAAiB,EACjB,WAAgB,EAChB,SAAc,EACd,aAAkB,EAClB,MAAuC,EACvC,KAAmB,EACnB,SAAqB;;IAGrB,MAAM,cAAc,GAAG,kBAAkB,CAAC,GAAG,EAAE,CAAC;IAChD,MAAM,SA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EAAE,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC;KAO3D,CAAC,CAAC;IACH,SAAS,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAElC,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,gBAAgB,CAAC,GAAG,EAAE,GAAG,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC;IAEnF,OAAO,SAAS,CAAC;AACnB,CAAC;AArFD,oDAqFC","file":"chart-cell.js","sourcesContent":["import { Group } from '../../graphic/group';\nimport { Chart } from '../../graphic/chart';\nimport * as registerChartTypes from '../../../chartModule';\nimport { getFunctionalProp } from '../../utils/get-prop';\nimport { isValid } from '../../../tools/util';\nimport type { BaseTableAPI } from '../../../ts-types/base-table';\nimport type { IThemeSpec } from '@visactor/vrender';\nexport function createChartCellGroup(\n cellGroup: Group | null,\n columnGroup: Group,\n xOrigin: number,\n yOrigin: number,\n col: number,\n row: number,\n width: number,\n height: number,\n padding: number[],\n dataValue: string,\n chartModule: any,\n chartSpec: any,\n chartInstance: any,\n dataId: string | Record<string, string>,\n table: BaseTableAPI,\n cellTheme: IThemeSpec\n) {\n // 获取注册的chart图表类型\n const registerCharts = registerChartTypes.get();\n const ClassType = registerCharts[chartModule];\n const headerStyle = table._getCellStyle(col, row); // to be fixed\n const functionalPadding = getFunctionalProp('padding', headerStyle, col, row, table);\n if (isValid(functionalPadding)) {\n padding = functionalPadding;\n }\n // cell\n if (!cellGroup) {\n cellGroup = new Group({\n x: xOrigin,\n y: yOrigin,\n width,\n height,\n\n // 背景相关,cell背景由cellGroup绘制\n lineWidth: cellTheme?.group?.lineWidth ?? undefined,\n fill: cellTheme?.group?.fill ?? undefined,\n stroke: cellTheme?.group?.stroke ?? undefined,\n strokeArrayWidth: (cellTheme?.group as any)?.strokeArrayWidth ?? undefined,\n strokeArrayColor: (cellTheme?.group as any)?.strokeArrayColor ?? undefined,\n cursor: (cellTheme?.group as any)?.cursor ?? undefined,\n\n lineCap: 'square',\n\n clip: true\n } as any);\n cellGroup.role = 'cell';\n cellGroup.col = col;\n cellGroup.row = row;\n columnGroup.addChild(cellGroup);\n }\n cellGroup.AABBBounds.width(); // TODO 需要底层VRender修改\n // chart\n const chartGroup = new Chart({\n stroke: false,\n x: padding[3],\n y: padding[0],\n canvas: table.canvas,\n spec: chartSpec,\n ClassType,\n width: width - padding[3] - padding[1],\n height: height - padding[2] - padding[0],\n chartInstance,\n dataId,\n data: table.getCellValue(col, row),\n cellPadding: padding,\n viewBox: {\n x1: Math.ceil(cellGroup.globalAABBBounds.x1 + padding[3] + table.scrollLeft),\n x2: Math.ceil(cellGroup.globalAABBBounds.x1 + width - padding[1] + table.scrollLeft),\n y1: Math.ceil(cellGroup.globalAABBBounds.y1 + padding[0] + table.scrollTop),\n y2: Math.ceil(cellGroup.globalAABBBounds.y1 + height - padding[2] + table.scrollTop)\n },\n axes: table.internalProps.layoutMap.getChartAxes(col, row)\n // clipRect: {\n // left: cellGroup.globalAABBBounds.x1 + (table as any).tableX + padding[3],\n // top: cellGroup.globalAABBBounds.y1 + (table as any).tableY + padding[0],\n // width: width - padding[1] - padding[3], //cellGroup.globalAABBBounds.width() - padding[1] - padding[3],\n // height: height - padding[0] - padding[2],\n // },\n });\n cellGroup.appendChild(chartGroup);\n // 将生成的实例存到layoutMap中 共享\n table.internalProps.layoutMap.setChartInstance(col, row, chartGroup.chartInstance);\n\n return cellGroup;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["scenegraph/group-creater/column.ts"],"names":[],"mappings":";;;AAEA,4CAAyC;AACzC,mDAAsD;AAUtD,SAAgB,0BAA0B,CACxC,iBAAwB,EACxB,OAAe,EACf,OAAe,EACf,KAAmB;IAEnB,cAAc,CACZ,iBAAiB,EACjB,OAAO,EACP,OAAO,EACP,CAAC,EACD,KAAK,CAAC,mBAAmB,GAAG,CAAC,EAC7B,CAAC,EACD,KAAK,CAAC,sBAAsB,GAA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a,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,IAAA,mCAAmB,EAC1E,WAAW,EACX,GAAG,EACH,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,KAAK,CAAC,UAAU,CAAC,QAAQ,EACzB,QAAQ,KAAK,cAAc,CAAC,CAAC,CAAC,sBAAsB,aAAtB,sBAAsB,cAAtB,sBAAsB,GAAI,gBAAgB,CAAC,CAAC,CAAC,gBAAgB,EAC3F,KAAK,EACL,QAAQ,EACR,QAAQ,CACT,CAAC;QACF,CAAC,IAAI,aAAa,CAAC;QACnB,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;KACjD;IAED,cAAc,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IACxC,cAAc,CAAC,YAAY,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;AACnD,CAAC;AAnDD,wCAmDC","file":"column.js","sourcesContent":["import type { CellType } from '../../ts-types';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport { Group } from '../graphic/group';\nimport { createComplexColumn } from './column-helper';\n\n/**\n * @description: 处理全部角表头\n * @param {Group} colHeaderGroup 列表头容器Group\n * @param {number} xOrigin x起始坐标\n * @param {number} yOrigin y起始坐标\n * @param {BaseTableAPI} table\n * @return {*}\n */\nexport function createCornerHeaderColGroup(\n cornerHeaderGroup: Group,\n xOrigin: number,\n yOrigin: number,\n table: BaseTableAPI\n) {\n createColGroup(\n cornerHeaderGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n table.rowHeaderLevelCount - 1, // colEnd\n 0, // rowStart\n table.columnHeaderLevelCount - 1, // rowEnd\n 'cornerHeader', // CellType\n table\n );\n}\n\n/**\n * @description: 处理全部列表头\n * @param {Group} colHeaderGroup 列表头容器Group\n * @param {number} xOrigin x起始坐标\n * @param {number} yOrigin y起始坐标\n * @param {BaseTableAPI} table\n * @return {*}\n */\nexport function createColHeaderColGroup(colHeaderGroup: Group, xOrigin: number, yOrigin: number, table: BaseTableAPI) {\n createColGroup(\n colHeaderGroup,\n xOrigin,\n yOrigin,\n table.rowHeaderLevelCount, // colStart\n table.colCount - 1, // colEnd\n 0, // rowStart\n table.columnHeaderLevelCount - 1, // rowEnd\n 'columnHeader', // isHeader\n table\n );\n}\n\n/**\n * @description: 处理全部行表头\n * @param {Group} rowHeaderGroup 行表头容器Group\n * @param {number} xOrigin x起始坐标\n * @param {number} yOrigin y起始坐标\n * @param {BaseTableAPI} table\n * @return {*}\n */\nexport function createRowHeaderColGroup(rowHeaderGroup: Group, xOrigin: number, yOrigin: number, table: BaseTableAPI) {\n createColGroup(\n rowHeaderGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n table.rowHeaderLevelCount - 1, // colEnd\n table.columnHeaderLevelCount, // rowStart\n table.rowCount - 1, // rowEnd\n 'rowHeader', // isHeader\n table\n );\n}\n\n/**\n * @description: 处理内容单元格\n * @param {Group} bodyGroup 内容容器Group\n * @param {number} xOrigin x起始坐标\n * @param {number} yOrigin y起始坐标\n * @param {BaseTableAPI} table\n * @return {*}\n */\nexport function createBodyColGroup(bodyGroup: Group, xOrigin: number, yOrigin: number, table: BaseTableAPI) {\n createColGroup(\n bodyGroup,\n xOrigin,\n yOrigin,\n table.rowHeaderLevelCount, // colStart\n table.colCount - 1, // colEnd\n table.columnHeaderLevelCount, // rowStart\n table.rowCount - 1, // rowEnd\n 'body', // isHeader\n table\n );\n}\n\n/**\n * @description: 生成一个列的场景节点\n * @param {Group} containerGroup 列容器Group\n * @param {number} xOrigin x起始坐标\n * @param {number} yOrigin y起始坐标\n * @param {number} colStart 起始col\n * @param {number} colEnd 结束col\n * @param {number} rowStart 起始row\n * @param {number} rowEnd 结束row\n * @param {boolean} isHeader 是否是表头\n * @param {BaseTableAPI} table\n * @return {*}\n */\nexport function createColGroup(\n containerGroup: Group,\n xOrigin: number,\n yOrigin: number,\n colStart: number,\n colEnd: number,\n rowStart: number,\n rowEnd: number,\n cellType: CellType,\n table: BaseTableAPI,\n rowLimit?: number\n) {\n if (colStart > colEnd || rowStart > rowEnd) {\n return;\n }\n const { layoutMap, defaultRowHeight, defaultHeaderRowHeight, defaultColWidth } = table.internalProps;\n let x = 0;\n let heightMax = 0;\n for (let i = colStart; i <= colEnd; i++) {\n const col = i;\n const colWidth = table.getColWidth(col);\n\n const columnGroup = new Group({\n x: xOrigin + x,\n y: yOrigin,\n width: colWidth,\n height: 0,\n clip: false,\n pickable: false\n });\n columnGroup.role = 'column';\n columnGroup.col = i;\n containerGroup.addChild(columnGroup);\n const { width: default2Width, height: default2Height } = createComplexColumn(\n columnGroup,\n col,\n colWidth,\n rowStart,\n rowEnd,\n table.scenegraph.mergeMap,\n cellType === 'columnHeader' ? defaultHeaderRowHeight ?? defaultRowHeight : defaultRowHeight,\n table,\n cellType,\n rowLimit\n );\n x += default2Width;\n heightMax = Math.max(heightMax, default2Height);\n }\n // 更新containerGroup尺寸\n containerGroup.setAttribute('width', x);\n containerGroup.setAttribute('height', heightMax);\n}\n"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { Group } from '../../graphic/group';
|
|
2
|
+
import type { SceneProxy } from './proxy';
|
|
3
|
+
export declare function createGroupForFirstScreen(cornerHeaderGroup: Group, colHeaderGroup: Group, rowHeaderGroup: Group, rightFrozenGroup: Group, bottomFrozenGroup: Group, bodyGroup: Group, xOrigin: number, yOrigin: number, proxy: SceneProxy): Promise<void>;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __awaiter = this && this.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
4
|
+
return new (P || (P = Promise))((function(resolve, reject) {
|
|
5
|
+
function fulfilled(value) {
|
|
6
|
+
try {
|
|
7
|
+
step(generator.next(value));
|
|
8
|
+
} catch (e) {
|
|
9
|
+
reject(e);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
function rejected(value) {
|
|
13
|
+
try {
|
|
14
|
+
step(generator.throw(value));
|
|
15
|
+
} catch (e) {
|
|
16
|
+
reject(e);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function step(result) {
|
|
20
|
+
var value;
|
|
21
|
+
result.done ? resolve(result.value) : (value = result.value, value instanceof P ? value : new P((function(resolve) {
|
|
22
|
+
resolve(value);
|
|
23
|
+
}))).then(fulfilled, rejected);
|
|
24
|
+
}
|
|
25
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
26
|
+
}));
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
Object.defineProperty(exports, "__esModule", {
|
|
30
|
+
value: !0
|
|
31
|
+
}), exports.createGroupForFirstScreen = void 0;
|
|
32
|
+
|
|
33
|
+
const compute_col_width_1 = require("../../layout/compute-col-width"), compute_row_height_1 = require("../../layout/compute-row-height"), column_1 = require("../column");
|
|
34
|
+
|
|
35
|
+
function createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, rightFrozenGroup, bottomFrozenGroup, bodyGroup, xOrigin, yOrigin, proxy) {
|
|
36
|
+
var _a, _b, _c, _d;
|
|
37
|
+
return __awaiter(this, void 0, void 0, (function*() {
|
|
38
|
+
proxy.setParamsForRow(), proxy.setParamsForColumn(), proxy.table.internalProps._colWidthsMap.clear(),
|
|
39
|
+
proxy.table._clearColRangeWidthsMap(), (0, compute_col_width_1.computeColsWidth)(proxy.table, 0, Math.min(proxy.firstScreenColLimit, proxy.table.colCount - 1)),
|
|
40
|
+
proxy.table.internalProps._rowHeightsMap.clear(), proxy.table._clearRowRangeHeightsMap(),
|
|
41
|
+
(0, compute_row_height_1.computeRowsHeight)(proxy.table, 0, Math.min(proxy.firstScreenRowLimit, proxy.table.rowCount - 1)),
|
|
42
|
+
proxy.table.rightFrozenColCount > 0 && proxy.table.colCount - 1 > proxy.firstScreenColLimit && (0,
|
|
43
|
+
compute_col_width_1.computeColsWidth)(proxy.table, proxy.table.colCount - 1 - proxy.table.rightFrozenColCount + 1, proxy.table.colCount - 1),
|
|
44
|
+
proxy.table.bottomFrozenRowCount > 0 && proxy.table.rowCount - 1 > proxy.firstScreenRowLimit && (0,
|
|
45
|
+
compute_col_width_1.computeColsWidth)(proxy.table, proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount + 1, proxy.table.rowCount - 1),
|
|
46
|
+
proxy.table.scenegraph.colHeaderGroup.setAttribute("x", proxy.table.getFrozenColsWidth()),
|
|
47
|
+
proxy.table.scenegraph.rowHeaderGroup.setAttribute("y", proxy.table.getFrozenRowsHeight()),
|
|
48
|
+
proxy.table.scenegraph.bottomFrozenGroup.setAttribute("x", proxy.table.getFrozenColsWidth()),
|
|
49
|
+
proxy.table.scenegraph.rightFrozenGroup.setAttribute("y", proxy.table.getFrozenRowsHeight()),
|
|
50
|
+
proxy.table.scenegraph.bodyGroup.setAttributes({
|
|
51
|
+
x: proxy.table.getFrozenColsWidth(),
|
|
52
|
+
y: proxy.table.getFrozenRowsHeight()
|
|
53
|
+
}), (0, column_1.createColGroup)(cornerHeaderGroup, xOrigin, yOrigin, 0, proxy.table.rowHeaderLevelCount - 1, 0, proxy.table.columnHeaderLevelCount - 1, "cornerHeader", proxy.table),
|
|
54
|
+
(0, column_1.createColGroup)(colHeaderGroup, xOrigin, yOrigin, proxy.table.rowHeaderLevelCount, Math.min(proxy.firstScreenColLimit, proxy.table.colCount - 1 - proxy.table.rightFrozenColCount), 0, proxy.table.columnHeaderLevelCount - 1, "columnHeader", proxy.table),
|
|
55
|
+
(0, column_1.createColGroup)(rowHeaderGroup, xOrigin, yOrigin, 0, proxy.table.rowHeaderLevelCount - 1, proxy.table.columnHeaderLevelCount, Math.min(proxy.firstScreenRowLimit, proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount), "rowHeader", proxy.table),
|
|
56
|
+
proxy.table.bottomFrozenRowCount > 0 && (0, column_1.createColGroup)(bottomFrozenGroup, xOrigin, yOrigin, proxy.table.rowHeaderLevelCount, Math.min(proxy.firstScreenColLimit, proxy.table.colCount - 1 - proxy.table.rightFrozenColCount), proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount + 1, proxy.table.rowCount - 1, "body", proxy.table),
|
|
57
|
+
proxy.table.rightFrozenColCount > 0 && (0, column_1.createColGroup)(rightFrozenGroup, xOrigin, yOrigin, proxy.table.colCount - 1 - proxy.table.rightFrozenColCount + 1, proxy.table.colCount - 1, proxy.table.columnHeaderLevelCount, Math.min(proxy.firstScreenRowLimit, proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount), "body", proxy.table),
|
|
58
|
+
(0, column_1.createColGroup)(bodyGroup, xOrigin, yOrigin, proxy.table.rowHeaderLevelCount, Math.min(proxy.firstScreenColLimit, proxy.table.colCount - 1 - proxy.table.rightFrozenColCount), proxy.table.columnHeaderLevelCount, Math.min(proxy.firstScreenRowLimit, proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount), "body", proxy.table),
|
|
59
|
+
bodyGroup.firstChild ? (proxy.currentRow = null !== (_b = null === (_a = bodyGroup.firstChild) || void 0 === _a ? void 0 : _a.rowNumber) && void 0 !== _b ? _b : proxy.totalRow,
|
|
60
|
+
proxy.rowEnd = proxy.currentRow, proxy.rowUpdatePos = proxy.rowEnd, proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2),
|
|
61
|
+
proxy.currentCol = null !== (_d = null === (_c = bodyGroup.lastChild) || void 0 === _c ? void 0 : _c.col) && void 0 !== _d ? _d : proxy.totalCol,
|
|
62
|
+
proxy.colEnd = proxy.currentCol, proxy.colUpdatePos = proxy.colEnd, proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2),
|
|
63
|
+
yield proxy.progress()) : (proxy.currentRow = proxy.totalRow, proxy.rowEnd = proxy.currentRow,
|
|
64
|
+
proxy.rowUpdatePos = proxy.rowEnd, proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2),
|
|
65
|
+
proxy.currentCol = proxy.totalCol, proxy.colEnd = proxy.currentCol, proxy.colUpdatePos = proxy.colEnd,
|
|
66
|
+
proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2));
|
|
67
|
+
}));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
exports.createGroupForFirstScreen = createGroupForFirstScreen;
|
|
71
|
+
//# sourceMappingURL=create-group-for-first-screen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["scenegraph/group-creater/progress/create-group-for-first-screen.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,sEAAkE;AAClE,wEAAoE;AACpE,sCAA2C;AAG3C,SAAsB,yBAAyB,CAC7C,iBAAwB,EACxB,cAAqB,EACrB,cAAqB,EACrB,gBAAuB,EACvB,iBAAwB,EACxB,SAAgB,EAChB,OAAe,EACf,OAAe,EACf,KAAiB;;;QAGjB,KAAK,CAAC,eAAe,EAAE,CAAC;QACxB,KAAK,CAAC,kBAAkB,EAAE,CAAC;QAG3B,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;QAChD,KAAK,CAAC,KAAK,CAAC,uBAAuB,EAAE,CAAC;QACtC,IAAA,oCAAgB,EAAC,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,mBAAmB,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC;QAGhG,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC;QACjD,KAAK,CAAC,KAAK,CAAC,wBAAwB,EAAE,CAAC;QACvC,IAAA,sCAAiB,EAAC,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,mBAAmB,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC;QAEjG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AS,CAAC,SAAmB,0CAAE,GAAG,mCAAI,KAAK,CAAC,QAAQ,CAAC;YACzE,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC;YAChC,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC;YAClC,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;YAGtF,MAAM,KAAK,CAAC,QAAQ,EAAE,CAAC;SACxB;;CACF;AA9LD,8DA8LC","file":"create-group-for-first-screen.js","sourcesContent":["import type { Group } from '../../graphic/group';\nimport { computeColsWidth } from '../../layout/compute-col-width';\nimport { computeRowsHeight } from '../../layout/compute-row-height';\nimport { createColGroup } from '../column';\nimport type { SceneProxy } from './proxy';\n\nexport async function createGroupForFirstScreen(\n cornerHeaderGroup: Group,\n colHeaderGroup: Group,\n rowHeaderGroup: Group,\n rightFrozenGroup: Group,\n bottomFrozenGroup: Group,\n bodyGroup: Group,\n xOrigin: number,\n yOrigin: number,\n proxy: SceneProxy\n) {\n // compute parameters\n proxy.setParamsForRow();\n proxy.setParamsForColumn();\n\n // compute colums width in first screen\n proxy.table.internalProps._colWidthsMap.clear();\n proxy.table._clearColRangeWidthsMap();\n computeColsWidth(proxy.table, 0, Math.min(proxy.firstScreenColLimit, proxy.table.colCount - 1));\n\n // compute rows height in first screen\n proxy.table.internalProps._rowHeightsMap.clear();\n proxy.table._clearRowRangeHeightsMap();\n computeRowsHeight(proxy.table, 0, Math.min(proxy.firstScreenRowLimit, proxy.table.rowCount - 1));\n\n if (proxy.table.rightFrozenColCount > 0 && proxy.table.colCount - 1 > proxy.firstScreenColLimit) {\n // compute right frozen row height\n computeColsWidth(\n proxy.table,\n proxy.table.colCount - 1 - proxy.table.rightFrozenColCount + 1,\n proxy.table.colCount - 1\n );\n }\n if (proxy.table.bottomFrozenRowCount > 0 && proxy.table.rowCount - 1 > proxy.firstScreenRowLimit) {\n // compute bottom frozen row height\n computeColsWidth(\n proxy.table,\n proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount + 1,\n proxy.table.rowCount - 1\n );\n }\n\n // update colHeaderGroup rowHeaderGroup bodyGroup position\n proxy.table.scenegraph.colHeaderGroup.setAttribute('x', proxy.table.getFrozenColsWidth());\n proxy.table.scenegraph.rowHeaderGroup.setAttribute('y', proxy.table.getFrozenRowsHeight());\n proxy.table.scenegraph.bottomFrozenGroup.setAttribute('x', proxy.table.getFrozenColsWidth());\n proxy.table.scenegraph.rightFrozenGroup.setAttribute('y', proxy.table.getFrozenRowsHeight());\n proxy.table.scenegraph.bodyGroup.setAttributes({\n x: proxy.table.getFrozenColsWidth(),\n y: proxy.table.getFrozenRowsHeight()\n });\n\n // create cornerHeaderGroup\n createColGroup(\n cornerHeaderGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n proxy.table.rowHeaderLevelCount - 1, // colEnd\n 0, // rowStart\n proxy.table.columnHeaderLevelCount - 1, // rowEnd\n 'cornerHeader', // CellType\n proxy.table\n );\n\n // create colHeaderGroup\n createColGroup(\n colHeaderGroup,\n xOrigin,\n yOrigin,\n proxy.table.rowHeaderLevelCount, // colStart\n Math.min(proxy.firstScreenColLimit, proxy.table.colCount - 1 - proxy.table.rightFrozenColCount), // colEnd\n 0, // rowStart\n proxy.table.columnHeaderLevelCount - 1, // rowEnd\n 'columnHeader', // isHeader\n proxy.table\n );\n\n // create rowHeaderGroup\n createColGroup(\n rowHeaderGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n proxy.table.rowHeaderLevelCount - 1, // colEnd\n proxy.table.columnHeaderLevelCount, // rowStart\n Math.min(proxy.firstScreenRowLimit, proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount), // rowEnd\n 'rowHeader', // isHeader\n proxy.table\n );\n\n if (proxy.table.bottomFrozenRowCount > 0) {\n // create bottomFrozenGroup\n createColGroup(\n bottomFrozenGroup,\n xOrigin,\n yOrigin,\n proxy.table.rowHeaderLevelCount, // colStart\n Math.min(proxy.firstScreenColLimit, proxy.table.colCount - 1 - proxy.table.rightFrozenColCount), // colEnd\n proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount + 1, // rowStart\n proxy.table.rowCount - 1, // rowEnd\n 'body', // isHeader\n proxy.table\n );\n // proxy.table.scenegraph.bottomFrozenGroup.setAttribute(\n // 'y',\n // proxy.table.tableNoFrameHeight - proxy.table.scenegraph.bottomFrozenGroup.attribute.height\n // );\n // proxy.table.scenegraph.leftBottomCellGroup.setAttributes({\n // visible: true,\n // y: proxy.table.tableNoFrameHeight - proxy.table.scenegraph.bottomFrozenGroup.attribute.height,\n // height: proxy.table.scenegraph.bottomFrozenGroup.attribute.height,\n // width: proxy.table.getFrozenColsWidth()\n // });\n // proxy.table.scenegraph.rightBottomCellGroup.setAttributes({\n // visible: true,\n // y: proxy.table.tableNoFrameHeight - proxy.table.scenegraph.bottomFrozenGroup.attribute.height,\n // height: proxy.table.scenegraph.bottomFrozenGroup.attribute.height\n // });\n }\n\n if (proxy.table.rightFrozenColCount > 0) {\n // create rightFrozenGroup\n createColGroup(\n rightFrozenGroup,\n xOrigin,\n yOrigin,\n proxy.table.colCount - 1 - proxy.table.rightFrozenColCount + 1, // colStart\n proxy.table.colCount - 1, // colEnd\n proxy.table.columnHeaderLevelCount, // rowStart\n Math.min(proxy.firstScreenRowLimit, proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount), // rowEnd\n 'body', // isHeader\n proxy.table\n );\n // proxy.table.scenegraph.rightFrozenGroup.setAttribute(\n // 'x',\n // proxy.table.tableNoFrameWidth - proxy.table.scenegraph.rightFrozenGroup.attribute.width\n // );\n // proxy.table.scenegraph.rightTopCellGroup.setAttributes({\n // visible: true,\n // x: proxy.table.tableNoFrameWidth - proxy.table.scenegraph.rightFrozenGroup.attribute.width,\n // width: proxy.table.scenegraph.rightFrozenGroup.attribute.width,\n // height: proxy.table.getFrozenRowsHeight()\n // });\n // proxy.table.scenegraph.rightBottomCellGroup.setAttributes({\n // visible: true,\n // x: proxy.table.tableNoFrameWidth - proxy.table.scenegraph.rightFrozenGroup.attribute.width,\n // width: proxy.table.scenegraph.rightFrozenGroup.attribute.width\n // });\n }\n\n // create bodyGroup\n createColGroup(\n bodyGroup,\n xOrigin,\n yOrigin,\n proxy.table.rowHeaderLevelCount, // colStart\n Math.min(proxy.firstScreenColLimit, proxy.table.colCount - 1 - proxy.table.rightFrozenColCount), // colEnd\n proxy.table.columnHeaderLevelCount, // rowStart\n Math.min(proxy.firstScreenRowLimit, proxy.table.rowCount - 1 - proxy.table.bottomFrozenRowCount), // rowEnd\n 'body', // isHeader\n proxy.table\n );\n\n // update progress information\n if (!bodyGroup.firstChild) {\n // 无数据\n proxy.currentRow = proxy.totalRow;\n proxy.rowEnd = proxy.currentRow;\n proxy.rowUpdatePos = proxy.rowEnd;\n proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);\n\n proxy.currentCol = proxy.totalCol;\n proxy.colEnd = proxy.currentCol;\n proxy.colUpdatePos = proxy.colEnd;\n proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);\n } else {\n proxy.currentRow = (bodyGroup.firstChild as Group)?.rowNumber ?? proxy.totalRow;\n proxy.rowEnd = proxy.currentRow;\n proxy.rowUpdatePos = proxy.rowEnd;\n proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);\n\n proxy.currentCol = (bodyGroup.lastChild as Group)?.col ?? proxy.totalCol;\n proxy.colEnd = proxy.currentCol;\n proxy.colUpdatePos = proxy.colEnd;\n proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);\n\n // 开始异步任务\n await proxy.progress();\n }\n}\n"]}
|
|
@@ -39,7 +39,7 @@ export declare class SceneProxy {
|
|
|
39
39
|
constructor(table: BaseTableAPI);
|
|
40
40
|
setParamsForColumn(): void;
|
|
41
41
|
setParamsForRow(): void;
|
|
42
|
-
createGroupForFirstScreen(cornerHeaderGroup: Group, colHeaderGroup: Group, rowHeaderGroup: Group, bodyGroup: Group, xOrigin: number, yOrigin: number): Promise<void>;
|
|
42
|
+
createGroupForFirstScreen(cornerHeaderGroup: Group, colHeaderGroup: Group, rowHeaderGroup: Group, rightFrozenGroup: Group, bottomFrozenGroup: Group, bodyGroup: Group, xOrigin: number, yOrigin: number): Promise<void>;
|
|
43
43
|
createColGroupForFirstScreen(rowHeaderGroup: Group, bodyGroup: Group, xOrigin: number, yOrigin: number, table: BaseTableAPI): Promise<void>;
|
|
44
44
|
progress(): Promise<void>;
|
|
45
45
|
createRow(): Promise<void>;
|
|
@@ -30,7 +30,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
30
30
|
value: !0
|
|
31
31
|
}), exports.SceneProxy = void 0;
|
|
32
32
|
|
|
33
|
-
const group_1 = require("../../graphic/group"), compute_col_width_1 = require("../../layout/compute-col-width"), compute_row_height_1 = require("../../layout/compute-row-height"), empty_group_1 = require("../../utils/empty-group"), column_1 = require("../column"), column_helper_1 = require("../column-helper"), dynamic_set_x_1 = require("./update-position/dynamic-set-x"), dynamic_set_y_1 = require("./update-position/dynamic-set-y"), update_auto_row_1 = require("./update-position/update-auto-row");
|
|
33
|
+
const group_1 = require("../../graphic/group"), compute_col_width_1 = require("../../layout/compute-col-width"), compute_row_height_1 = require("../../layout/compute-row-height"), empty_group_1 = require("../../utils/empty-group"), column_1 = require("../column"), column_helper_1 = require("../column-helper"), create_group_for_first_screen_1 = require("./create-group-for-first-screen"), dynamic_set_x_1 = require("./update-position/dynamic-set-x"), dynamic_set_y_1 = require("./update-position/dynamic-set-y"), update_auto_row_1 = require("./update-position/update-auto-row");
|
|
34
34
|
|
|
35
35
|
class SceneProxy {
|
|
36
36
|
constructor(table) {
|
|
@@ -40,7 +40,7 @@ class SceneProxy {
|
|
|
40
40
|
this.table.options.maintainedDataCount && (this.rowLimit = this.table.options.maintainedDataCount);
|
|
41
41
|
}
|
|
42
42
|
setParamsForColumn() {
|
|
43
|
-
this.bodyLeftCol = this.table.rowHeaderLevelCount, this.bodyRightCol = this.table.colCount - 1;
|
|
43
|
+
this.bodyLeftCol = this.table.rowHeaderLevelCount, this.bodyRightCol = this.table.colCount - 1 - this.table.rightFrozenColCount;
|
|
44
44
|
const totalActualBodyColCount = Math.min(this.colLimit, this.bodyRightCol - this.bodyLeftCol + 1);
|
|
45
45
|
this.totalCol = this.bodyLeftCol + totalActualBodyColCount - 1, this.colStart = this.bodyLeftCol;
|
|
46
46
|
const defaultColWidth = this.table.defaultColWidth;
|
|
@@ -53,8 +53,7 @@ class SceneProxy {
|
|
|
53
53
|
this.colUpdatePos = this.bodyRightCol;
|
|
54
54
|
}
|
|
55
55
|
setParamsForRow() {
|
|
56
|
-
this.bodyTopRow = this.table.columnHeaderLevelCount, this.bodyBottomRow = this.table.rowCount - 1
|
|
57
|
-
this.bodyLeftCol = 0, this.bodyRightCol = this.table.colCount - 1;
|
|
56
|
+
this.bodyTopRow = this.table.columnHeaderLevelCount, this.bodyBottomRow = this.table.rowCount - 1 - this.table.bottomFrozenRowCount;
|
|
58
57
|
const totalActualBodyRowCount = Math.min(this.rowLimit, this.bodyBottomRow - this.bodyTopRow + 1);
|
|
59
58
|
this.totalRow = this.bodyTopRow + totalActualBodyRowCount - 1, this.rowStart = this.bodyTopRow;
|
|
60
59
|
const defaultRowHeight = this.table.defaultRowHeight;
|
|
@@ -66,30 +65,9 @@ class SceneProxy {
|
|
|
66
65
|
this.firstScreenRowLimit = this.bodyTopRow + Math.ceil(heightLimit / defaultRowHeight),
|
|
67
66
|
this.rowUpdatePos = this.bodyBottomRow;
|
|
68
67
|
}
|
|
69
|
-
createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, bodyGroup, xOrigin, yOrigin) {
|
|
70
|
-
var _a, _b, _c, _d;
|
|
68
|
+
createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, rightFrozenGroup, bottomFrozenGroup, bodyGroup, xOrigin, yOrigin) {
|
|
71
69
|
return __awaiter(this, void 0, void 0, (function*() {
|
|
72
|
-
|
|
73
|
-
this.table._clearColRangeWidthsMap(), (0, compute_col_width_1.computeColsWidth)(this.table, 0, Math.min(this.firstScreenColLimit, this.table.colCount - 1)),
|
|
74
|
-
this.table.internalProps._rowHeightsMap.clear(), this.table._clearRowRangeHeightsMap(),
|
|
75
|
-
(0, compute_row_height_1.computeRowsHeight)(this.table, 0, Math.min(this.firstScreenRowLimit, this.table.rowCount - 1)),
|
|
76
|
-
this.table.scenegraph.colHeaderGroup.setAttribute("x", this.table.getFrozenColsWidth()),
|
|
77
|
-
this.table.scenegraph.rowHeaderGroup.setAttribute("y", this.table.getFrozenRowsHeight()),
|
|
78
|
-
this.table.scenegraph.bodyGroup.setAttributes({
|
|
79
|
-
x: this.table.getFrozenColsWidth(),
|
|
80
|
-
y: this.table.getFrozenRowsHeight()
|
|
81
|
-
}), (0, column_1.createColGroup)(cornerHeaderGroup, xOrigin, yOrigin, 0, this.table.rowHeaderLevelCount - 1, 0, this.table.columnHeaderLevelCount - 1, "cornerHeader", this.table),
|
|
82
|
-
(0, column_1.createColGroup)(colHeaderGroup, xOrigin, yOrigin, this.table.rowHeaderLevelCount, Math.min(this.firstScreenColLimit, this.table.colCount - 1), 0, this.table.columnHeaderLevelCount - 1, "columnHeader", this.table),
|
|
83
|
-
(0, column_1.createColGroup)(rowHeaderGroup, xOrigin, yOrigin, 0, this.table.rowHeaderLevelCount - 1, this.table.columnHeaderLevelCount, Math.min(this.firstScreenRowLimit, this.table.rowCount - 1), "rowHeader", this.table),
|
|
84
|
-
(0, column_1.createColGroup)(bodyGroup, xOrigin, yOrigin, this.table.rowHeaderLevelCount, Math.min(this.firstScreenColLimit, this.table.colCount - 1), this.table.columnHeaderLevelCount, Math.min(this.firstScreenRowLimit, this.table.rowCount - 1), "body", this.table),
|
|
85
|
-
bodyGroup.firstChild ? (this.currentRow = null !== (_b = null === (_a = bodyGroup.firstChild) || void 0 === _a ? void 0 : _a.rowNumber) && void 0 !== _b ? _b : this.totalRow,
|
|
86
|
-
this.rowEnd = this.currentRow, this.rowUpdatePos = this.rowEnd, this.referenceRow = this.rowStart + Math.floor((this.rowEnd - this.rowStart) / 2),
|
|
87
|
-
this.currentCol = null !== (_d = null === (_c = bodyGroup.lastChild) || void 0 === _c ? void 0 : _c.col) && void 0 !== _d ? _d : this.totalCol,
|
|
88
|
-
this.colEnd = this.currentCol, this.colUpdatePos = this.colEnd, this.referenceCol = this.colStart + Math.floor((this.colEnd - this.colStart) / 2),
|
|
89
|
-
yield this.progress()) : (this.currentRow = this.totalRow, this.rowEnd = this.currentRow,
|
|
90
|
-
this.rowUpdatePos = this.rowEnd, this.referenceRow = this.rowStart + Math.floor((this.rowEnd - this.rowStart) / 2),
|
|
91
|
-
this.currentCol = this.totalCol, this.colEnd = this.currentCol, this.colUpdatePos = this.colEnd,
|
|
92
|
-
this.referenceCol = this.colStart + Math.floor((this.colEnd - this.colStart) / 2));
|
|
70
|
+
yield (0, create_group_for_first_screen_1.createGroupForFirstScreen)(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, rightFrozenGroup, bottomFrozenGroup, bodyGroup, xOrigin, yOrigin, this);
|
|
93
71
|
}));
|
|
94
72
|
}
|
|
95
73
|
createColGroupForFirstScreen(rowHeaderGroup, bodyGroup, xOrigin, yOrigin, table) {
|
|
@@ -130,10 +108,26 @@ class SceneProxy {
|
|
|
130
108
|
}
|
|
131
109
|
createRowCellGroup(onceCount) {
|
|
132
110
|
const endRow = Math.min(this.totalRow, this.currentRow + onceCount);
|
|
133
|
-
(0, compute_row_height_1.computeRowsHeight)(this.table, this.currentRow + 1, endRow)
|
|
111
|
+
if ((0, compute_row_height_1.computeRowsHeight)(this.table, this.currentRow + 1, endRow),
|
|
112
|
+
this.table.rowHeaderLevelCount) {
|
|
113
|
+
let maxHeight = 0;
|
|
114
|
+
for (let col = 0; col < this.table.rowHeaderLevelCount; col++) {
|
|
115
|
+
const colGroup = this.table.scenegraph.getColGroup(col), cellType = "rowHeader", {height: height} = (0,
|
|
116
|
+
column_helper_1.createComplexColumn)(colGroup, col, colGroup.attribute.width, this.currentRow + 1, endRow, this.table.scenegraph.mergeMap, this.table.internalProps.defaultRowHeight, this.table, cellType);
|
|
117
|
+
maxHeight = Math.max(maxHeight, height), this.table.scenegraph.rowHeaderGroup.setAttribute("height", maxHeight);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
if (this.table.rightFrozenColCount) {
|
|
121
|
+
let maxHeight = 0;
|
|
122
|
+
for (let col = this.table.colCount - this.table.rightFrozenColCount; col < this.table.colCount; col++) {
|
|
123
|
+
const colGroup = this.table.scenegraph.getColGroup(col), cellType = "rowHeader", {height: height} = (0,
|
|
124
|
+
column_helper_1.createComplexColumn)(colGroup, col, colGroup.attribute.width, this.currentRow + 1, endRow, this.table.scenegraph.mergeMap, this.table.internalProps.defaultRowHeight, this.table, cellType);
|
|
125
|
+
maxHeight = Math.max(maxHeight, height), this.table.scenegraph.rightFrozenGroup.setAttribute("height", maxHeight);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
134
128
|
let maxHeight = 0;
|
|
135
129
|
for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {
|
|
136
|
-
const colGroup = this.table.scenegraph.getColGroup(col), cellType =
|
|
130
|
+
const colGroup = this.table.scenegraph.getColGroup(col), cellType = "body", {height: height} = (0,
|
|
137
131
|
column_helper_1.createComplexColumn)(colGroup, col, colGroup.attribute.width, this.currentRow + 1, endRow, this.table.scenegraph.mergeMap, this.table.internalProps.defaultRowHeight, this.table, cellType);
|
|
138
132
|
maxHeight = Math.max(maxHeight, height);
|
|
139
133
|
}
|
|
@@ -180,12 +174,12 @@ class SceneProxy {
|
|
|
180
174
|
}
|
|
181
175
|
updateCellGroups(count) {
|
|
182
176
|
const distRow = Math.min(this.bodyBottomRow, this.rowUpdatePos + count);
|
|
183
|
-
this.table.
|
|
177
|
+
"autoHeight" === this.table.heightMode && (0, compute_row_height_1.computeRowsHeight)(this.table, this.rowUpdatePos, distRow);
|
|
184
178
|
for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) for (let row = this.rowUpdatePos; row <= distRow; row++) {
|
|
185
179
|
const cellGroup = this.highPerformanceGetCell(col, row);
|
|
186
180
|
this.updateCellGroupContent(cellGroup);
|
|
187
181
|
}
|
|
188
|
-
this.table.
|
|
182
|
+
"autoHeight" === this.table.heightMode && (0, update_auto_row_1.updateAutoRow)(this.bodyLeftCol, this.bodyRightCol, this.rowUpdatePos, distRow, this.table, this.rowUpdateDirection),
|
|
189
183
|
this.rowUpdatePos = distRow + 1;
|
|
190
184
|
}
|
|
191
185
|
updateColCellGroupsAsync() {
|
|
@@ -222,22 +216,22 @@ class SceneProxy {
|
|
|
222
216
|
this.highPerformanceGetCell(col, row).needUpdate = !0;
|
|
223
217
|
}
|
|
224
218
|
let syncTopRow, syncBottomRow;
|
|
225
|
-
this.table.
|
|
219
|
+
"autoHeight" === this.table.heightMode ? (syncTopRow = this.rowStart, syncBottomRow = this.rowEnd) : (syncTopRow = Math.max(this.bodyTopRow, this.screenTopRow - 2 * this.screenRowCount),
|
|
226
220
|
syncBottomRow = Math.min(this.bodyBottomRow, this.screenTopRow + 3 * this.screenRowCount)),
|
|
227
|
-
console.log("sort更新同步范围", syncTopRow, syncBottomRow), this.table.
|
|
221
|
+
console.log("sort更新同步范围", syncTopRow, syncBottomRow), "autoHeight" === this.table.heightMode && (0,
|
|
228
222
|
compute_row_height_1.computeRowsHeight)(this.table, syncTopRow, syncBottomRow);
|
|
229
223
|
for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) for (let row = syncTopRow; row <= syncBottomRow; row++) {
|
|
230
224
|
const cellGroup = this.highPerformanceGetCell(col, row);
|
|
231
225
|
this.updateCellGroupContent(cellGroup);
|
|
232
226
|
}
|
|
233
227
|
if (console.log("updateAutoRow", this.rowEnd > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? "down" : "up"),
|
|
234
|
-
this.table.
|
|
228
|
+
"autoHeight" === this.table.heightMode && (0, update_auto_row_1.updateAutoRow)(this.bodyLeftCol, this.bodyRightCol, syncTopRow, syncBottomRow, this.table, this.rowEnd > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? "down" : "up"),
|
|
235
229
|
this.rowUpdatePos = this.rowStart, this.rowUpdateDirection = this.rowEnd > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? "down" : "up",
|
|
236
230
|
this.rowEnd === this.table.scenegraph.proxy.bodyBottomRow && this.rowStart === this.table.scenegraph.proxy.bodyTopRow) ; else if (this.rowEnd === this.table.scenegraph.proxy.bodyBottomRow) {
|
|
237
231
|
const top = this.table.getAllRowsHeight() - this.table.scenegraph.height;
|
|
238
232
|
this.updateBody(top);
|
|
239
233
|
} else this.rowStart === this.table.scenegraph.proxy.bodyTopRow && this.updateBody(0);
|
|
240
|
-
this.table.
|
|
234
|
+
"autoHeight" !== this.table.heightMode && (yield this.progress());
|
|
241
235
|
}));
|
|
242
236
|
}
|
|
243
237
|
highPerformanceGetCell(col, row, rowStart = this.rowStart, rowEnd = this.rowEnd, getShadow) {
|