@visactor/vtable 0.9.1 → 0.9.2-alpha.1
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 +68 -0
- package/cjs/PivotChart.js +427 -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/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/cjs/{menu → 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/{es → cjs/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/cjs/{tooltip → 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/{es → cjs/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/cjs/{tooltip → 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 +19 -6
- package/cjs/core/BaseTable.js +103 -44
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/TABLE_EVENT_TYPE.d.ts +3 -0
- package/cjs/core/TABLE_EVENT_TYPE.js +4 -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.d.ts +12 -19
- package/cjs/dataset/dataset.js +168 -196
- 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 +8 -5
- 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/sparkline-event.js.map +1 -1
- package/cjs/event/util.js +0 -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/index.js +2 -1
- package/cjs/layout/pivot-chart/get-axis-config.d.ts +2 -0
- package/cjs/layout/pivot-chart/get-axis-config.js +118 -0
- package/cjs/layout/pivot-chart/get-axis-config.js.map +1 -0
- package/cjs/layout/pivot-chart/get-chart-spec.d.ts +4 -0
- package/cjs/layout/pivot-chart/get-chart-spec.js +118 -0
- package/cjs/layout/pivot-chart/get-chart-spec.js.map +1 -0
- package/cjs/layout/pivot-header-layout.d.ts +13 -5
- package/cjs/layout/pivot-header-layout.js +68 -12
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/pivot-layout.d.ts +55 -8
- package/cjs/layout/pivot-layout.js +419 -89
- 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 +40 -0
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/cjs/render/layout/container.js +13 -0
- package/cjs/render/layout/container.js.map +1 -1
- 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 +3 -0
- package/cjs/scenegraph/graphic/chart.js +21 -6
- package/cjs/scenegraph/graphic/chart.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render.js +15 -3
- package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/cjs/scenegraph/graphic/text.js +5 -5
- package/cjs/scenegraph/graphic/text.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.d.ts +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +21 -12
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.d.ts +2 -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/cell-type/image-cell.d.ts +1 -1
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js +1 -2
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.d.ts +2 -1
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js +2 -3
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/text-cell.d.ts +1 -2
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js +6 -18
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/video-cell.d.ts +1 -1
- package/cjs/scenegraph/group-creater/cell-type/video-cell.js +1 -2
- package/cjs/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/column-helper.js +9 -30
- package/cjs/scenegraph/group-creater/column-helper.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 +31 -12
- package/cjs/scenegraph/group-creater/progress/proxy.js +117 -128
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.d.ts +2 -0
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +112 -0
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -0
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.d.ts +2 -0
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +109 -0
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -0
- package/cjs/scenegraph/group-creater/progress/update-position/update-auto-row.d.ts +2 -0
- package/cjs/scenegraph/group-creater/progress/update-position/update-auto-row.js +24 -0
- package/cjs/scenegraph/group-creater/progress/update-position/update-auto-row.js.map +1 -0
- package/cjs/scenegraph/layout/compute-col-width.d.ts +9 -1
- package/cjs/scenegraph/layout/compute-col-width.js +33 -23
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.d.ts +3 -0
- package/cjs/scenegraph/layout/compute-row-height.js +173 -0
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -0
- 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 +4 -3
- 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 +4 -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 +48 -5
- package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +13 -5
- package/cjs/scenegraph/scenegraph.js +163 -56
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/stick-text/index.d.ts +1 -0
- package/cjs/scenegraph/stick-text/index.js +23 -7
- package/cjs/scenegraph/stick-text/index.js.map +1 -1
- package/cjs/scenegraph/style/frame-border.js +1 -5
- package/cjs/scenegraph/style/frame-border.js.map +1 -1
- package/cjs/scenegraph/utils/text-icon-layout.d.ts +2 -1
- package/cjs/scenegraph/utils/text-icon-layout.js +6 -5
- package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/cjs/state/hover/col.js +4 -4
- package/cjs/state/hover/col.js.map +1 -1
- package/cjs/state/state.js +1 -1
- package/cjs/state/state.js.map +1 -1
- package/cjs/themes/DEFAULT.js +1 -2
- package/cjs/tools/LimitPromiseQueue.js +2 -1
- package/cjs/tools/NumberMap.d.ts +1 -0
- package/cjs/tools/NumberMap.js +3 -0
- package/cjs/tools/NumberMap.js.map +1 -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/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 +41 -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/events.d.ts +100 -83
- package/cjs/ts-types/events.js.map +1 -1
- package/cjs/ts-types/list-table/layout-map/api.d.ts +4 -0
- package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
- package/cjs/ts-types/new-data-set.d.ts +18 -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/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/dist/vtable.js +29113 -17684
- 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 +68 -0
- package/es/PivotChart.js +437 -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/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/es/{menu → 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/{cjs → es/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/es/{tooltip → 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/{cjs → es/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/es/{tooltip → 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 +19 -6
- package/es/core/BaseTable.js +107 -46
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/TABLE_EVENT_TYPE.d.ts +3 -0
- package/es/core/TABLE_EVENT_TYPE.js +4 -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.d.ts +12 -19
- package/es/dataset/dataset.js +161 -187
- 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 -5
- 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/sparkline-event.js.map +1 -1
- package/es/event/util.js +1 -2
- 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/index.js +2 -1
- package/es/layout/pivot-chart/get-axis-config.d.ts +2 -0
- package/es/layout/pivot-chart/get-axis-config.js +110 -0
- package/es/layout/pivot-chart/get-axis-config.js.map +1 -0
- package/es/layout/pivot-chart/get-chart-spec.d.ts +4 -0
- package/es/layout/pivot-chart/get-chart-spec.js +109 -0
- package/es/layout/pivot-chart/get-chart-spec.js.map +1 -0
- package/es/layout/pivot-header-layout.d.ts +13 -5
- package/es/layout/pivot-header-layout.js +67 -11
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/pivot-layout.d.ts +55 -8
- package/es/layout/pivot-layout.js +422 -87
- 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 +40 -0
- package/es/layout/simple-header-layout.js.map +1 -1
- package/es/render/layout/container.js +13 -0
- package/es/render/layout/container.js.map +1 -1
- 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 +3 -0
- package/es/scenegraph/graphic/chart.js +22 -5
- package/es/scenegraph/graphic/chart.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render.js +15 -3
- package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/es/scenegraph/graphic/text.js +5 -5
- package/es/scenegraph/graphic/text.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.d.ts +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +22 -10
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.d.ts +2 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.js +5 -6
- package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/image-cell.d.ts +1 -1
- package/es/scenegraph/group-creater/cell-type/image-cell.js +0 -3
- package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.d.ts +2 -1
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.js +1 -4
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/text-cell.d.ts +1 -2
- package/es/scenegraph/group-creater/cell-type/text-cell.js +3 -17
- package/es/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/video-cell.d.ts +1 -1
- package/es/scenegraph/group-creater/cell-type/video-cell.js +0 -3
- package/es/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
- package/es/scenegraph/group-creater/column-helper.js +8 -29
- package/es/scenegraph/group-creater/column-helper.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 +31 -12
- package/es/scenegraph/group-creater/progress/proxy.js +124 -130
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.d.ts +2 -0
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +104 -0
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -0
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.d.ts +2 -0
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +102 -0
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -0
- package/es/scenegraph/group-creater/progress/update-position/update-auto-row.d.ts +2 -0
- package/es/scenegraph/group-creater/progress/update-position/update-auto-row.js +18 -0
- package/es/scenegraph/group-creater/progress/update-position/update-auto-row.js.map +1 -0
- package/es/scenegraph/layout/compute-col-width.d.ts +9 -1
- package/es/scenegraph/layout/compute-col-width.js +31 -22
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.d.ts +3 -0
- package/es/scenegraph/layout/compute-row-height.js +175 -0
- package/es/scenegraph/layout/compute-row-height.js.map +1 -0
- 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 +4 -2
- 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 +4 -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 +45 -4
- package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +13 -5
- package/es/scenegraph/scenegraph.js +165 -58
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/stick-text/index.d.ts +1 -0
- package/es/scenegraph/stick-text/index.js +21 -5
- package/es/scenegraph/stick-text/index.js.map +1 -1
- package/es/scenegraph/style/frame-border.js +1 -5
- package/es/scenegraph/style/frame-border.js.map +1 -1
- package/es/scenegraph/utils/text-icon-layout.d.ts +2 -1
- package/es/scenegraph/utils/text-icon-layout.js +4 -4
- package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/es/state/hover/col.js +4 -4
- package/es/state/hover/col.js.map +1 -1
- package/es/state/state.js +1 -1
- package/es/state/state.js.map +1 -1
- package/es/themes/DEFAULT.js +1 -2
- package/es/tools/LimitPromiseQueue.js +2 -1
- package/es/tools/NumberMap.d.ts +1 -0
- package/es/tools/NumberMap.js +3 -0
- package/es/tools/NumberMap.js.map +1 -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/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 +41 -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/events.d.ts +100 -83
- package/es/ts-types/events.js.map +1 -1
- package/es/ts-types/list-table/layout-map/api.d.ts +4 -0
- package/es/ts-types/list-table/layout-map/api.js.map +1 -1
- package/es/ts-types/new-data-set.d.ts +18 -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/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/package.json +13 -7
- 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/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/dist/vtable.es5.js +0 -53155
- package/dist/vtable.es5.min.js +0 -3
- 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/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/{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/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
|
@@ -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":"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","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"]}
|
|
@@ -1,43 +1,62 @@
|
|
|
1
1
|
import type { BaseTableAPI } from '../../../ts-types/base-table';
|
|
2
|
-
import
|
|
2
|
+
import { Group } from '../../graphic/group';
|
|
3
3
|
export declare class SceneProxy {
|
|
4
4
|
table: BaseTableAPI;
|
|
5
|
+
mode: 'column' | 'row' | 'pivot';
|
|
6
|
+
rowLimit: number;
|
|
5
7
|
currentRow: number;
|
|
6
8
|
totalRow: number;
|
|
7
|
-
rowLimit: number;
|
|
8
9
|
yLimitTop: number;
|
|
9
10
|
yLimitBottom: number;
|
|
10
|
-
accurateY: number;
|
|
11
11
|
rowStart: number;
|
|
12
12
|
rowEnd: number;
|
|
13
13
|
referenceRow: number;
|
|
14
14
|
bodyTopRow: number;
|
|
15
15
|
bodyBottomRow: number;
|
|
16
|
-
bodyLeftCol: number;
|
|
17
|
-
bodyRightCol: number;
|
|
18
16
|
screenRowCount: number;
|
|
19
17
|
firstScreenRowLimit: number;
|
|
20
18
|
taskRowCount: number;
|
|
21
19
|
rowUpdatePos: number;
|
|
22
20
|
rowUpdateDirection: 'up' | 'down';
|
|
23
21
|
screenTopRow: number;
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
colLimit: number;
|
|
23
|
+
bodyLeftCol: number;
|
|
24
|
+
bodyRightCol: number;
|
|
25
|
+
totalCol: number;
|
|
26
|
+
colStart: number;
|
|
27
|
+
colEnd: number;
|
|
28
|
+
taskColCount: number;
|
|
29
|
+
xLimitLeft: number;
|
|
30
|
+
xLimitRight: number;
|
|
31
|
+
screenColCount: number;
|
|
32
|
+
firstScreenColLimit: number;
|
|
33
|
+
colUpdatePos: number;
|
|
34
|
+
currentCol: number;
|
|
35
|
+
referenceCol: number;
|
|
36
|
+
screenLeftCol: number;
|
|
37
|
+
colUpdateDirection: 'left' | 'right';
|
|
26
38
|
cellCache: Map<number, Group>;
|
|
27
39
|
constructor(table: BaseTableAPI);
|
|
28
|
-
|
|
40
|
+
setParamsForColumn(): void;
|
|
41
|
+
setParamsForRow(): void;
|
|
42
|
+
createGroupForFirstScreen(cornerHeaderGroup: Group, colHeaderGroup: Group, rowHeaderGroup: Group, rightFrozenGroup: Group, bottomFrozenGroup: Group, bodyGroup: Group, xOrigin: number, yOrigin: number): Promise<void>;
|
|
29
43
|
createColGroupForFirstScreen(rowHeaderGroup: Group, bodyGroup: Group, xOrigin: number, yOrigin: number, table: BaseTableAPI): Promise<void>;
|
|
30
44
|
progress(): Promise<void>;
|
|
31
45
|
createRow(): Promise<void>;
|
|
46
|
+
createCol(): Promise<void>;
|
|
32
47
|
createRowCellGroup(onceCount: number): void;
|
|
48
|
+
createColGroup(onceCount: number): void;
|
|
33
49
|
setY(y: number): Promise<void>;
|
|
50
|
+
setX(x: number): Promise<void>;
|
|
34
51
|
dynamicSetY(y: number): Promise<void>;
|
|
52
|
+
dynamicSetX(x: number): Promise<void>;
|
|
35
53
|
updateBody(y: number): void;
|
|
36
|
-
|
|
37
|
-
updateCellGroupsAsync(): Promise<void>;
|
|
54
|
+
updateRowCellGroupsAsync(): Promise<void>;
|
|
38
55
|
updateCellGroups(count: number): void;
|
|
56
|
+
updateColCellGroupsAsync(): Promise<void>;
|
|
57
|
+
updateColGroups(count: number): void;
|
|
39
58
|
updateCellGroupPosition(cellGroup: Group, newRow: number, y: number): void;
|
|
40
|
-
updateCellGroupContent(cellGroup: Group):
|
|
59
|
+
updateCellGroupContent(cellGroup: Group): Group;
|
|
41
60
|
sortCell(): Promise<void>;
|
|
42
|
-
highPerformanceGetCell(col: number, row: number, rowStart?: number, rowEnd?: number): Group;
|
|
61
|
+
highPerformanceGetCell(col: number, row: number, rowStart?: number, rowEnd?: number, getShadow?: boolean): Group;
|
|
43
62
|
}
|
|
@@ -30,21 +30,34 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
30
30
|
value: !0
|
|
31
31
|
}), exports.SceneProxy = void 0;
|
|
32
32
|
|
|
33
|
-
const
|
|
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) {
|
|
37
|
-
this.
|
|
38
|
-
this.rowEnd = 0, this.referenceRow = 0, this.screenTopRow = 0, this.
|
|
39
|
-
this.table = table, this.table.
|
|
37
|
+
this.mode = "column", this.rowLimit = 1e3, this.currentRow = 0, this.rowStart = 0,
|
|
38
|
+
this.rowEnd = 0, this.referenceRow = 0, this.screenTopRow = 0, this.colLimit = 1e3,
|
|
39
|
+
this.screenLeftCol = 0, this.cellCache = new Map, this.table = table, this.table.internalProps.transpose ? this.mode = "row" : this.table.isPivotTable() && (this.mode = "pivot"),
|
|
40
|
+
this.table.options.maintainedDataCount && (this.rowLimit = this.table.options.maintainedDataCount);
|
|
40
41
|
}
|
|
41
|
-
|
|
42
|
-
this.
|
|
43
|
-
|
|
42
|
+
setParamsForColumn() {
|
|
43
|
+
this.bodyLeftCol = this.table.rowHeaderLevelCount, this.bodyRightCol = this.table.colCount - 1 - this.table.rightFrozenColCount;
|
|
44
|
+
const totalActualBodyColCount = Math.min(this.colLimit, this.bodyRightCol - this.bodyLeftCol + 1);
|
|
45
|
+
this.totalCol = this.bodyLeftCol + totalActualBodyColCount - 1, this.colStart = this.bodyLeftCol;
|
|
46
|
+
const defaultColWidth = this.table.defaultColWidth;
|
|
47
|
+
this.taskColCount = 1 * Math.ceil(this.table.tableNoFrameWidth / defaultColWidth);
|
|
48
|
+
const totalBodyWidth = defaultColWidth * totalActualBodyColCount, totalWidth = defaultColWidth * (this.bodyRightCol - this.bodyLeftCol + 1);
|
|
49
|
+
this.xLimitLeft = totalBodyWidth / 2, this.xLimitRight = totalWidth - totalBodyWidth / 2;
|
|
50
|
+
const widthLimit = 5 * this.table.tableNoFrameWidth;
|
|
51
|
+
this.screenColCount = Math.ceil(this.table.tableNoFrameWidth / defaultColWidth),
|
|
52
|
+
this.firstScreenColLimit = this.bodyLeftCol + Math.ceil(widthLimit / defaultColWidth),
|
|
53
|
+
this.colUpdatePos = this.bodyRightCol;
|
|
54
|
+
}
|
|
55
|
+
setParamsForRow() {
|
|
56
|
+
this.bodyTopRow = this.table.columnHeaderLevelCount, this.bodyBottomRow = this.table.rowCount - 1 - this.table.bottomFrozenRowCount;
|
|
44
57
|
const totalActualBodyRowCount = Math.min(this.rowLimit, this.bodyBottomRow - this.bodyTopRow + 1);
|
|
45
58
|
this.totalRow = this.bodyTopRow + totalActualBodyRowCount - 1, this.rowStart = this.bodyTopRow;
|
|
46
59
|
const defaultRowHeight = this.table.defaultRowHeight;
|
|
47
|
-
this.taskRowCount =
|
|
60
|
+
this.taskRowCount = 1 * Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight);
|
|
48
61
|
const totalBodyHeight = defaultRowHeight * totalActualBodyRowCount, totalHeight = defaultRowHeight * (this.bodyBottomRow - this.bodyTopRow + 1);
|
|
49
62
|
this.yLimitTop = totalBodyHeight / 2, this.yLimitBottom = totalHeight - totalBodyHeight / 2;
|
|
50
63
|
const heightLimit = 5 * this.table.tableNoFrameHeight;
|
|
@@ -52,10 +65,16 @@ class SceneProxy {
|
|
|
52
65
|
this.firstScreenRowLimit = this.bodyTopRow + Math.ceil(heightLimit / defaultRowHeight),
|
|
53
66
|
this.rowUpdatePos = this.bodyBottomRow;
|
|
54
67
|
}
|
|
68
|
+
createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, rightFrozenGroup, bottomFrozenGroup, bodyGroup, xOrigin, yOrigin) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, (function*() {
|
|
70
|
+
yield (0, create_group_for_first_screen_1.createGroupForFirstScreen)(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, rightFrozenGroup, bottomFrozenGroup, bodyGroup, xOrigin, yOrigin, this);
|
|
71
|
+
}));
|
|
72
|
+
}
|
|
55
73
|
createColGroupForFirstScreen(rowHeaderGroup, bodyGroup, xOrigin, yOrigin, table) {
|
|
56
74
|
var _a, _b;
|
|
57
75
|
return __awaiter(this, void 0, void 0, (function*() {
|
|
58
|
-
this.
|
|
76
|
+
this.setParamsForRow(), this.setParamsForColumn(), (0, compute_row_height_1.computeRowsHeight)(table, this.table.columnHeaderLevelCount, Math.min(this.firstScreenRowLimit, table.rowCount - 1)),
|
|
77
|
+
(0, column_1.createColGroup)(rowHeaderGroup, xOrigin, yOrigin, 0, table.rowHeaderLevelCount - 1, table.columnHeaderLevelCount, table.rowCount - 1, "rowHeader", table, this.firstScreenRowLimit),
|
|
59
78
|
(0, column_1.createColGroup)(bodyGroup, xOrigin, yOrigin, table.rowHeaderLevelCount, table.colCount - 1, table.columnHeaderLevelCount, table.rowCount - 1, "body", table, this.firstScreenRowLimit),
|
|
60
79
|
bodyGroup.firstChild ? (this.currentRow = null !== (_b = null === (_a = bodyGroup.firstChild) || void 0 === _a ? void 0 : _a.rowNumber) && void 0 !== _b ? _b : this.totalRow,
|
|
61
80
|
this.rowEnd = this.currentRow, this.rowUpdatePos = this.rowEnd, this.referenceRow = Math.floor((this.rowEnd - this.rowStart) / 2),
|
|
@@ -66,10 +85,12 @@ class SceneProxy {
|
|
|
66
85
|
progress() {
|
|
67
86
|
return __awaiter(this, void 0, void 0, (function*() {
|
|
68
87
|
return new Promise(((resolve, reject) => {
|
|
69
|
-
setTimeout((() => {
|
|
70
|
-
this.
|
|
71
|
-
this.progress())
|
|
72
|
-
|
|
88
|
+
setTimeout((() => __awaiter(this, void 0, void 0, (function*() {
|
|
89
|
+
this.colUpdatePos < this.colEnd ? (yield this.updateColCellGroupsAsync(), yield this.progress()) : this.rowUpdatePos < this.rowEnd ? (yield this.updateRowCellGroupsAsync(),
|
|
90
|
+
yield this.progress()) : this.currentCol < this.totalCol ? (yield this.createCol(),
|
|
91
|
+
yield this.progress()) : this.currentRow < this.totalRow && (yield this.createRow(),
|
|
92
|
+
yield this.progress()), resolve();
|
|
93
|
+
}))), 0);
|
|
73
94
|
}));
|
|
74
95
|
}));
|
|
75
96
|
}
|
|
@@ -79,116 +100,115 @@ class SceneProxy {
|
|
|
79
100
|
this.createRowCellGroup(this.taskRowCount));
|
|
80
101
|
}));
|
|
81
102
|
}
|
|
103
|
+
createCol() {
|
|
104
|
+
return __awaiter(this, void 0, void 0, (function*() {
|
|
105
|
+
this.taskColCount && (console.log("createCol", this.currentCol, this.currentCol + this.taskColCount),
|
|
106
|
+
this.createColGroup(this.taskRowCount));
|
|
107
|
+
}));
|
|
108
|
+
}
|
|
82
109
|
createRowCellGroup(onceCount) {
|
|
83
110
|
const endRow = Math.min(this.totalRow, this.currentRow + onceCount);
|
|
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
|
+
}
|
|
84
128
|
let maxHeight = 0;
|
|
85
129
|
for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {
|
|
86
|
-
const colGroup = this.table.scenegraph.getColGroup(col), cellType =
|
|
130
|
+
const colGroup = this.table.scenegraph.getColGroup(col), cellType = "body", {height: height} = (0,
|
|
87
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);
|
|
88
132
|
maxHeight = Math.max(maxHeight, height);
|
|
89
133
|
}
|
|
90
|
-
this.table.scenegraph.bodyGroup.setAttribute("height", maxHeight), this.
|
|
91
|
-
this.
|
|
92
|
-
this.
|
|
93
|
-
|
|
134
|
+
this.table.scenegraph.bodyGroup.setAttribute("height", maxHeight), this.currentRow = endRow,
|
|
135
|
+
this.rowEnd = endRow, this.rowUpdatePos = this.rowEnd, this.referenceRow = this.rowStart + Math.floor((endRow - this.rowStart) / 2),
|
|
136
|
+
this.table.scenegraph.updateContainer(), this.table.scenegraph.updateBorderSizeAndPosition();
|
|
137
|
+
}
|
|
138
|
+
createColGroup(onceCount) {
|
|
139
|
+
const endCol = Math.min(this.totalCol, this.currentCol + onceCount);
|
|
140
|
+
(0, compute_col_width_1.computeColsWidth)(this.table, this.currentCol + 1, endCol);
|
|
141
|
+
const lastColumnGroup = this.table.scenegraph.bodyGroup.lastChild instanceof group_1.Group ? this.table.scenegraph.bodyGroup.lastChild : this.table.scenegraph.bodyGroup.lastChild._prev, xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width, yOrigin = lastColumnGroup.attribute.y;
|
|
142
|
+
(0, column_1.createColGroup)(this.table.scenegraph.bodyGroup, xOrigin, yOrigin, this.currentCol + 1, endCol, this.rowStart, this.rowEnd, "body", this.table),
|
|
143
|
+
this.currentCol = endCol, this.colEnd = endCol, this.colUpdatePos = this.colEnd,
|
|
144
|
+
this.referenceCol = this.colStart + Math.floor((endCol - this.colStart) / 2), console.log("async", this.referenceCol, this.colStart, this.colEnd),
|
|
145
|
+
this.table.scenegraph.updateContainer(), this.table.scenegraph.updateBorderSizeAndPosition();
|
|
94
146
|
}
|
|
95
147
|
setY(y) {
|
|
96
148
|
return __awaiter(this, void 0, void 0, (function*() {
|
|
97
149
|
y < this.yLimitTop && this.rowStart === this.bodyTopRow || y > this.yLimitBottom && this.rowEnd === this.bodyBottomRow ? this.table.scenegraph.setBodyAndRowHeaderY(-y) : this.dynamicSetY(y);
|
|
98
150
|
}));
|
|
99
151
|
}
|
|
100
|
-
|
|
152
|
+
setX(x) {
|
|
101
153
|
return __awaiter(this, void 0, void 0, (function*() {
|
|
102
|
-
|
|
103
|
-
if (!screenTop) return;
|
|
104
|
-
const screenTopRow = screenTop.row;
|
|
105
|
-
this.y = y, this.screenTopRow = screenTopRow;
|
|
106
|
-
const deltaRow = screenTopRow - this.referenceRow;
|
|
107
|
-
deltaRow > 0 ? (this.moveCell(deltaRow, "up", screenTopRow), this.updateBody(y)) : deltaRow < 0 ? (this.moveCell(-deltaRow, "down", screenTopRow),
|
|
108
|
-
this.updateBody(y)) : this.updateBody(y), this.table.scenegraph.updateNextFrame();
|
|
154
|
+
x < this.xLimitLeft && this.colStart === this.bodyLeftCol || x > this.xLimitRight && this.colEnd === this.bodyRightCol ? this.table.scenegraph.setBodyAndColHeaderX(-x) : this.dynamicSetX(x);
|
|
109
155
|
}));
|
|
110
156
|
}
|
|
111
|
-
|
|
112
|
-
this
|
|
157
|
+
dynamicSetY(y) {
|
|
158
|
+
return __awaiter(this, void 0, void 0, (function*() {
|
|
159
|
+
(0, dynamic_set_y_1.dynamicSetY)(y, this);
|
|
160
|
+
}));
|
|
113
161
|
}
|
|
114
|
-
|
|
162
|
+
dynamicSetX(x) {
|
|
115
163
|
return __awaiter(this, void 0, void 0, (function*() {
|
|
116
|
-
|
|
117
|
-
count < this.rowEnd - this.rowStart) {
|
|
118
|
-
const startRow = "up" === direction ? this.rowStart : this.rowEnd - count + 1, endRow = "up" === direction ? this.rowStart + count - 1 : this.rowEnd;
|
|
119
|
-
for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {
|
|
120
|
-
const colGroup = this.table.scenegraph.getColGroup(col);
|
|
121
|
-
for (let row = startRow; row <= endRow; row++) if ("up" === direction) {
|
|
122
|
-
const cellGroup = colGroup.firstChild;
|
|
123
|
-
this.updateCellGroupPosition(cellGroup, colGroup.lastChild.row + 1, colGroup.lastChild.attribute.y + colGroup.lastChild.attribute.height),
|
|
124
|
-
colGroup.appendChild(cellGroup);
|
|
125
|
-
} else {
|
|
126
|
-
const cellGroup = colGroup.lastChild;
|
|
127
|
-
this.updateCellGroupPosition(cellGroup, colGroup.firstChild.row - 1, colGroup.firstChild.attribute.y - cellGroup.attribute.height),
|
|
128
|
-
colGroup.insertBefore(cellGroup, colGroup.firstChild);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
const distStartRow = "up" === direction ? this.rowEnd + 1 : this.rowStart - count, distEndRow = "up" === direction ? this.rowEnd + count : this.rowStart - 1, syncTopRow = Math.max(this.bodyTopRow, screenTopRow - 2 * this.screenRowCount), syncBottomRow = Math.min(this.bodyBottomRow, screenTopRow + 3 * this.screenRowCount);
|
|
132
|
-
for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) for (let row = syncTopRow; row <= syncBottomRow; row++) {
|
|
133
|
-
const cellGroup = this.highPerformanceGetCell(col, row, distStartRow, distEndRow);
|
|
134
|
-
this.updateCellGroupContent(cellGroup);
|
|
135
|
-
}
|
|
136
|
-
this.table.internalProps.autoRowHeight && updateAutoRow(this.bodyLeftCol, this.bodyRightCol, syncTopRow, syncBottomRow, this.table, direction),
|
|
137
|
-
this.rowStart = "up" === direction ? this.rowStart + count : this.rowStart - count,
|
|
138
|
-
this.rowEnd = "up" === direction ? this.rowEnd + count : this.rowEnd - count, this.currentRow = "up" === direction ? this.currentRow + count : this.currentRow - count,
|
|
139
|
-
this.totalRow = "up" === direction ? this.totalRow + count : this.totalRow - count,
|
|
140
|
-
this.referenceRow = this.rowStart + Math.floor((this.rowEnd - this.rowStart) / 2),
|
|
141
|
-
this.rowUpdatePos = distStartRow, this.rowUpdateDirection = direction, console.log("move end proxy", this.rowStart, this.rowEnd),
|
|
142
|
-
console.log("move end cell", this.table.scenegraph.bodyGroup.firstChild.firstChild.row, this.table.scenegraph.bodyGroup.firstChild.lastChild.row),
|
|
143
|
-
this.table.scenegraph.stage.render(), yield this.progress();
|
|
144
|
-
} else {
|
|
145
|
-
const distStartRow = "up" === direction ? this.rowStart + count : this.rowStart - count, distEndRow = "up" === direction ? this.rowEnd + count : this.rowEnd - count, distStartRowY = this.table.getRowsHeight(this.bodyTopRow, distStartRow - 1);
|
|
146
|
-
for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {
|
|
147
|
-
this.table.scenegraph.getColGroup(col).forEachChildren(((cellGroup, index) => {
|
|
148
|
-
this.updateCellGroupPosition(cellGroup, "up" === direction ? cellGroup.row + count : cellGroup.row - count, 0 === index ? distStartRowY : cellGroup._prev.attribute.y + cellGroup._prev.attribute.height);
|
|
149
|
-
}));
|
|
150
|
-
}
|
|
151
|
-
let syncTopRow, syncBottomRow;
|
|
152
|
-
this.table.internalProps.autoRowHeight ? (syncTopRow = distStartRow, syncBottomRow = distEndRow) : (syncTopRow = Math.max(this.bodyTopRow, screenTopRow - 2 * this.screenRowCount),
|
|
153
|
-
syncBottomRow = Math.min(this.bodyBottomRow, screenTopRow + 3 * this.screenRowCount)),
|
|
154
|
-
console.log("更新同步范围", syncTopRow, syncBottomRow);
|
|
155
|
-
for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) for (let row = syncTopRow; row <= syncBottomRow; row++) {
|
|
156
|
-
const cellGroup = this.highPerformanceGetCell(col, row, distStartRow, distEndRow);
|
|
157
|
-
this.updateCellGroupContent(cellGroup);
|
|
158
|
-
}
|
|
159
|
-
console.log("updateAutoRow", distEndRow > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? "down" : "up"),
|
|
160
|
-
this.table.internalProps.autoRowHeight && updateAutoRow(this.bodyLeftCol, this.bodyRightCol, syncTopRow, syncBottomRow, this.table, distEndRow > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? "down" : "up"),
|
|
161
|
-
this.rowStart = distStartRow, this.rowEnd = distEndRow, this.currentRow = "up" === direction ? this.currentRow + count : this.currentRow - count,
|
|
162
|
-
this.totalRow = "up" === direction ? this.totalRow + count : this.totalRow - count,
|
|
163
|
-
this.referenceRow = this.rowStart + Math.floor((this.rowEnd - this.rowStart) / 2),
|
|
164
|
-
this.rowUpdatePos = this.rowStart, this.rowUpdateDirection = distEndRow > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? "down" : "up",
|
|
165
|
-
console.log("move total end proxy", this.rowStart, this.rowEnd), console.log("move total end cell", this.table.scenegraph.bodyGroup.firstChild.firstChild.row, this.table.scenegraph.bodyGroup.firstChild.lastChild.row),
|
|
166
|
-
this.table.internalProps.autoRowHeight || (yield this.progress());
|
|
167
|
-
}
|
|
164
|
+
(0, dynamic_set_x_1.dynamicSetX)(x, this);
|
|
168
165
|
}));
|
|
169
166
|
}
|
|
170
|
-
|
|
167
|
+
updateBody(y) {
|
|
168
|
+
this.table.scenegraph.setBodyAndRowHeaderY(-y);
|
|
169
|
+
}
|
|
170
|
+
updateRowCellGroupsAsync() {
|
|
171
171
|
return __awaiter(this, void 0, void 0, (function*() {
|
|
172
172
|
this.updateCellGroups(this.taskRowCount);
|
|
173
173
|
}));
|
|
174
174
|
}
|
|
175
175
|
updateCellGroups(count) {
|
|
176
176
|
const distRow = Math.min(this.bodyBottomRow, this.rowUpdatePos + count);
|
|
177
|
-
|
|
177
|
+
"autoHeight" === this.table.heightMode && (0, compute_row_height_1.computeRowsHeight)(this.table, this.rowUpdatePos, distRow);
|
|
178
178
|
for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) for (let row = this.rowUpdatePos; row <= distRow; row++) {
|
|
179
179
|
const cellGroup = this.highPerformanceGetCell(col, row);
|
|
180
180
|
this.updateCellGroupContent(cellGroup);
|
|
181
181
|
}
|
|
182
|
-
this.table.
|
|
182
|
+
"autoHeight" === this.table.heightMode && (0, update_auto_row_1.updateAutoRow)(this.bodyLeftCol, this.bodyRightCol, this.rowUpdatePos, distRow, this.table, this.rowUpdateDirection),
|
|
183
183
|
this.rowUpdatePos = distRow + 1;
|
|
184
184
|
}
|
|
185
|
+
updateColCellGroupsAsync() {
|
|
186
|
+
return __awaiter(this, void 0, void 0, (function*() {
|
|
187
|
+
this.updateColGroups(this.taskRowCount);
|
|
188
|
+
}));
|
|
189
|
+
}
|
|
190
|
+
updateColGroups(count) {
|
|
191
|
+
const distCol = Math.min(this.bodyRightCol, this.colUpdatePos + count);
|
|
192
|
+
for (let col = this.colUpdatePos; col <= distCol; col++) {
|
|
193
|
+
const colGroup = this.table.scenegraph.getColGroup(col);
|
|
194
|
+
if (colGroup) {
|
|
195
|
+
let cellGroup = colGroup.firstChild;
|
|
196
|
+
for (;cellGroup; ) {
|
|
197
|
+
cellGroup = this.updateCellGroupContent(cellGroup)._next;
|
|
198
|
+
}
|
|
199
|
+
colGroup.needUpdate = !1;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
this.colUpdatePos = distCol + 1;
|
|
203
|
+
}
|
|
185
204
|
updateCellGroupPosition(cellGroup, newRow, y) {
|
|
186
205
|
cellGroup.row = newRow, cellGroup.setAttribute("y", y), cellGroup.needUpdate = !0,
|
|
187
206
|
cellGroup.needUpdateForAutoRowHeight = !0;
|
|
188
207
|
}
|
|
189
208
|
updateCellGroupContent(cellGroup) {
|
|
190
|
-
cellGroup.needUpdate
|
|
191
|
-
cellGroup.
|
|
209
|
+
if (!cellGroup.needUpdate) return cellGroup;
|
|
210
|
+
const newCellGroup = this.table.scenegraph.updateCellContent(cellGroup.col, cellGroup.row);
|
|
211
|
+
return cellGroup.needUpdate = !1, newCellGroup || cellGroup;
|
|
192
212
|
}
|
|
193
213
|
sortCell() {
|
|
194
214
|
return __awaiter(this, void 0, void 0, (function*() {
|
|
@@ -196,73 +216,42 @@ class SceneProxy {
|
|
|
196
216
|
this.highPerformanceGetCell(col, row).needUpdate = !0;
|
|
197
217
|
}
|
|
198
218
|
let syncTopRow, syncBottomRow;
|
|
199
|
-
this.table.
|
|
219
|
+
"autoHeight" === this.table.heightMode ? (syncTopRow = this.rowStart, syncBottomRow = this.rowEnd) : (syncTopRow = Math.max(this.bodyTopRow, this.screenTopRow - 2 * this.screenRowCount),
|
|
200
220
|
syncBottomRow = Math.min(this.bodyBottomRow, this.screenTopRow + 3 * this.screenRowCount)),
|
|
201
|
-
console.log("sort更新同步范围", syncTopRow, syncBottomRow)
|
|
221
|
+
console.log("sort更新同步范围", syncTopRow, syncBottomRow), "autoHeight" === this.table.heightMode && (0,
|
|
222
|
+
compute_row_height_1.computeRowsHeight)(this.table, syncTopRow, syncBottomRow);
|
|
202
223
|
for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) for (let row = syncTopRow; row <= syncBottomRow; row++) {
|
|
203
224
|
const cellGroup = this.highPerformanceGetCell(col, row);
|
|
204
225
|
this.updateCellGroupContent(cellGroup);
|
|
205
226
|
}
|
|
206
227
|
if (console.log("updateAutoRow", this.rowEnd > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? "down" : "up"),
|
|
207
|
-
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"),
|
|
208
229
|
this.rowUpdatePos = this.rowStart, this.rowUpdateDirection = this.rowEnd > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? "down" : "up",
|
|
209
230
|
this.rowEnd === this.table.scenegraph.proxy.bodyBottomRow && this.rowStart === this.table.scenegraph.proxy.bodyTopRow) ; else if (this.rowEnd === this.table.scenegraph.proxy.bodyBottomRow) {
|
|
210
231
|
const top = this.table.getAllRowsHeight() - this.table.scenegraph.height;
|
|
211
232
|
this.updateBody(top);
|
|
212
233
|
} else this.rowStart === this.table.scenegraph.proxy.bodyTopRow && this.updateBody(0);
|
|
213
|
-
this.table.
|
|
234
|
+
"autoHeight" !== this.table.heightMode && (yield this.progress());
|
|
214
235
|
}));
|
|
215
236
|
}
|
|
216
|
-
highPerformanceGetCell(col, row, rowStart = this.rowStart, rowEnd = this.rowEnd) {
|
|
237
|
+
highPerformanceGetCell(col, row, rowStart = this.rowStart, rowEnd = this.rowEnd, getShadow) {
|
|
217
238
|
if (row < rowStart || row > rowEnd) return empty_group_1.emptyGroup;
|
|
239
|
+
if (row < this.rowStart || row > this.rowEnd || col < this.colStart || col > this.colEnd) return empty_group_1.emptyGroup;
|
|
218
240
|
if (this.cellCache.get(col)) {
|
|
219
241
|
const cacheCellGoup = this.cellCache.get(col);
|
|
220
242
|
if ((cacheCellGoup._next || cacheCellGoup._prev) && Math.abs(cacheCellGoup.row - row) < row) {
|
|
221
243
|
let cellGroup = getCellByCache(cacheCellGoup, row);
|
|
222
|
-
return cellGroup || (cellGroup = this.table.scenegraph.getCell(col, row
|
|
223
|
-
cellGroup;
|
|
244
|
+
return cellGroup || (cellGroup = this.table.scenegraph.getCell(col, row, getShadow)),
|
|
245
|
+
cellGroup.row && this.cellCache.set(col, cellGroup), cellGroup;
|
|
224
246
|
}
|
|
225
|
-
const cellGroup = this.table.scenegraph.getCell(col, row);
|
|
247
|
+
const cellGroup = this.table.scenegraph.getCell(col, row, getShadow);
|
|
226
248
|
return cellGroup.row && this.cellCache.set(col, cellGroup), cellGroup;
|
|
227
249
|
}
|
|
228
|
-
const cellGroup = this.table.scenegraph.getCell(col, row);
|
|
250
|
+
const cellGroup = this.table.scenegraph.getCell(col, row, getShadow);
|
|
229
251
|
return cellGroup.row && this.cellCache.set(col, cellGroup), cellGroup;
|
|
230
252
|
}
|
|
231
253
|
}
|
|
232
254
|
|
|
233
|
-
function updateAutoRow(colStart, colEnd, rowStart, rowEnd, table, direction = "up") {
|
|
234
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
235
|
-
for (let row = rowStart; row <= rowEnd; row++) {
|
|
236
|
-
let maxRowHeight = 0;
|
|
237
|
-
for (let col = colStart; col <= colEnd; col++) {
|
|
238
|
-
const cellGroup = table.scenegraph.getCell(col, row);
|
|
239
|
-
if (!cellGroup.row) continue;
|
|
240
|
-
const text = cellGroup.getChildByName("text") || cellGroup.getChildByName("content"), headerStyle = table._getCellStyle(col, row), padding = (0,
|
|
241
|
-
padding_1.getQuadProps)((0, get_prop_1.getProp)("padding", headerStyle, col, row, table)), height = text.AABBBounds.height() + (padding[0] + padding[2]);
|
|
242
|
-
maxRowHeight = Math.max(maxRowHeight, height), cellGroup.needUpdateForAutoRowHeight = !1;
|
|
243
|
-
}
|
|
244
|
-
for (let col = colStart; col <= colEnd; col++) {
|
|
245
|
-
const cellGroup = table.scenegraph.getCell(col, row);
|
|
246
|
-
(0, update_height_1.updateCellHeightForColumn)(table.scenegraph, cellGroup, col, row, maxRowHeight, 0, !1);
|
|
247
|
-
}
|
|
248
|
-
table.setRowHeight(row, maxRowHeight, !0);
|
|
249
|
-
}
|
|
250
|
-
if ("up" === direction) for (let col = colStart; col <= colEnd; col++) for (let row = rowStart; row <= rowEnd; row++) {
|
|
251
|
-
const cellGroup = table.scenegraph.getCell(col, row);
|
|
252
|
-
if (!cellGroup.row) continue;
|
|
253
|
-
let y;
|
|
254
|
-
y = cellGroup._prev ? (null !== (_b = null === (_a = cellGroup._prev) || void 0 === _a ? void 0 : _a.attribute.y) && void 0 !== _b ? _b : 0) + (null !== (_d = null === (_c = cellGroup._prev) || void 0 === _c ? void 0 : _c.attribute.height) && void 0 !== _d ? _d : 0) : table.getRowsHeight(table.columnHeaderLevelCount, cellGroup.row - 1),
|
|
255
|
-
cellGroup.setAttribute("y", y);
|
|
256
|
-
} else for (let col = colStart; col <= colEnd; col++) for (let row = rowEnd; row >= rowStart; row--) {
|
|
257
|
-
const cellGroup = table.scenegraph.getCell(col, row);
|
|
258
|
-
if (!cellGroup.row) continue;
|
|
259
|
-
let y;
|
|
260
|
-
cellGroup._next ? y = (null !== (_f = null === (_e = cellGroup._next) || void 0 === _e ? void 0 : _e.attribute.y) && void 0 !== _f ? _f : 0) - (null !== (_g = cellGroup.attribute.height) && void 0 !== _g ? _g : 0) : (y = table.getRowsHeight(table.columnHeaderLevelCount, cellGroup.row) - (null !== (_h = cellGroup.attribute.height) && void 0 !== _h ? _h : 0),
|
|
261
|
-
console.log("估计位置", table.getRowsHeight(table.columnHeaderLevelCount, cellGroup.row))),
|
|
262
|
-
cellGroup.setAttribute("y", y);
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
|
|
266
255
|
function getCellByCache(cacheCellGroup, row) {
|
|
267
256
|
return cacheCellGroup ? cacheCellGroup.row === row ? cacheCellGroup : cacheCellGroup.row > row ? getCellByCache(cacheCellGroup._prev, row) : getCellByCache(cacheCellGroup._next, row) : null;
|
|
268
257
|
}
|