@visactor/vtable 0.15.0-alpha.4 → 0.15.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 +4 -2
- package/cjs/ListTable.js +38 -15
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.js +25 -14
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable.js +15 -7
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/body-helper/body-helper.js.map +1 -1
- package/cjs/body-helper/style/CheckboxStyle.js.map +1 -1
- package/cjs/body-helper/style/ImageStyle.js.map +1 -1
- package/cjs/body-helper/style/MultilineTextStyle.js.map +1 -1
- package/cjs/body-helper/style/NumberStyle.js.map +1 -1
- package/cjs/body-helper/style/ProgressBarStyle.js.map +1 -1
- package/cjs/body-helper/style/Style.js.map +1 -1
- package/cjs/body-helper/style.js.map +1 -1
- package/cjs/chartModule.js.map +1 -1
- package/cjs/components/axis/axis.js.map +1 -1
- package/cjs/components/axis/band-scale.js.map +1 -1
- package/cjs/components/axis/get-axis-attributes.js.map +1 -1
- package/cjs/components/axis/get-axis-component-size.js.map +1 -1
- package/cjs/components/axis/label-overlap.js.map +1 -1
- package/cjs/components/axis/linear-scale.js.map +1 -1
- package/cjs/components/legend/continue-legend/continue-legend.js.map +1 -1
- package/cjs/components/legend/continue-legend/get-continue-legend-attributes.js.map +1 -1
- package/cjs/components/legend/create-legend.js.map +1 -1
- package/cjs/components/legend/discrete-legend/discrete-legend.js.map +1 -1
- package/cjs/components/legend/discrete-legend/get-discrete-legend-attributes.js.map +1 -1
- package/cjs/components/menu/dom/BaseMenu.js.map +1 -1
- package/cjs/components/menu/dom/Menu.js.map +1 -1
- package/cjs/components/menu/dom/MenuHandler.js.map +1 -1
- package/cjs/components/menu/dom/logic/MenuContainer.js.map +1 -1
- package/cjs/components/menu/dom/logic/MenuElement.js +5 -5
- package/cjs/components/menu/dom/logic/MenuElement.js.map +1 -1
- package/cjs/components/menu/dom/logic/MenuElementStyle.js.map +1 -1
- package/cjs/components/title/title.js.map +1 -1
- package/cjs/components/tooltip/BaseTooltip.js.map +1 -1
- package/cjs/components/tooltip/Tooltip.js.map +1 -1
- package/cjs/components/tooltip/TooltipHandler.js +3 -3
- package/cjs/components/tooltip/TooltipHandler.js.map +1 -1
- package/cjs/components/tooltip/logic/BubbleTooltipElement.js +2 -2
- package/cjs/components/tooltip/logic/BubbleTooltipElement.js.map +1 -1
- package/cjs/components/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -1
- package/cjs/components/util/orient.js.map +1 -1
- package/cjs/components/util/register.js.map +1 -1
- package/cjs/components/util/transform.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +8 -8
- package/cjs/core/BaseTable.js +56 -35
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/FouseInput.js.map +1 -1
- package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/cjs/core/style.js.map +1 -1
- package/cjs/core/tableHelper.js.map +1 -1
- package/cjs/core.js.map +1 -1
- package/cjs/data/CachedDataSource.js.map +1 -1
- package/cjs/data/DataSource.js +1 -1
- package/cjs/data/DataSource.js.map +1 -1
- package/cjs/data/FilterDataSource.js.map +1 -1
- package/cjs/data.js.map +1 -1
- package/cjs/dataset/DataStatistics.js.map +1 -1
- package/cjs/dataset/dataset-pivot-table.js.map +1 -1
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/dataset/flatDataToObject.js.map +1 -1
- package/cjs/dataset/statistics-helper.js.map +1 -1
- package/cjs/edit/edit-manager.js +10 -2
- package/cjs/edit/edit-manager.js.map +1 -1
- package/cjs/edit/editors.js.map +1 -1
- package/cjs/event/EventHandler.js.map +1 -1
- package/cjs/event/EventTarget.js.map +1 -1
- package/cjs/event/VChartEventProxy.js.map +1 -1
- package/cjs/event/drill.js +3 -3
- package/cjs/event/drill.js.map +1 -1
- package/cjs/event/event.d.ts +1 -1
- package/cjs/event/event.js +19 -19
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/container-dom.d.ts +2 -2
- package/cjs/event/listener/container-dom.js +6 -7
- package/cjs/event/listener/container-dom.js.map +1 -1
- package/cjs/event/listener/scroll-bar.d.ts +2 -2
- package/cjs/event/listener/scroll-bar.js +16 -16
- package/cjs/event/listener/scroll-bar.js.map +1 -1
- package/cjs/event/listener/table-group.d.ts +3 -3
- package/cjs/event/listener/table-group.js +65 -65
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/event/listener/touch.d.ts +2 -2
- package/cjs/event/listener/touch.js +23 -23
- package/cjs/event/listener/touch.js.map +1 -1
- package/cjs/event/media-click.js.map +1 -1
- package/cjs/event/pivot-chart/axis-click.js +1 -1
- package/cjs/event/pivot-chart/axis-click.js.map +1 -1
- package/cjs/event/pivot-chart/axis-hover.js.map +1 -1
- package/cjs/event/scroll.d.ts +4 -4
- package/cjs/event/scroll.js.map +1 -1
- package/cjs/event/sparkline-event.js +3 -3
- package/cjs/event/sparkline-event.js.map +1 -1
- package/cjs/event/util.js.map +1 -1
- package/cjs/header-helper/header-helper.js +2 -2
- package/cjs/header-helper/header-helper.js.map +1 -1
- package/cjs/header-helper/style/CheckboxStyle.js.map +1 -1
- package/cjs/header-helper/style/ImageStyle.js.map +1 -1
- package/cjs/header-helper/style/MultilineTextHeaderStyle.js.map +1 -1
- package/cjs/header-helper/style/SortHeaderStyle.js.map +1 -1
- package/cjs/header-helper/style/Style.js.map +1 -1
- package/cjs/header-helper/style.js.map +1 -1
- package/cjs/icons.js.map +1 -1
- package/cjs/index.d.ts +3 -3
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
- package/cjs/layout/chart-helper/get-axis-domain.js.map +1 -1
- package/cjs/layout/chart-helper/get-chart-spec.js +2 -6
- package/cjs/layout/chart-helper/get-chart-spec.js.map +1 -1
- package/cjs/layout/chart-helper/zero-align.js.map +1 -1
- package/cjs/layout/index.js.map +1 -1
- package/cjs/layout/pivot-header-layout.d.ts +1 -0
- package/cjs/layout/pivot-header-layout.js +30 -17
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/pivot-layout-helper.js.map +1 -1
- package/cjs/layout/pivot-layout.js.map +1 -1
- package/cjs/layout/simple-header-layout.d.ts +1 -0
- package/cjs/layout/simple-header-layout.js +3 -0
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/cjs/plugins/chartModules.js.map +1 -1
- package/cjs/plugins/icons.js.map +1 -1
- package/cjs/plugins/themes.js.map +1 -1
- package/cjs/register.js.map +1 -1
- package/cjs/render/jsx/index.js.map +1 -1
- package/cjs/render/layout/arc.js.map +1 -1
- package/cjs/render/layout/circle.js.map +1 -1
- package/cjs/render/layout/container.js.map +1 -1
- package/cjs/render/layout/direction.js.map +1 -1
- package/cjs/render/layout/element.js.map +1 -1
- package/cjs/render/layout/group-element.js.map +1 -1
- package/cjs/render/layout/group.js.map +1 -1
- package/cjs/render/layout/icon.js.map +1 -1
- package/cjs/render/layout/image.js.map +1 -1
- package/cjs/render/layout/index.js.map +1 -1
- package/cjs/render/layout/line.js.map +1 -1
- package/cjs/render/layout/percent-calc.js.map +1 -1
- package/cjs/render/layout/rect.js.map +1 -1
- package/cjs/render/layout/tag.js.map +1 -1
- package/cjs/render/layout/text.js.map +1 -1
- package/cjs/scenegraph/component/cell-content.js.map +1 -1
- package/cjs/scenegraph/component/cell-mover.js +6 -6
- package/cjs/scenegraph/component/cell-mover.js.map +1 -1
- package/cjs/scenegraph/component/custom.js.map +1 -1
- package/cjs/scenegraph/component/drill-icon.js.map +1 -1
- package/cjs/scenegraph/component/menu.js.map +1 -1
- package/cjs/scenegraph/component/table-component.js +2 -2
- package/cjs/scenegraph/component/table-component.js.map +1 -1
- package/cjs/scenegraph/component/util.js.map +1 -1
- package/cjs/scenegraph/debug-tool/debug-tool.js.map +1 -1
- package/cjs/scenegraph/debug-tool/index.js.map +1 -1
- package/cjs/scenegraph/graphic/chart.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render-helper.js +12 -9
- package/cjs/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +1 -1
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/image-contribution-render.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/index.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
- package/cjs/scenegraph/graphic/group.js.map +1 -1
- package/cjs/scenegraph/graphic/icon.js +5 -5
- package/cjs/scenegraph/graphic/icon.js.map +1 -1
- package/cjs/scenegraph/graphic/text.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +17 -9
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js +2 -2
- package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/progress-bar-cell.js +7 -8
- package/cjs/scenegraph/group-creater/cell-type/progress-bar-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/column-helper.js +2 -2
- 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/init-scenegraph.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.d.ts +1 -1
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +30 -59
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.d.ts +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.js +2 -4
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/sort-horizontal.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/sort-vertical.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/update-auto-column.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/update-auto-row.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/util.js.map +1 -1
- package/cjs/scenegraph/icon/icon-update.js +4 -4
- package/cjs/scenegraph/icon/icon-update.js.map +1 -1
- package/cjs/scenegraph/layout/auto-height.js +1 -1
- package/cjs/scenegraph/layout/auto-height.js.map +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js +7 -3
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js +12 -8
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
- package/cjs/scenegraph/layout/frozen.js +18 -3
- package/cjs/scenegraph/layout/frozen.js.map +1 -1
- package/cjs/scenegraph/layout/move-cell.js +9 -3
- package/cjs/scenegraph/layout/move-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 +3 -4
- package/cjs/scenegraph/layout/update-row.js.map +1 -1
- package/cjs/scenegraph/layout/update-width.js +11 -7
- package/cjs/scenegraph/layout/update-width.js.map +1 -1
- package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +1 -0
- package/cjs/scenegraph/scenegraph.js +24 -13
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/select/create-select-border.js.map +1 -1
- package/cjs/scenegraph/select/delete-select-border.js.map +1 -1
- package/cjs/scenegraph/select/move-select-border.js.map +1 -1
- package/cjs/scenegraph/select/update-select-border.js.map +1 -1
- package/cjs/scenegraph/stick-text/index.js.map +1 -1
- package/cjs/scenegraph/style/corner-cell.js.map +1 -1
- package/cjs/scenegraph/style/frame-border.js.map +1 -1
- package/cjs/scenegraph/utils/border-line.js.map +1 -1
- package/cjs/scenegraph/utils/break-string.js.map +1 -1
- package/cjs/scenegraph/utils/cell-pos.js.map +1 -1
- package/cjs/scenegraph/utils/deal-promise-data.js.map +1 -1
- package/cjs/scenegraph/utils/empty-group.js.map +1 -1
- package/cjs/scenegraph/utils/font.js.map +1 -1
- package/cjs/scenegraph/utils/get-cell-merge.js.map +1 -1
- package/cjs/scenegraph/utils/get-hierarchy-offset.js.map +1 -1
- package/cjs/scenegraph/utils/get-prop.js.map +1 -1
- package/cjs/scenegraph/utils/icon.js.map +1 -1
- package/cjs/scenegraph/utils/is-merge-cell-group.js.map +1 -1
- package/cjs/scenegraph/utils/keep-aspect-ratio.js.map +1 -1
- package/cjs/scenegraph/utils/padding.js.map +1 -1
- package/cjs/scenegraph/utils/render-service.js +1 -1
- package/cjs/scenegraph/utils/render-service.js.map +1 -1
- package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/cjs/scenegraph/utils/text-measure.js.map +1 -1
- package/cjs/scenegraph/utils/text-pos.js.map +1 -1
- package/cjs/scenegraph/utils/update-container.js.map +1 -1
- package/cjs/state/cell-move/adjust-header.js.map +1 -1
- package/cjs/state/cell-move/index.d.ts +4 -4
- package/cjs/state/cell-move/index.js +1 -1
- package/cjs/state/cell-move/index.js.map +1 -1
- package/cjs/state/common/check-in-select.js.map +1 -1
- package/cjs/state/drill/index.js.map +1 -1
- package/cjs/state/frozen/index.js.map +1 -1
- package/cjs/state/hover/col.js.map +1 -1
- package/cjs/state/hover/is-cell-hover.d.ts +2 -2
- package/cjs/state/hover/is-cell-hover.js +2 -2
- package/cjs/state/hover/is-cell-hover.js.map +1 -1
- package/cjs/state/hover/row.js.map +1 -1
- package/cjs/state/hover/single.js.map +1 -1
- package/cjs/state/hover/update-cell.js.map +1 -1
- package/cjs/state/hover/update-position.d.ts +2 -2
- package/cjs/state/hover/update-position.js.map +1 -1
- package/cjs/state/resize/update-resize-column.d.ts +2 -2
- package/cjs/state/resize/update-resize-column.js.map +1 -1
- package/cjs/state/select/update-position.d.ts +2 -2
- package/cjs/state/select/update-position.js +86 -88
- package/cjs/state/select/update-position.js.map +1 -1
- package/cjs/state/sort/index.js +2 -2
- package/cjs/state/sort/index.js.map +1 -1
- package/cjs/state/spark-line/index.js.map +1 -1
- package/cjs/state/state.d.ts +1 -1
- package/cjs/state/state.js +8 -8
- package/cjs/state/state.js.map +1 -1
- package/cjs/themes/ARCO.js.map +1 -1
- package/cjs/themes/BRIGHT.js.map +1 -1
- package/cjs/themes/DARK.js.map +1 -1
- package/cjs/themes/DEFAULT.js.map +1 -1
- package/cjs/themes/SIMPLIFY.js.map +1 -1
- package/cjs/themes/theme.js.map +1 -1
- package/cjs/themes.js.map +1 -1
- package/cjs/tools/LimitPromiseQueue.js.map +1 -1
- package/cjs/tools/NumberMap.js.map +1 -1
- package/cjs/tools/Rect.js.map +1 -1
- package/cjs/tools/calc.js.map +1 -1
- package/cjs/tools/debounce.js.map +1 -1
- package/cjs/tools/diff-cell.js.map +1 -1
- package/cjs/tools/dom.js.map +1 -1
- package/cjs/tools/env.js.map +1 -1
- package/cjs/tools/get-data-path/create-dataset.js.map +1 -1
- package/cjs/tools/get-data-path/index.js.map +1 -1
- package/cjs/tools/global.js.map +1 -1
- package/cjs/tools/helper.js.map +1 -1
- package/cjs/tools/icons.js.map +1 -1
- package/cjs/tools/isx.js.map +1 -1
- package/cjs/tools/pixel-ratio.js.map +1 -1
- package/cjs/tools/sort.js.map +1 -1
- package/cjs/tools/style.js.map +1 -1
- package/cjs/tools/util.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +6 -6
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/column/index.js.map +1 -1
- package/cjs/ts-types/column/style.js.map +1 -1
- package/cjs/ts-types/column/type.js.map +1 -1
- package/cjs/ts-types/common.js.map +1 -1
- package/cjs/ts-types/component/axis.js.map +1 -1
- package/cjs/ts-types/component/legend.js.map +1 -1
- package/cjs/ts-types/component/title.js.map +1 -1
- package/cjs/ts-types/component/util.js.map +1 -1
- package/cjs/ts-types/customElement.js.map +1 -1
- package/cjs/ts-types/customLayout.js.map +1 -1
- package/cjs/ts-types/events.d.ts +0 -1
- package/cjs/ts-types/events.js.map +1 -1
- package/cjs/ts-types/icon.js.map +1 -1
- package/cjs/ts-types/index.js.map +1 -1
- package/cjs/ts-types/list-table/define/Composite-define.js.map +1 -1
- package/cjs/ts-types/list-table/define/basic-define.d.ts +3 -2
- package/cjs/ts-types/list-table/define/basic-define.js.map +1 -1
- package/cjs/ts-types/list-table/define/chart-define.js.map +1 -1
- package/cjs/ts-types/list-table/define/checkbox-define.js.map +1 -1
- package/cjs/ts-types/list-table/define/image-define.js.map +1 -1
- package/cjs/ts-types/list-table/define/index.js.map +1 -1
- package/cjs/ts-types/list-table/define/link-define.js.map +1 -1
- package/cjs/ts-types/list-table/define/multilinetext-define.js.map +1 -1
- package/cjs/ts-types/list-table/define/progressbar-define.js.map +1 -1
- package/cjs/ts-types/list-table/define/sparkline-define.js.map +1 -1
- package/cjs/ts-types/list-table/index.js.map +1 -1
- package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
- package/cjs/ts-types/list-table/layout-map/index.js.map +1 -1
- package/cjs/ts-types/menu.js.map +1 -1
- package/cjs/ts-types/new-data-set.js.map +1 -1
- package/cjs/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js.map +1 -1
- package/cjs/ts-types/pivot-table/corner.js.map +1 -1
- package/cjs/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -1
- package/cjs/ts-types/pivot-table/dimension/image-dimension.js.map +1 -1
- package/cjs/ts-types/pivot-table/dimension/index.js.map +1 -1
- package/cjs/ts-types/pivot-table/dimension/link-dimension.js.map +1 -1
- package/cjs/ts-types/pivot-table/dimension/multilinetext-dimension.js.map +1 -1
- package/cjs/ts-types/pivot-table/index.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.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/checkbox-indicator.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/composite-indicator.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/image-indicator.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/index.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/link-indicator.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/multilinetext-indicator.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/progress-indicator.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/sparkline-indicator.js.map +1 -1
- package/cjs/ts-types/pivot-table/title.js.map +1 -1
- package/cjs/ts-types/sparkline.js.map +1 -1
- package/cjs/ts-types/style-define.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +5 -2
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/ts-types/theme.js.map +1 -1
- package/cjs/ts-types/tooltip.js.map +1 -1
- package/dist/vtable.js +652 -438
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.d.ts +4 -2
- package/es/ListTable.js +39 -15
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.js +26 -13
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable.js +17 -6
- package/es/PivotTable.js.map +1 -1
- package/es/body-helper/body-helper.js.map +1 -1
- package/es/body-helper/style/CheckboxStyle.js.map +1 -1
- package/es/body-helper/style/ImageStyle.js.map +1 -1
- package/es/body-helper/style/MultilineTextStyle.js.map +1 -1
- package/es/body-helper/style/NumberStyle.js.map +1 -1
- package/es/body-helper/style/ProgressBarStyle.js.map +1 -1
- package/es/body-helper/style/Style.js.map +1 -1
- package/es/body-helper/style.js.map +1 -1
- package/es/chartModule.js.map +1 -1
- package/es/components/axis/axis.js.map +1 -1
- package/es/components/axis/band-scale.js.map +1 -1
- package/es/components/axis/get-axis-attributes.js.map +1 -1
- package/es/components/axis/get-axis-component-size.js.map +1 -1
- package/es/components/axis/label-overlap.js.map +1 -1
- package/es/components/axis/linear-scale.js.map +1 -1
- package/es/components/legend/continue-legend/continue-legend.js.map +1 -1
- package/es/components/legend/continue-legend/get-continue-legend-attributes.js.map +1 -1
- package/es/components/legend/create-legend.js.map +1 -1
- package/es/components/legend/discrete-legend/discrete-legend.js.map +1 -1
- package/es/components/legend/discrete-legend/get-discrete-legend-attributes.js.map +1 -1
- package/es/components/menu/dom/BaseMenu.js.map +1 -1
- package/es/components/menu/dom/Menu.js.map +1 -1
- package/es/components/menu/dom/MenuHandler.js.map +1 -1
- package/es/components/menu/dom/logic/MenuContainer.js.map +1 -1
- package/es/components/menu/dom/logic/MenuElement.js +5 -5
- package/es/components/menu/dom/logic/MenuElement.js.map +1 -1
- package/es/components/menu/dom/logic/MenuElementStyle.js.map +1 -1
- package/es/components/title/title.js.map +1 -1
- package/es/components/tooltip/BaseTooltip.js.map +1 -1
- package/es/components/tooltip/Tooltip.js.map +1 -1
- package/es/components/tooltip/TooltipHandler.js +3 -3
- package/es/components/tooltip/TooltipHandler.js.map +1 -1
- package/es/components/tooltip/logic/BubbleTooltipElement.js +2 -2
- package/es/components/tooltip/logic/BubbleTooltipElement.js.map +1 -1
- package/es/components/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -1
- package/es/components/util/orient.js.map +1 -1
- package/es/components/util/register.js.map +1 -1
- package/es/components/util/transform.js.map +1 -1
- package/es/core/BaseTable.d.ts +8 -8
- package/es/core/BaseTable.js +59 -38
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/FouseInput.js.map +1 -1
- package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/es/core/style.js.map +1 -1
- package/es/core/tableHelper.js.map +1 -1
- package/es/core.js.map +1 -1
- package/es/data/CachedDataSource.js.map +1 -1
- package/es/data/DataSource.js +1 -1
- package/es/data/DataSource.js.map +1 -1
- package/es/data/FilterDataSource.js.map +1 -1
- package/es/data.js.map +1 -1
- package/es/dataset/DataStatistics.js.map +1 -1
- package/es/dataset/dataset-pivot-table.js.map +1 -1
- package/es/dataset/dataset.js.map +1 -1
- package/es/dataset/flatDataToObject.js.map +1 -1
- package/es/dataset/statistics-helper.js.map +1 -1
- package/es/edit/edit-manager.js +10 -2
- package/es/edit/edit-manager.js.map +1 -1
- package/es/edit/editors.js.map +1 -1
- package/es/event/EventHandler.js.map +1 -1
- package/es/event/EventTarget.js.map +1 -1
- package/es/event/VChartEventProxy.js.map +1 -1
- package/es/event/drill.js +3 -3
- package/es/event/drill.js.map +1 -1
- package/es/event/event.d.ts +1 -1
- package/es/event/event.js +16 -16
- package/es/event/event.js.map +1 -1
- package/es/event/listener/container-dom.d.ts +2 -2
- package/es/event/listener/container-dom.js +6 -7
- package/es/event/listener/container-dom.js.map +1 -1
- package/es/event/listener/scroll-bar.d.ts +2 -2
- package/es/event/listener/scroll-bar.js +15 -15
- package/es/event/listener/scroll-bar.js.map +1 -1
- package/es/event/listener/table-group.d.ts +3 -3
- package/es/event/listener/table-group.js +65 -65
- package/es/event/listener/table-group.js.map +1 -1
- package/es/event/listener/touch.d.ts +2 -2
- package/es/event/listener/touch.js +21 -21
- package/es/event/listener/touch.js.map +1 -1
- package/es/event/media-click.js.map +1 -1
- package/es/event/pivot-chart/axis-click.js +1 -1
- package/es/event/pivot-chart/axis-click.js.map +1 -1
- package/es/event/pivot-chart/axis-hover.js.map +1 -1
- package/es/event/scroll.d.ts +4 -4
- package/es/event/scroll.js.map +1 -1
- package/es/event/sparkline-event.js +3 -3
- package/es/event/sparkline-event.js.map +1 -1
- package/es/event/util.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/CheckboxStyle.js.map +1 -1
- package/es/header-helper/style/ImageStyle.js.map +1 -1
- package/es/header-helper/style/MultilineTextHeaderStyle.js.map +1 -1
- package/es/header-helper/style/SortHeaderStyle.js.map +1 -1
- package/es/header-helper/style/Style.js.map +1 -1
- package/es/header-helper/style.js.map +1 -1
- package/es/icons.js.map +1 -1
- package/es/index.d.ts +3 -3
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/layout/chart-helper/get-axis-config.js.map +1 -1
- package/es/layout/chart-helper/get-axis-domain.js.map +1 -1
- package/es/layout/chart-helper/get-chart-spec.js +2 -6
- package/es/layout/chart-helper/get-chart-spec.js.map +1 -1
- package/es/layout/chart-helper/zero-align.js.map +1 -1
- package/es/layout/index.js.map +1 -1
- package/es/layout/pivot-header-layout.d.ts +1 -0
- package/es/layout/pivot-header-layout.js +30 -17
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/pivot-layout-helper.js.map +1 -1
- package/es/layout/pivot-layout.js.map +1 -1
- package/es/layout/simple-header-layout.d.ts +1 -0
- package/es/layout/simple-header-layout.js +3 -0
- package/es/layout/simple-header-layout.js.map +1 -1
- package/es/plugins/chartModules.js.map +1 -1
- package/es/plugins/icons.js.map +1 -1
- package/es/plugins/themes.js.map +1 -1
- package/es/register.js.map +1 -1
- package/es/render/jsx/index.js.map +1 -1
- package/es/render/layout/arc.js.map +1 -1
- package/es/render/layout/circle.js.map +1 -1
- package/es/render/layout/container.js.map +1 -1
- package/es/render/layout/direction.js.map +1 -1
- package/es/render/layout/element.js.map +1 -1
- package/es/render/layout/group-element.js.map +1 -1
- package/es/render/layout/group.js.map +1 -1
- package/es/render/layout/icon.js.map +1 -1
- package/es/render/layout/image.js.map +1 -1
- package/es/render/layout/index.js.map +1 -1
- package/es/render/layout/line.js.map +1 -1
- package/es/render/layout/percent-calc.js.map +1 -1
- package/es/render/layout/rect.js.map +1 -1
- package/es/render/layout/tag.js.map +1 -1
- package/es/render/layout/text.js.map +1 -1
- package/es/scenegraph/component/cell-content.js.map +1 -1
- package/es/scenegraph/component/cell-mover.js +6 -6
- package/es/scenegraph/component/cell-mover.js.map +1 -1
- package/es/scenegraph/component/custom.js.map +1 -1
- package/es/scenegraph/component/drill-icon.js.map +1 -1
- package/es/scenegraph/component/menu.js.map +1 -1
- package/es/scenegraph/component/table-component.js +2 -2
- package/es/scenegraph/component/table-component.js.map +1 -1
- package/es/scenegraph/component/util.js.map +1 -1
- package/es/scenegraph/debug-tool/debug-tool.js.map +1 -1
- package/es/scenegraph/debug-tool/index.js.map +1 -1
- package/es/scenegraph/graphic/chart.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render-helper.js +12 -9
- package/es/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/es/scenegraph/graphic/contributions/group-contribution-render.js +1 -1
- package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/es/scenegraph/graphic/contributions/image-contribution-render.js.map +1 -1
- package/es/scenegraph/graphic/contributions/index.js.map +1 -1
- package/es/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
- package/es/scenegraph/graphic/group.js.map +1 -1
- package/es/scenegraph/graphic/icon.js +5 -5
- package/es/scenegraph/graphic/icon.js.map +1 -1
- package/es/scenegraph/graphic/text.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +16 -9
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/checkbox-cell.js +2 -2
- package/es/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/progress-bar-cell.js +7 -6
- package/es/scenegraph/group-creater/cell-type/progress-bar-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
- package/es/scenegraph/group-creater/column-helper.js +2 -2
- 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/init-scenegraph.js.map +1 -1
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.d.ts +1 -1
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +29 -57
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
- package/es/scenegraph/group-creater/progress/proxy.d.ts +1 -1
- package/es/scenegraph/group-creater/progress/proxy.js +2 -4
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/sort-horizontal.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/sort-vertical.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/update-auto-column.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/update-auto-row.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/util.js.map +1 -1
- package/es/scenegraph/icon/icon-update.js +4 -4
- package/es/scenegraph/icon/icon-update.js.map +1 -1
- package/es/scenegraph/layout/auto-height.js +1 -1
- package/es/scenegraph/layout/auto-height.js.map +1 -1
- package/es/scenegraph/layout/compute-col-width.js +7 -3
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.js +12 -8
- package/es/scenegraph/layout/compute-row-height.js.map +1 -1
- package/es/scenegraph/layout/frozen.js +20 -2
- package/es/scenegraph/layout/frozen.js.map +1 -1
- package/es/scenegraph/layout/move-cell.js +9 -3
- package/es/scenegraph/layout/move-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 +3 -4
- package/es/scenegraph/layout/update-row.js.map +1 -1
- package/es/scenegraph/layout/update-width.js +11 -7
- package/es/scenegraph/layout/update-width.js.map +1 -1
- package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +1 -0
- package/es/scenegraph/scenegraph.js +22 -12
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/select/create-select-border.js.map +1 -1
- package/es/scenegraph/select/delete-select-border.js.map +1 -1
- package/es/scenegraph/select/move-select-border.js.map +1 -1
- package/es/scenegraph/select/update-select-border.js.map +1 -1
- package/es/scenegraph/stick-text/index.js.map +1 -1
- package/es/scenegraph/style/corner-cell.js.map +1 -1
- package/es/scenegraph/style/frame-border.js.map +1 -1
- package/es/scenegraph/utils/border-line.js.map +1 -1
- package/es/scenegraph/utils/break-string.js.map +1 -1
- package/es/scenegraph/utils/cell-pos.js.map +1 -1
- package/es/scenegraph/utils/deal-promise-data.js.map +1 -1
- package/es/scenegraph/utils/empty-group.js.map +1 -1
- package/es/scenegraph/utils/font.js.map +1 -1
- package/es/scenegraph/utils/get-cell-merge.js.map +1 -1
- package/es/scenegraph/utils/get-hierarchy-offset.js.map +1 -1
- package/es/scenegraph/utils/get-prop.js.map +1 -1
- package/es/scenegraph/utils/icon.js.map +1 -1
- package/es/scenegraph/utils/is-merge-cell-group.js.map +1 -1
- package/es/scenegraph/utils/keep-aspect-ratio.js.map +1 -1
- package/es/scenegraph/utils/padding.js.map +1 -1
- package/es/scenegraph/utils/render-service.js +1 -1
- package/es/scenegraph/utils/render-service.js.map +1 -1
- package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/es/scenegraph/utils/text-measure.js.map +1 -1
- package/es/scenegraph/utils/text-pos.js.map +1 -1
- package/es/scenegraph/utils/update-container.js.map +1 -1
- package/es/state/cell-move/adjust-header.js.map +1 -1
- package/es/state/cell-move/index.d.ts +4 -4
- package/es/state/cell-move/index.js +1 -1
- package/es/state/cell-move/index.js.map +1 -1
- package/es/state/common/check-in-select.js.map +1 -1
- package/es/state/drill/index.js.map +1 -1
- package/es/state/frozen/index.js.map +1 -1
- package/es/state/hover/col.js.map +1 -1
- package/es/state/hover/is-cell-hover.d.ts +2 -2
- package/es/state/hover/is-cell-hover.js +2 -2
- package/es/state/hover/is-cell-hover.js.map +1 -1
- package/es/state/hover/row.js.map +1 -1
- package/es/state/hover/single.js.map +1 -1
- package/es/state/hover/update-cell.js.map +1 -1
- package/es/state/hover/update-position.d.ts +2 -2
- package/es/state/hover/update-position.js.map +1 -1
- package/es/state/resize/update-resize-column.d.ts +2 -2
- package/es/state/resize/update-resize-column.js.map +1 -1
- package/es/state/select/update-position.d.ts +2 -2
- package/es/state/select/update-position.js +86 -88
- package/es/state/select/update-position.js.map +1 -1
- package/es/state/sort/index.js +2 -2
- package/es/state/sort/index.js.map +1 -1
- package/es/state/spark-line/index.js.map +1 -1
- package/es/state/state.d.ts +1 -1
- package/es/state/state.js +6 -6
- package/es/state/state.js.map +1 -1
- package/es/themes/ARCO.js.map +1 -1
- package/es/themes/BRIGHT.js.map +1 -1
- package/es/themes/DARK.js.map +1 -1
- package/es/themes/DEFAULT.js.map +1 -1
- package/es/themes/SIMPLIFY.js.map +1 -1
- package/es/themes/theme.js.map +1 -1
- package/es/themes.js.map +1 -1
- package/es/tools/LimitPromiseQueue.js.map +1 -1
- package/es/tools/NumberMap.js.map +1 -1
- package/es/tools/Rect.js.map +1 -1
- package/es/tools/calc.js.map +1 -1
- package/es/tools/debounce.js.map +1 -1
- package/es/tools/diff-cell.js.map +1 -1
- package/es/tools/dom.js.map +1 -1
- package/es/tools/env.js.map +1 -1
- package/es/tools/get-data-path/create-dataset.js.map +1 -1
- package/es/tools/get-data-path/index.js.map +1 -1
- package/es/tools/global.js.map +1 -1
- package/es/tools/helper.js.map +1 -1
- package/es/tools/icons.js.map +1 -1
- package/es/tools/isx.js.map +1 -1
- package/es/tools/pixel-ratio.js.map +1 -1
- package/es/tools/sort.js.map +1 -1
- package/es/tools/style.js.map +1 -1
- package/es/tools/util.js.map +1 -1
- package/es/ts-types/base-table.d.ts +6 -6
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/column/index.js.map +1 -1
- package/es/ts-types/column/style.js.map +1 -1
- package/es/ts-types/column/type.js.map +1 -1
- package/es/ts-types/common.js.map +1 -1
- package/es/ts-types/component/axis.js.map +1 -1
- package/es/ts-types/component/legend.js.map +1 -1
- package/es/ts-types/component/title.js.map +1 -1
- package/es/ts-types/component/util.js.map +1 -1
- package/es/ts-types/customElement.js.map +1 -1
- package/es/ts-types/customLayout.js.map +1 -1
- package/es/ts-types/events.d.ts +0 -1
- package/es/ts-types/events.js.map +1 -1
- package/es/ts-types/icon.js.map +1 -1
- package/es/ts-types/index.js.map +1 -1
- package/es/ts-types/list-table/define/Composite-define.js.map +1 -1
- package/es/ts-types/list-table/define/basic-define.d.ts +3 -2
- package/es/ts-types/list-table/define/basic-define.js.map +1 -1
- package/es/ts-types/list-table/define/chart-define.js.map +1 -1
- package/es/ts-types/list-table/define/checkbox-define.js.map +1 -1
- package/es/ts-types/list-table/define/image-define.js.map +1 -1
- package/es/ts-types/list-table/define/index.js.map +1 -1
- package/es/ts-types/list-table/define/link-define.js.map +1 -1
- package/es/ts-types/list-table/define/multilinetext-define.js.map +1 -1
- package/es/ts-types/list-table/define/progressbar-define.js.map +1 -1
- package/es/ts-types/list-table/define/sparkline-define.js.map +1 -1
- package/es/ts-types/list-table/index.js.map +1 -1
- package/es/ts-types/list-table/layout-map/api.js.map +1 -1
- package/es/ts-types/list-table/layout-map/index.js.map +1 -1
- package/es/ts-types/menu.js.map +1 -1
- package/es/ts-types/new-data-set.js.map +1 -1
- package/es/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js.map +1 -1
- package/es/ts-types/pivot-table/corner.js.map +1 -1
- package/es/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -1
- package/es/ts-types/pivot-table/dimension/image-dimension.js.map +1 -1
- package/es/ts-types/pivot-table/dimension/index.js.map +1 -1
- package/es/ts-types/pivot-table/dimension/link-dimension.js.map +1 -1
- package/es/ts-types/pivot-table/dimension/multilinetext-dimension.js.map +1 -1
- package/es/ts-types/pivot-table/index.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.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/checkbox-indicator.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/composite-indicator.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/image-indicator.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/index.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/link-indicator.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/multilinetext-indicator.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/progress-indicator.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/sparkline-indicator.js.map +1 -1
- package/es/ts-types/pivot-table/title.js.map +1 -1
- package/es/ts-types/sparkline.js.map +1 -1
- package/es/ts-types/style-define.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +5 -2
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/ts-types/theme.js.map +1 -1
- package/es/ts-types/tooltip.js.map +1 -1
- package/package.json +6 -6
package/dist/vtable.js
CHANGED
|
@@ -9352,7 +9352,7 @@
|
|
|
9352
9352
|
function isMouseLike(pointerType) {
|
|
9353
9353
|
return "mouse" === pointerType || "pen" === pointerType;
|
|
9354
9354
|
}
|
|
9355
|
-
class EventManager {
|
|
9355
|
+
let EventManager$1 = class EventManager {
|
|
9356
9356
|
constructor(root, config) {
|
|
9357
9357
|
this.dispatch = new EventEmitter(), this.mappingState = {
|
|
9358
9358
|
trackingData: {}
|
|
@@ -9581,7 +9581,7 @@
|
|
|
9581
9581
|
const pickResult = this.rootTarget.pick(x, y);
|
|
9582
9582
|
return target = pickResult && pickResult.graphic ? pickResult.graphic : pickResult && pickResult.group ? pickResult.group : x >= 0 && x <= get$5(this.rootTarget, "width") && y >= 0 && y <= get$5(this.rootTarget, "height") ? this.rootTarget : null, e && (e.pickParams = pickResult.params), target;
|
|
9583
9583
|
}
|
|
9584
|
-
}
|
|
9584
|
+
};
|
|
9585
9585
|
|
|
9586
9586
|
const EventTarget$1 = {
|
|
9587
9587
|
pickable: !0,
|
|
@@ -9656,7 +9656,7 @@
|
|
|
9656
9656
|
autoPreventDefault = !1,
|
|
9657
9657
|
clickInterval: clickInterval
|
|
9658
9658
|
} = params;
|
|
9659
|
-
this.manager = new EventManager(rootNode, {
|
|
9659
|
+
this.manager = new EventManager$1(rootNode, {
|
|
9660
9660
|
clickInterval: clickInterval
|
|
9661
9661
|
}), this.globalObj = global, this.supportsPointerEvents = global.supportsPointerEvents, this.supportsTouchEvents = global.supportsTouchEvents, this.supportsMouseEvents = global.supportsMouseEvents, this.applyStyles = global.applyStyles, this.autoPreventDefault = autoPreventDefault, this.eventsAdded = !1, this.viewport = viewport, this.rootPointerEvent = new FederatedPointerEvent(), this.rootWheelEvent = new FederatedWheelEvent(), this.cursorStyles = {
|
|
9662
9662
|
default: "inherit",
|
|
@@ -33497,7 +33497,7 @@
|
|
|
33497
33497
|
return maybePromiseOrValue;
|
|
33498
33498
|
}
|
|
33499
33499
|
function getField(record, field, col, row, table, promiseCallBack) {
|
|
33500
|
-
if (record === null) {
|
|
33500
|
+
if (record === null || record === undefined) {
|
|
33501
33501
|
return undefined;
|
|
33502
33502
|
}
|
|
33503
33503
|
if (isPromise$1(record)) {
|
|
@@ -34653,17 +34653,17 @@
|
|
|
34653
34653
|
constructor(params) {
|
|
34654
34654
|
super(params);
|
|
34655
34655
|
if (this.attribute.visibleTime === 'mouseenter_cell' || this.attribute.visibleTime === 'click_cell') {
|
|
34656
|
-
this.attribute.
|
|
34656
|
+
this.attribute.opacity = 0;
|
|
34657
34657
|
}
|
|
34658
34658
|
if (this.attribute.hoverImage) {
|
|
34659
34659
|
this.attribute.originImage = this.attribute.image;
|
|
34660
34660
|
}
|
|
34661
34661
|
}
|
|
34662
34662
|
get backgroundWidth() {
|
|
34663
|
-
return this.attribute.backgroundWidth ?? this.attribute.width;
|
|
34663
|
+
return this.attribute.backgroundWidth ?? this.attribute.width ?? 0;
|
|
34664
34664
|
}
|
|
34665
34665
|
get backgroundHeight() {
|
|
34666
|
-
return this.attribute.backgroundHeight ?? this.attribute.height;
|
|
34666
|
+
return this.attribute.backgroundHeight ?? this.attribute.height ?? 0;
|
|
34667
34667
|
}
|
|
34668
34668
|
};
|
|
34669
34669
|
|
|
@@ -35704,9 +35704,6 @@
|
|
|
35704
35704
|
}
|
|
35705
35705
|
return Number(v);
|
|
35706
35706
|
});
|
|
35707
|
-
const left = 0;
|
|
35708
|
-
const right = contentWidth;
|
|
35709
|
-
const bottom = contentHeight;
|
|
35710
35707
|
const borderWidth = getQuadProps(getProp('borderLineWidth', style, col, row, table));
|
|
35711
35708
|
let barPaddingTop = Math.max(barPadding[0], borderWidth[0]);
|
|
35712
35709
|
const barPaddingRight = Math.max(barPadding[1], borderWidth[1]);
|
|
@@ -35720,6 +35717,9 @@
|
|
|
35720
35717
|
if (barPaddingLeft & 1) {
|
|
35721
35718
|
barPaddingLeft += 0.5;
|
|
35722
35719
|
}
|
|
35720
|
+
const top = barPaddingTop;
|
|
35721
|
+
const left = barPaddingLeft;
|
|
35722
|
+
const right = contentWidth;
|
|
35723
35723
|
if (typeof barHeight === 'string' && str.endsWith(barHeight, '%')) {
|
|
35724
35724
|
barHeight = Number(barHeight.substr(0, barHeight.length - 1));
|
|
35725
35725
|
barHeight = (contentHeight * barHeight) / 100;
|
|
@@ -35758,8 +35758,9 @@
|
|
|
35758
35758
|
? 1
|
|
35759
35759
|
: (num - progressBarDefine.min) / (progressBarDefine.max - progressBarDefine.min);
|
|
35760
35760
|
const barMaxWidth = contentWidth;
|
|
35761
|
-
const barTop =
|
|
35762
|
-
const
|
|
35761
|
+
const barTop = top + contentHeight - barHeight - barBottom;
|
|
35762
|
+
const barSize = Math.min(barMaxWidth * percentile, barMaxWidth);
|
|
35763
|
+
const barLeft = barRightToLeft ? left + right - barSize : left;
|
|
35763
35764
|
const bgFillColor = getOrApply(barBgColor, {
|
|
35764
35765
|
col,
|
|
35765
35766
|
row,
|
|
@@ -35779,7 +35780,6 @@
|
|
|
35779
35780
|
});
|
|
35780
35781
|
percentCompleteBarGroup.addChild(barBack);
|
|
35781
35782
|
}
|
|
35782
|
-
const barSize = Math.min(barMaxWidth * percentile, barMaxWidth);
|
|
35783
35783
|
const fillColor = getOrApply(barColor, {
|
|
35784
35784
|
col,
|
|
35785
35785
|
row,
|
|
@@ -35806,8 +35806,8 @@
|
|
|
35806
35806
|
const positiveRate = num > 0 ? num / positiveRange : 0;
|
|
35807
35807
|
const negativeRate = num < 0 ? -num / negativeRange : 0;
|
|
35808
35808
|
const barMaxWidth = contentWidth;
|
|
35809
|
-
const barTop =
|
|
35810
|
-
const barLeft = left
|
|
35809
|
+
const barTop = top + contentHeight - barHeight - barBottom;
|
|
35810
|
+
const barLeft = left;
|
|
35811
35811
|
const bgFillColor = getOrApply(barBgColor, {
|
|
35812
35812
|
col,
|
|
35813
35813
|
row,
|
|
@@ -35981,10 +35981,10 @@
|
|
|
35981
35981
|
const _positiveRange = progressBarDefine.max > 0 ? progressBarDefine.max : 0;
|
|
35982
35982
|
const range = Math.max(_negativeRange, _positiveRange);
|
|
35983
35983
|
const percentile = range === 0 ? 0 : Math.abs(num) / range;
|
|
35984
|
-
const barMaxWidth =
|
|
35984
|
+
const barMaxWidth = contentWidth;
|
|
35985
35985
|
const barSize = Math.min(barMaxWidth * percentile, barMaxWidth);
|
|
35986
|
-
const barTop =
|
|
35987
|
-
const barLeft = barRightToLeft ?
|
|
35986
|
+
const barTop = top + contentHeight - barHeight - barBottom;
|
|
35987
|
+
const barLeft = barRightToLeft ? left + right - barSize : left;
|
|
35988
35988
|
const bgFillColor = getOrApply(barBgColor, {
|
|
35989
35989
|
col,
|
|
35990
35990
|
row,
|
|
@@ -37396,7 +37396,7 @@
|
|
|
37396
37396
|
isChecked = value;
|
|
37397
37397
|
text = '';
|
|
37398
37398
|
}
|
|
37399
|
-
isChecked = table.
|
|
37399
|
+
isChecked = table.stateManager.syncCheckedState(col, row, define.field, isChecked);
|
|
37400
37400
|
const hierarchyOffset = getHierarchyOffset(col, row, table);
|
|
37401
37401
|
const cellStyle = table._getCellStyle(col, row);
|
|
37402
37402
|
const autoWrapText = cellStyle.autoWrapText ?? table.internalProps.autoWrapText;
|
|
@@ -37411,7 +37411,7 @@
|
|
|
37411
37411
|
value,
|
|
37412
37412
|
dataValue
|
|
37413
37413
|
});
|
|
37414
|
-
isChecked = table.
|
|
37414
|
+
isChecked = table.stateManager.syncCheckedState(col, row, define.field, globalChecked);
|
|
37415
37415
|
}
|
|
37416
37416
|
const globalDisable = getOrApply(disable, {
|
|
37417
37417
|
col,
|
|
@@ -37481,6 +37481,9 @@
|
|
|
37481
37481
|
}
|
|
37482
37482
|
|
|
37483
37483
|
function createCell(type, value, define, table, col, row, colWidth, cellWidth, cellHeight, columnGroup, y, padding, textAlign, textBaseline, mayHaveIcon, cellTheme) {
|
|
37484
|
+
if (isPromise$1(value)) {
|
|
37485
|
+
value = table.getCellValue(col, row);
|
|
37486
|
+
}
|
|
37484
37487
|
let bgColorFunc;
|
|
37485
37488
|
if (table.internalProps?.dataConfig?.mappingRules && !table.isHeader(col, row)) {
|
|
37486
37489
|
table.internalProps?.dataConfig?.mappingRules?.forEach((mappingRule, i) => {
|
|
@@ -37559,6 +37562,13 @@
|
|
|
37559
37562
|
axis.overlap();
|
|
37560
37563
|
}
|
|
37561
37564
|
else if (table.internalProps.layoutMap.isEmpty(col, row)) {
|
|
37565
|
+
cellGroup.setAttributes({
|
|
37566
|
+
fill: false,
|
|
37567
|
+
stroke: false
|
|
37568
|
+
});
|
|
37569
|
+
cellGroup.clear();
|
|
37570
|
+
}
|
|
37571
|
+
else if (table.internalProps.layoutMap.isAxisCell(col, row)) {
|
|
37562
37572
|
cellGroup.clear();
|
|
37563
37573
|
}
|
|
37564
37574
|
}
|
|
@@ -37627,6 +37637,17 @@
|
|
|
37627
37637
|
const hierarchyOffset = getHierarchyOffset(col, row, table);
|
|
37628
37638
|
const lineClamp = cellStyle.lineClamp;
|
|
37629
37639
|
const padding = getQuadProps(getProp('padding', cellStyle, col, row, table)) ?? [0, 0, 0, 0];
|
|
37640
|
+
const textAlign = cellTheme.text.textAlign;
|
|
37641
|
+
let x = 0;
|
|
37642
|
+
if (textAlign === 'center') {
|
|
37643
|
+
x = padding[3] + (cellWidth - (padding[1] + padding[3])) / 2;
|
|
37644
|
+
}
|
|
37645
|
+
else if (textAlign === 'right') {
|
|
37646
|
+
x = padding[3] + cellWidth - (padding[1] + padding[3]);
|
|
37647
|
+
}
|
|
37648
|
+
else {
|
|
37649
|
+
x = padding[3];
|
|
37650
|
+
}
|
|
37630
37651
|
const attribute = {
|
|
37631
37652
|
text: textArr.length === 1 && !autoWrapText ? textArr[0] : textArr,
|
|
37632
37653
|
maxLineWidth: cellWidth - (padding[1] + padding[3] + hierarchyOffset),
|
|
@@ -37636,7 +37657,8 @@
|
|
|
37636
37657
|
wordBreak: 'break-word',
|
|
37637
37658
|
heightLimit: cellHeight - (padding[0] + padding[2]),
|
|
37638
37659
|
pickable: false,
|
|
37639
|
-
dx: hierarchyOffset
|
|
37660
|
+
dx: hierarchyOffset,
|
|
37661
|
+
x
|
|
37640
37662
|
};
|
|
37641
37663
|
textMark.setAttributes(cellTheme.text ? Object.assign({}, cellTheme.text, attribute) : attribute);
|
|
37642
37664
|
}
|
|
@@ -37696,10 +37718,10 @@
|
|
|
37696
37718
|
}
|
|
37697
37719
|
if (isPromise$1(value)) {
|
|
37698
37720
|
oldCellGroup.removeAllChild();
|
|
37699
|
-
dealPromiseData(value, table, updateCellContent.bind(null, type, define, table, col, row, bgColorFunc, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon,
|
|
37721
|
+
dealPromiseData(value, table, updateCellContent.bind(null, type, value, define, table, col, row, bgColorFunc, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, cellTheme));
|
|
37700
37722
|
}
|
|
37701
37723
|
else {
|
|
37702
|
-
newCellGroup = updateCellContent(type, value, define, table, col, row, bgColorFunc, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon,
|
|
37724
|
+
newCellGroup = updateCellContent(type, value, define, table, col, row, bgColorFunc, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, cellTheme);
|
|
37703
37725
|
}
|
|
37704
37726
|
if (isMerge) {
|
|
37705
37727
|
const rangeHeight = table.getRowHeight(row);
|
|
@@ -37712,7 +37734,10 @@
|
|
|
37712
37734
|
}
|
|
37713
37735
|
return newCellGroup;
|
|
37714
37736
|
}
|
|
37715
|
-
function updateCellContent(type, value, define, table, col, row, bgColorFunc, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon,
|
|
37737
|
+
function updateCellContent(type, value, define, table, col, row, bgColorFunc, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, cellTheme) {
|
|
37738
|
+
if (isPromise$1(value)) {
|
|
37739
|
+
value = table.getCellValue(col, row);
|
|
37740
|
+
}
|
|
37716
37741
|
if (oldCellGroup.row !== row || oldCellGroup.col !== col) {
|
|
37717
37742
|
return null;
|
|
37718
37743
|
}
|
|
@@ -37731,13 +37756,15 @@
|
|
|
37731
37756
|
const mayHaveIcon = !!define?.icon || !!define?.tree;
|
|
37732
37757
|
const cellType = table.getBodyColumnType(col, row);
|
|
37733
37758
|
const autoRowHeight = table.heightMode === 'autoHeight';
|
|
37759
|
+
const value = table.getCellValue(col, row);
|
|
37734
37760
|
if (!table.isHeader(col, row) &&
|
|
37735
37761
|
oldCellGroup.role === 'cell' &&
|
|
37736
37762
|
cellType === 'text' &&
|
|
37737
37763
|
!autoWrapText &&
|
|
37738
37764
|
!autoRowHeight &&
|
|
37739
37765
|
!mayHaveIcon &&
|
|
37740
|
-
oldCellGroup.firstChild?.type === 'text'
|
|
37766
|
+
oldCellGroup.firstChild?.type === 'text' &&
|
|
37767
|
+
!isPromise$1(value)) {
|
|
37741
37768
|
return true;
|
|
37742
37769
|
}
|
|
37743
37770
|
return false;
|
|
@@ -37751,6 +37778,9 @@
|
|
|
37751
37778
|
if (columnGroup.lastChild) {
|
|
37752
37779
|
y = columnGroup.lastChild.attribute.y + columnGroup.lastChild.attribute.height;
|
|
37753
37780
|
}
|
|
37781
|
+
else if (columnGroup.colHeight) {
|
|
37782
|
+
y = columnGroup.colHeight;
|
|
37783
|
+
}
|
|
37754
37784
|
for (let j = rowStart; j <= rowEnd; j++) {
|
|
37755
37785
|
const row = j;
|
|
37756
37786
|
const define = cellLocation !== 'body' ? table.getHeaderDefine(col, row) : table.getBodyColumnDefine(col, row);
|
|
@@ -37804,7 +37834,7 @@
|
|
|
37804
37834
|
const type = (table.isHeader(col, row) ? table._getHeaderLayoutMap(col, row).headerType : table.getBodyColumnType(col, row)) ||
|
|
37805
37835
|
'text';
|
|
37806
37836
|
if (isPromise$1(value)) {
|
|
37807
|
-
dealPromiseData(value, table, createCell.bind(null, type, value, define, table, col, row, colWidth, cellWidth, cellHeight, columnGroup, y, padding, textAlign, textBaseline, mayHaveIcon,
|
|
37837
|
+
dealPromiseData(value, table, createCell.bind(null, type, value, define, table, col, row, colWidth, cellWidth, cellHeight, columnGroup, y, padding, textAlign, textBaseline, mayHaveIcon, cellTheme));
|
|
37808
37838
|
columnGroup.updateColumnRowNumber(row);
|
|
37809
37839
|
const height = isMerge
|
|
37810
37840
|
? table.getRowHeight(row) / (range.end.row - range.start.row + 1)
|
|
@@ -38808,7 +38838,7 @@
|
|
|
38808
38838
|
newHeights[row] = height;
|
|
38809
38839
|
}
|
|
38810
38840
|
else {
|
|
38811
|
-
table.
|
|
38841
|
+
table._setRowHeight(row, height);
|
|
38812
38842
|
}
|
|
38813
38843
|
}
|
|
38814
38844
|
}
|
|
@@ -38819,7 +38849,7 @@
|
|
|
38819
38849
|
newHeights[row] = height;
|
|
38820
38850
|
}
|
|
38821
38851
|
else {
|
|
38822
|
-
table.
|
|
38852
|
+
table._setRowHeight(row, height);
|
|
38823
38853
|
}
|
|
38824
38854
|
}
|
|
38825
38855
|
}
|
|
@@ -38836,7 +38866,7 @@
|
|
|
38836
38866
|
newHeights[row] = height;
|
|
38837
38867
|
}
|
|
38838
38868
|
else {
|
|
38839
|
-
table.
|
|
38869
|
+
table._setRowHeight(row, height);
|
|
38840
38870
|
}
|
|
38841
38871
|
}
|
|
38842
38872
|
}
|
|
@@ -38854,7 +38884,7 @@
|
|
|
38854
38884
|
newHeights[row] = height;
|
|
38855
38885
|
}
|
|
38856
38886
|
else {
|
|
38857
|
-
table.
|
|
38887
|
+
table._setRowHeight(row, height);
|
|
38858
38888
|
}
|
|
38859
38889
|
}
|
|
38860
38890
|
}
|
|
@@ -38865,7 +38895,7 @@
|
|
|
38865
38895
|
newHeights[row] = height;
|
|
38866
38896
|
}
|
|
38867
38897
|
else {
|
|
38868
|
-
table.
|
|
38898
|
+
table._setRowHeight(row, height);
|
|
38869
38899
|
}
|
|
38870
38900
|
}
|
|
38871
38901
|
}
|
|
@@ -38907,7 +38937,7 @@
|
|
|
38907
38937
|
newHeights[row] = rowHeight;
|
|
38908
38938
|
}
|
|
38909
38939
|
else {
|
|
38910
|
-
table.
|
|
38940
|
+
table._setRowHeight(row, rowHeight, false);
|
|
38911
38941
|
}
|
|
38912
38942
|
}
|
|
38913
38943
|
}
|
|
@@ -38926,11 +38956,28 @@
|
|
|
38926
38956
|
if (actualHeight < canvasHeight && actualHeight - actualHeaderHeight > 0) {
|
|
38927
38957
|
const factor = (canvasHeight - actualHeaderHeight) / (actualHeight - actualHeaderHeight);
|
|
38928
38958
|
for (let row = table.frozenRowCount; row < table.rowCount - table.bottomFrozenRowCount; row++) {
|
|
38959
|
+
let rowHeight;
|
|
38960
|
+
if (row === table.rowCount - table.bottomFrozenRowCount - 1) {
|
|
38961
|
+
rowHeight =
|
|
38962
|
+
canvasHeight -
|
|
38963
|
+
actualHeaderHeight -
|
|
38964
|
+
(update
|
|
38965
|
+
? newHeights.reduce((acr, cur, index) => {
|
|
38966
|
+
if (index >= table.frozenRowCount && index <= table.rowCount - table.bottomFrozenRowCount - 2) {
|
|
38967
|
+
return acr + cur;
|
|
38968
|
+
}
|
|
38969
|
+
return acr;
|
|
38970
|
+
}, 0)
|
|
38971
|
+
: table.getRowsHeight(table.frozenRowCount, table.rowCount - table.bottomFrozenRowCount - 2));
|
|
38972
|
+
}
|
|
38973
|
+
else {
|
|
38974
|
+
rowHeight = Math.round((update ? newHeights[row] : table.getRowHeight(row)) * factor);
|
|
38975
|
+
}
|
|
38929
38976
|
if (update) {
|
|
38930
|
-
newHeights[row] =
|
|
38977
|
+
newHeights[row] = rowHeight;
|
|
38931
38978
|
}
|
|
38932
38979
|
else {
|
|
38933
|
-
table.
|
|
38980
|
+
table._setRowHeight(row, rowHeight, false);
|
|
38934
38981
|
}
|
|
38935
38982
|
}
|
|
38936
38983
|
}
|
|
@@ -39045,7 +39092,7 @@
|
|
|
39045
39092
|
newHeights[row] = height;
|
|
39046
39093
|
}
|
|
39047
39094
|
else {
|
|
39048
|
-
table.
|
|
39095
|
+
table._setRowHeight(row, height);
|
|
39049
39096
|
}
|
|
39050
39097
|
}
|
|
39051
39098
|
}
|
|
@@ -39231,7 +39278,7 @@
|
|
|
39231
39278
|
}
|
|
39232
39279
|
|
|
39233
39280
|
function updateRowHeight(scene, row, detaY) {
|
|
39234
|
-
scene.table.
|
|
39281
|
+
scene.table._setRowHeight(row, scene.table.getRowHeight(row) + detaY, true);
|
|
39235
39282
|
for (let col = 0; col < scene.table.colCount; col++) {
|
|
39236
39283
|
const cell = scene.getCell(col, row);
|
|
39237
39284
|
const mergeInfo = getCellMergeInfo(scene.table, col, row);
|
|
@@ -39375,7 +39422,7 @@
|
|
|
39375
39422
|
}
|
|
39376
39423
|
|
|
39377
39424
|
function updateColWidth(scene, col, detaX) {
|
|
39378
|
-
scene.table.
|
|
39425
|
+
scene.table._setColWidth(col, scene.table.getColWidth(col) + detaX, true);
|
|
39379
39426
|
const autoRowHeight = scene.table.heightMode === 'autoHeight';
|
|
39380
39427
|
const colOrCornerHeaderColumn = scene.getColGroup(col, true);
|
|
39381
39428
|
if (colOrCornerHeaderColumn) {
|
|
@@ -39393,9 +39440,13 @@
|
|
|
39393
39440
|
if (bottomColumn) {
|
|
39394
39441
|
updateColunmWidth(bottomColumn, detaX, autoRowHeight, 'bottom', scene);
|
|
39395
39442
|
}
|
|
39443
|
+
const rightTopColumn = scene.getColGroupInRightTopCorner(col);
|
|
39444
|
+
if (rightTopColumn) {
|
|
39445
|
+
updateColunmWidth(rightTopColumn, detaX, autoRowHeight, 'right-top', scene);
|
|
39446
|
+
}
|
|
39396
39447
|
const rightBottomColumn = scene.getColGroupInRightBottomCorner(col);
|
|
39397
39448
|
if (rightBottomColumn) {
|
|
39398
|
-
updateColunmWidth(
|
|
39449
|
+
updateColunmWidth(rightBottomColumn, detaX, autoRowHeight, 'right-bottom', scene);
|
|
39399
39450
|
}
|
|
39400
39451
|
if (col < scene.frozenColCount) {
|
|
39401
39452
|
scene.cornerHeaderGroup.forEachChildrenSkipChild((column, index) => {
|
|
@@ -39488,11 +39539,19 @@
|
|
|
39488
39539
|
colGroup = scene.getColGroupInLeftBottomCorner(col);
|
|
39489
39540
|
oldContainerHeight = scene.leftBottomCornerGroup.attribute.height ?? 0;
|
|
39490
39541
|
}
|
|
39542
|
+
else if (mode === 'right-top') {
|
|
39543
|
+
row = 0;
|
|
39544
|
+
colGroup = scene.getColGroupInRightTopCorner(col);
|
|
39545
|
+
oldContainerHeight = scene.rightTopCornerGroup.attribute.height ?? 0;
|
|
39546
|
+
}
|
|
39491
39547
|
else if (mode === 'right-bottom') {
|
|
39492
39548
|
row = scene.table.rowCount - scene.table.bottomFrozenRowCount;
|
|
39493
39549
|
colGroup = scene.getColGroupInRightBottomCorner(col);
|
|
39494
39550
|
oldContainerHeight = scene.rightBottomCornerGroup.attribute.height ?? 0;
|
|
39495
39551
|
}
|
|
39552
|
+
if (!colGroup) {
|
|
39553
|
+
continue;
|
|
39554
|
+
}
|
|
39496
39555
|
let y = 0;
|
|
39497
39556
|
colGroup.forEachChildren((cellGroup) => {
|
|
39498
39557
|
cellGroup.setAttribute('y', y);
|
|
@@ -39641,7 +39700,7 @@
|
|
|
39641
39700
|
}
|
|
39642
39701
|
function resetRowHeight(scene, row) {
|
|
39643
39702
|
const maxHeight = computeRowHeight(row, 0, scene.table.colCount - 1, scene.table);
|
|
39644
|
-
scene.table.
|
|
39703
|
+
scene.table._setRowHeight(row, maxHeight, true);
|
|
39645
39704
|
for (let col = 0; col < scene.table.colCount; col++) {
|
|
39646
39705
|
const distHeight = maxHeight;
|
|
39647
39706
|
const cell = scene.highPerformanceGetCell(col, row);
|
|
@@ -40039,7 +40098,7 @@
|
|
|
40039
40098
|
let symbolRotate = Math.PI;
|
|
40040
40099
|
const linePoints = [];
|
|
40041
40100
|
if (cellLocation === 'columnHeader') {
|
|
40042
|
-
rectX = this.table.getColsWidth(0, col - 1) - this.table.
|
|
40101
|
+
rectX = this.table.getColsWidth(0, col - 1) - this.table.stateManager.scroll.horizontalBarPos;
|
|
40043
40102
|
rectY = this.table.getRowsHeight(0, this.table.frozenRowCount - 1);
|
|
40044
40103
|
rectHeight = this.table.tableNoFrameHeight;
|
|
40045
40104
|
if (mergeInfo) {
|
|
@@ -40055,7 +40114,7 @@
|
|
|
40055
40114
|
linePoints.push({ x: 0, y: this.table.tableNoFrameHeight });
|
|
40056
40115
|
}
|
|
40057
40116
|
else if (cellLocation === 'rowHeader') {
|
|
40058
|
-
rectY = this.table.getRowsHeight(0, row - 1) - this.table.
|
|
40117
|
+
rectY = this.table.getRowsHeight(0, row - 1) - this.table.stateManager.scroll.verticalBarPos;
|
|
40059
40118
|
rectX = this.table.getColsWidth(0, this.table.frozenColCount - 1);
|
|
40060
40119
|
rectWidth = this.table.tableNoFrameWidth;
|
|
40061
40120
|
if (mergeInfo) {
|
|
@@ -40100,13 +40159,13 @@
|
|
|
40100
40159
|
}
|
|
40101
40160
|
update(backX, lineX, backY, lineY) {
|
|
40102
40161
|
if (typeof backX === 'number' && typeof lineX === 'number') {
|
|
40103
|
-
this.columnMoverLabel.setAttribute('x', lineX - this.table.
|
|
40104
|
-
this.columnMoverLine.setAttribute('x', lineX - this.table.
|
|
40162
|
+
this.columnMoverLabel.setAttribute('x', lineX - this.table.stateManager.scroll.horizontalBarPos);
|
|
40163
|
+
this.columnMoverLine.setAttribute('x', lineX - this.table.stateManager.scroll.horizontalBarPos);
|
|
40105
40164
|
this.columnMoverBack.setAttribute('x', backX);
|
|
40106
40165
|
}
|
|
40107
40166
|
else if (typeof backY === 'number' && typeof lineY === 'number') {
|
|
40108
|
-
this.columnMoverLabel.setAttribute('y', lineY - this.table.
|
|
40109
|
-
this.columnMoverLine.setAttribute('y', lineY - this.table.
|
|
40167
|
+
this.columnMoverLabel.setAttribute('y', lineY - this.table.stateManager.scroll.verticalBarPos);
|
|
40168
|
+
this.columnMoverLine.setAttribute('y', lineY - this.table.stateManager.scroll.verticalBarPos);
|
|
40110
40169
|
this.columnMoverBack.setAttribute('y', backY);
|
|
40111
40170
|
}
|
|
40112
40171
|
}
|
|
@@ -40285,8 +40344,8 @@
|
|
|
40285
40344
|
this.vScrollBar.hideAll();
|
|
40286
40345
|
}
|
|
40287
40346
|
updateScrollBar() {
|
|
40288
|
-
const oldHorizontalBarPos = this.table.
|
|
40289
|
-
const oldVerticalBarPos = this.table.
|
|
40347
|
+
const oldHorizontalBarPos = this.table.stateManager.scroll.horizontalBarPos;
|
|
40348
|
+
const oldVerticalBarPos = this.table.stateManager.scroll.verticalBarPos;
|
|
40290
40349
|
const theme = this.table.theme;
|
|
40291
40350
|
const width = theme.scrollStyle?.width;
|
|
40292
40351
|
const visible = theme.scrollStyle?.visible;
|
|
@@ -40352,8 +40411,8 @@
|
|
|
40352
40411
|
visible: false
|
|
40353
40412
|
});
|
|
40354
40413
|
}
|
|
40355
|
-
this.table.
|
|
40356
|
-
this.table.
|
|
40414
|
+
this.table.stateManager.setScrollLeft(oldHorizontalBarPos);
|
|
40415
|
+
this.table.stateManager.setScrollTop(oldVerticalBarPos);
|
|
40357
40416
|
}
|
|
40358
40417
|
hideResizeCol() {
|
|
40359
40418
|
this.columnResizeLine.setAttribute('visible', false);
|
|
@@ -40666,16 +40725,10 @@
|
|
|
40666
40725
|
}
|
|
40667
40726
|
axes.forEach((axis, index) => {
|
|
40668
40727
|
if (axis.type === 'linear') {
|
|
40669
|
-
|
|
40670
|
-
chartAxis._domain = {
|
|
40671
|
-
min: axis.range?.min ?? 0,
|
|
40672
|
-
max: axis.range?.max ?? 0
|
|
40673
|
-
};
|
|
40728
|
+
chartInstance.updateModelSpecSync({ type: 'axes', index }, { min: axis.range?.min ?? 0, max: axis.range?.max ?? 0 }, true);
|
|
40674
40729
|
}
|
|
40675
40730
|
else if (axis.type === 'band') {
|
|
40676
|
-
|
|
40677
|
-
chartAxis._spec.domain = axis.domain.slice(0);
|
|
40678
|
-
chartAxis.updateScaleDomain();
|
|
40731
|
+
chartInstance.updateModelSpec({ type: 'axes', index }, { domain: axis.domain.slice(0) }, true);
|
|
40679
40732
|
}
|
|
40680
40733
|
});
|
|
40681
40734
|
chartInstance.updateViewBox({
|
|
@@ -40905,7 +40958,7 @@
|
|
|
40905
40958
|
isValid$6(cellGroup.mergeEndRow)) {
|
|
40906
40959
|
for (let col = cellGroup.mergeStartCol; col <= cellGroup.mergeEndCol; col++) {
|
|
40907
40960
|
for (let row = cellGroup.mergeStartRow; row <= cellGroup.mergeEndRow; row++) {
|
|
40908
|
-
const key = isCellHover(table.
|
|
40961
|
+
const key = isCellHover(table.stateManager, col, row);
|
|
40909
40962
|
if (key && (!colorKey || key === 'cellBgColor')) {
|
|
40910
40963
|
colorKey = key;
|
|
40911
40964
|
}
|
|
@@ -40913,7 +40966,7 @@
|
|
|
40913
40966
|
}
|
|
40914
40967
|
}
|
|
40915
40968
|
else if (cellGroup.role === 'cell') {
|
|
40916
|
-
colorKey = isCellHover(table.
|
|
40969
|
+
colorKey = isCellHover(table.stateManager, cellGroup.col, cellGroup.row);
|
|
40917
40970
|
}
|
|
40918
40971
|
if (!colorKey) {
|
|
40919
40972
|
return undefined;
|
|
@@ -41291,7 +41344,7 @@
|
|
|
41291
41344
|
drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb, doFillOrStroke) {
|
|
41292
41345
|
if (group.role === 'cell') {
|
|
41293
41346
|
const table = group.stage.table;
|
|
41294
|
-
if (table.
|
|
41347
|
+
if (table.stateManager.interactionState !== InteractionState.scrolling) {
|
|
41295
41348
|
const hoverColor = getCellHoverColor(group, table);
|
|
41296
41349
|
if (hoverColor) {
|
|
41297
41350
|
group.oldColor = group.attribute.fill;
|
|
@@ -41469,7 +41522,7 @@
|
|
|
41469
41522
|
newWidths[col] = maxWidth;
|
|
41470
41523
|
}
|
|
41471
41524
|
else {
|
|
41472
|
-
table.
|
|
41525
|
+
table._setColWidth(col, maxWidth, false, true);
|
|
41473
41526
|
}
|
|
41474
41527
|
}
|
|
41475
41528
|
if (table.widthMode === 'adaptive') {
|
|
@@ -41505,7 +41558,7 @@
|
|
|
41505
41558
|
newWidths[col] = colWidth;
|
|
41506
41559
|
}
|
|
41507
41560
|
else {
|
|
41508
|
-
table.
|
|
41561
|
+
table._setColWidth(col, colWidth, false, true);
|
|
41509
41562
|
}
|
|
41510
41563
|
}
|
|
41511
41564
|
}
|
|
@@ -41524,11 +41577,28 @@
|
|
|
41524
41577
|
if (actualWidth < canvasWidth && actualWidth - actualHeaderWidth > 0) {
|
|
41525
41578
|
const factor = (canvasWidth - actualHeaderWidth) / (actualWidth - actualHeaderWidth);
|
|
41526
41579
|
for (let col = table.frozenColCount; col < table.colCount - table.rightFrozenColCount; col++) {
|
|
41580
|
+
let colWidth;
|
|
41581
|
+
if (col === table.colCount - table.rightFrozenColCount - 1) {
|
|
41582
|
+
colWidth =
|
|
41583
|
+
canvasWidth -
|
|
41584
|
+
actualHeaderWidth -
|
|
41585
|
+
(update
|
|
41586
|
+
? newWidths.reduce((acr, cur, index) => {
|
|
41587
|
+
if (index >= table.frozenColCount && index <= table.colCount - table.rightFrozenColCount - 2) {
|
|
41588
|
+
return acr + cur;
|
|
41589
|
+
}
|
|
41590
|
+
return acr;
|
|
41591
|
+
}, 0)
|
|
41592
|
+
: table.getColsWidth(table.frozenColCount, table.colCount - table.rightFrozenColCount - 2));
|
|
41593
|
+
}
|
|
41594
|
+
else {
|
|
41595
|
+
colWidth = Math.round((update ? newWidths[col] : table.getColWidth(col)) * factor);
|
|
41596
|
+
}
|
|
41527
41597
|
if (update) {
|
|
41528
|
-
newWidths[col] =
|
|
41598
|
+
newWidths[col] = colWidth;
|
|
41529
41599
|
}
|
|
41530
41600
|
else {
|
|
41531
|
-
table.
|
|
41601
|
+
table._setColWidth(col, colWidth, false, true);
|
|
41532
41602
|
}
|
|
41533
41603
|
}
|
|
41534
41604
|
}
|
|
@@ -41801,7 +41871,7 @@
|
|
|
41801
41871
|
containerGroup.setAttribute('height', heightMax);
|
|
41802
41872
|
}
|
|
41803
41873
|
|
|
41804
|
-
|
|
41874
|
+
function createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, rightFrozenGroup, bottomFrozenGroup, bodyGroup, xOrigin, yOrigin, proxy) {
|
|
41805
41875
|
const { table } = proxy;
|
|
41806
41876
|
const { leftBottomCornerGroup, rightTopCornerGroup, rightBottomCornerGroup } = table.scenegraph;
|
|
41807
41877
|
proxy.setParamsForRow();
|
|
@@ -41837,24 +41907,23 @@
|
|
|
41837
41907
|
y: table.getFrozenRowsHeight()
|
|
41838
41908
|
});
|
|
41839
41909
|
createColGroup(cornerHeaderGroup, xOrigin, yOrigin, 0, table.frozenColCount - 1, 0, table.columnHeaderLevelCount - 1, table.isListTable() ? 'columnHeader' : 'cornerHeader', table);
|
|
41840
|
-
|
|
41910
|
+
distCol - table.rightFrozenColCount >= table.frozenColCount &&
|
|
41911
|
+
createColGroup(colHeaderGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, 0, table.columnHeaderLevelCount - 1, 'columnHeader', table);
|
|
41841
41912
|
createColGroup(rowHeaderGroup, xOrigin, yOrigin, 0, table.frozenColCount - 1, table.columnHeaderLevelCount, distRow - table.bottomFrozenRowCount, table.isListTable() && !table.internalProps.transpose ? 'body' : 'rowHeader', table);
|
|
41842
41913
|
if (table.bottomFrozenRowCount > 0) {
|
|
41843
|
-
|
|
41844
|
-
|
|
41845
|
-
|
|
41846
|
-
createColGroup(bottomFrozenGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, table.isPivotChart() ? 'rowHeader' : 'body', table);
|
|
41914
|
+
createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, 0, table.frozenColCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, table.isListTable() ? 'body' : 'rowHeader', table);
|
|
41915
|
+
distCol - table.rightFrozenColCount >= table.frozenColCount &&
|
|
41916
|
+
createColGroup(bottomFrozenGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, table.isPivotChart() ? 'rowHeader' : 'body', table);
|
|
41847
41917
|
}
|
|
41848
41918
|
if (table.rightFrozenColCount > 0) {
|
|
41849
|
-
|
|
41850
|
-
createColGroup(rightTopCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, 0, table.columnHeaderLevelCount - 1, 'columnHeader', table);
|
|
41851
|
-
}
|
|
41919
|
+
createColGroup(rightTopCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, 0, table.columnHeaderLevelCount - 1, 'columnHeader', table);
|
|
41852
41920
|
createColGroup(rightFrozenGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.columnHeaderLevelCount, distRow - table.bottomFrozenRowCount, table.isPivotChart() ? 'rowHeader' : 'body', table);
|
|
41853
41921
|
}
|
|
41854
|
-
if (table.bottomFrozenRowCount > 0 && table.rightFrozenColCount > 0
|
|
41922
|
+
if (table.bottomFrozenRowCount > 0 && table.rightFrozenColCount > 0) {
|
|
41855
41923
|
createColGroup(rightBottomCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, 'body', table);
|
|
41856
41924
|
}
|
|
41857
|
-
|
|
41925
|
+
distCol - table.rightFrozenColCount >= table.frozenColCount &&
|
|
41926
|
+
createColGroup(bodyGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.columnHeaderLevelCount, distRow - table.bottomFrozenRowCount, 'body', table);
|
|
41858
41927
|
if (!bodyGroup.firstChild && !colHeaderGroup.firstChild) {
|
|
41859
41928
|
proxy.currentRow = proxy.totalRow;
|
|
41860
41929
|
proxy.rowEnd = proxy.currentRow;
|
|
@@ -41875,7 +41944,7 @@
|
|
|
41875
41944
|
proxy.colEnd = proxy.currentCol;
|
|
41876
41945
|
proxy.colUpdatePos = proxy.colEnd + 1;
|
|
41877
41946
|
proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);
|
|
41878
|
-
|
|
41947
|
+
proxy.progress();
|
|
41879
41948
|
}
|
|
41880
41949
|
}
|
|
41881
41950
|
|
|
@@ -42535,8 +42604,8 @@
|
|
|
42535
42604
|
this.firstScreenRowLimit = this.bodyTopRow + Math.min(this.rowLimit, Math.ceil(heightLimit / defaultRowHeight));
|
|
42536
42605
|
this.rowUpdatePos = this.bodyBottomRow;
|
|
42537
42606
|
}
|
|
42538
|
-
|
|
42539
|
-
|
|
42607
|
+
createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, rightFrozenGroup, bottomFrozenGroup, bodyGroup, xOrigin, yOrigin) {
|
|
42608
|
+
createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, rightFrozenGroup, bottomFrozenGroup, bodyGroup, xOrigin, yOrigin, this);
|
|
42540
42609
|
}
|
|
42541
42610
|
async progress() {
|
|
42542
42611
|
if (this.isProgressing) {
|
|
@@ -42735,7 +42804,7 @@
|
|
|
42735
42804
|
cellGroup.needUpdateForAutoRowHeight = true;
|
|
42736
42805
|
}
|
|
42737
42806
|
updateCellGroupContent(cellGroup) {
|
|
42738
|
-
if (!cellGroup.needUpdate) {
|
|
42807
|
+
if (!cellGroup.needUpdate || cellGroup.role !== 'cell') {
|
|
42739
42808
|
return cellGroup;
|
|
42740
42809
|
}
|
|
42741
42810
|
const newCellGroup = this.table.scenegraph.updateCellContent(cellGroup.col, cellGroup.row);
|
|
@@ -42860,13 +42929,27 @@
|
|
|
42860
42929
|
const updateRowStart = Math.min(sourceRowStart, targetRowStart);
|
|
42861
42930
|
const updateRowEnd = Math.max(sourceRowEnd, targetRowEnd);
|
|
42862
42931
|
for (let col = updateColStart; col <= updateColEnd; col++) {
|
|
42932
|
+
const columnWidth = table.getColWidth(col);
|
|
42863
42933
|
const columnHeaderGroup = table.scenegraph.getColGroup(col, true);
|
|
42864
42934
|
const columnGroup = table.scenegraph.getColGroup(col);
|
|
42935
|
+
const columnBottomGroup = table.scenegraph.getColGroupInBottom(col);
|
|
42865
42936
|
if (columnHeaderGroup) {
|
|
42866
|
-
columnHeaderGroup.setAttribute('width',
|
|
42937
|
+
columnHeaderGroup.setAttribute('width', columnWidth);
|
|
42938
|
+
columnHeaderGroup.forEachChildren((child) => {
|
|
42939
|
+
child.setAttribute('width', columnWidth);
|
|
42940
|
+
});
|
|
42867
42941
|
}
|
|
42868
42942
|
if (columnGroup) {
|
|
42869
|
-
columnGroup.setAttribute('width',
|
|
42943
|
+
columnGroup.setAttribute('width', columnWidth);
|
|
42944
|
+
columnGroup.forEachChildren((child) => {
|
|
42945
|
+
child.setAttribute('width', columnWidth);
|
|
42946
|
+
});
|
|
42947
|
+
}
|
|
42948
|
+
if (columnBottomGroup) {
|
|
42949
|
+
columnBottomGroup.setAttribute('width', columnWidth);
|
|
42950
|
+
columnBottomGroup.forEachChildren((child) => {
|
|
42951
|
+
child.setAttribute('width', columnWidth);
|
|
42952
|
+
});
|
|
42870
42953
|
}
|
|
42871
42954
|
}
|
|
42872
42955
|
scene.updateContainer();
|
|
@@ -43325,7 +43408,7 @@
|
|
|
43325
43408
|
updateAfter = updateAfter || needUpdateAfter;
|
|
43326
43409
|
scene.table.rowHeightsMap.adjustOrder(row, row + 1, scene.table.rowHeightsMap.count() - row);
|
|
43327
43410
|
});
|
|
43328
|
-
|
|
43411
|
+
resetRowNumberAndY(scene);
|
|
43329
43412
|
updateCells.forEach(cell => {
|
|
43330
43413
|
if (!cell) {
|
|
43331
43414
|
return;
|
|
@@ -43364,6 +43447,7 @@
|
|
|
43364
43447
|
scene.proxy.updateCellGroups(scene.proxy.screenRowCount * 2);
|
|
43365
43448
|
scene.proxy.progress();
|
|
43366
43449
|
}
|
|
43450
|
+
const newTotalHeight = table.getRowsHeight(table.frozenRowCount, table.rowCount - 1);
|
|
43367
43451
|
scene.updateContainerHeight(scene.table.frozenRowCount, newTotalHeight - scene.bodyGroup.attribute.height);
|
|
43368
43452
|
}
|
|
43369
43453
|
function removeRow(row, scene) {
|
|
@@ -43829,6 +43913,12 @@
|
|
|
43829
43913
|
scene.leftBottomCornerGroup.appendChild(column);
|
|
43830
43914
|
scene.leftBottomCornerGroup.setAttribute('width', scene.leftBottomCornerGroup.attribute.width + column.attribute.width);
|
|
43831
43915
|
scene.bottomFrozenGroup.setAttribute('width', scene.bottomFrozenGroup.attribute.width - column.attribute.width);
|
|
43916
|
+
column.forEachChildren((child) => {
|
|
43917
|
+
child.setAttributes({
|
|
43918
|
+
stroke: false,
|
|
43919
|
+
fill: false
|
|
43920
|
+
});
|
|
43921
|
+
});
|
|
43832
43922
|
}
|
|
43833
43923
|
}
|
|
43834
43924
|
function moveColumnFromLeftBottomCornerToBottom(scene) {
|
|
@@ -43839,6 +43929,15 @@
|
|
|
43839
43929
|
insertBefore(scene.bottomFrozenGroup, column, scene.bottomFrozenGroup.firstChild);
|
|
43840
43930
|
scene.bottomFrozenGroup.setAttribute('width', scene.bottomFrozenGroup.attribute.width + column.attribute.width);
|
|
43841
43931
|
scene.leftBottomCornerGroup.setAttribute('width', scene.leftBottomCornerGroup.attribute.width - column.attribute.width);
|
|
43932
|
+
column.forEachChildren((child) => {
|
|
43933
|
+
const cellStyle = scene.table._getCellStyle(child.col, child.row);
|
|
43934
|
+
const range = scene.table.getCellRange(child.col, child.row);
|
|
43935
|
+
const cellTheme = getStyleTheme(cellStyle, scene.table, range ? range.start.col : child.col, range ? range.start.row : child.row, getProp).theme;
|
|
43936
|
+
child.setAttributes({
|
|
43937
|
+
fill: cellTheme?.group?.fill ?? undefined,
|
|
43938
|
+
stroke: cellTheme?.group?.stroke ?? undefined
|
|
43939
|
+
});
|
|
43940
|
+
});
|
|
43842
43941
|
}
|
|
43843
43942
|
}
|
|
43844
43943
|
function dealRightFrozen(distRightFrozenCol, scene) {
|
|
@@ -44366,7 +44465,7 @@
|
|
|
44366
44465
|
return;
|
|
44367
44466
|
}
|
|
44368
44467
|
updateCellRangeIcon(col, row, (icon) => icon.attribute.visibleTime === 'mouseenter_cell', (icon) => {
|
|
44369
|
-
icon.setAttribute('
|
|
44468
|
+
icon.setAttribute('opacity', 0);
|
|
44370
44469
|
}, scene);
|
|
44371
44470
|
scene.updateNextFrame();
|
|
44372
44471
|
}
|
|
@@ -44375,7 +44474,7 @@
|
|
|
44375
44474
|
return;
|
|
44376
44475
|
}
|
|
44377
44476
|
updateCellRangeIcon(col, row, (icon) => icon.attribute.visibleTime === 'mouseenter_cell', (icon) => {
|
|
44378
|
-
icon.setAttribute('
|
|
44477
|
+
icon.setAttribute('opacity', 1);
|
|
44379
44478
|
}, scene);
|
|
44380
44479
|
scene.updateNextFrame();
|
|
44381
44480
|
}
|
|
@@ -44384,7 +44483,7 @@
|
|
|
44384
44483
|
return;
|
|
44385
44484
|
}
|
|
44386
44485
|
updateCellRangeIcon(col, row, (icon) => icon.attribute.visibleTime === 'click_cell', (icon) => {
|
|
44387
|
-
icon.setAttribute('
|
|
44486
|
+
icon.setAttribute('opacity', 0);
|
|
44388
44487
|
}, scene);
|
|
44389
44488
|
scene.updateNextFrame();
|
|
44390
44489
|
}
|
|
@@ -44393,7 +44492,7 @@
|
|
|
44393
44492
|
return;
|
|
44394
44493
|
}
|
|
44395
44494
|
updateCellRangeIcon(col, row, (icon) => icon.attribute.visibleTime === 'click_cell', (icon) => {
|
|
44396
|
-
icon.setAttribute('
|
|
44495
|
+
icon.setAttribute('opacity', 1);
|
|
44397
44496
|
}, scene);
|
|
44398
44497
|
scene.updateNextFrame();
|
|
44399
44498
|
}
|
|
@@ -44821,6 +44920,10 @@
|
|
|
44821
44920
|
}
|
|
44822
44921
|
this.proxy?.release();
|
|
44823
44922
|
}
|
|
44923
|
+
updateStageBackground() {
|
|
44924
|
+
this.stage.background = this.table.theme.underlayBackgroundColor;
|
|
44925
|
+
this.stage.renderNextFrame();
|
|
44926
|
+
}
|
|
44824
44927
|
createComponent() {
|
|
44825
44928
|
this.component = new TableComponent(this.table);
|
|
44826
44929
|
this.component.addToGroup(this.componentGroup);
|
|
@@ -44939,7 +45042,7 @@
|
|
|
44939
45042
|
this.stage.renderNextFrame();
|
|
44940
45043
|
}
|
|
44941
45044
|
resetAllSelectComponent() {
|
|
44942
|
-
if (this.table.
|
|
45045
|
+
if (this.table.stateManager.select?.ranges?.length > 0) {
|
|
44943
45046
|
updateAllSelectComponent(this);
|
|
44944
45047
|
}
|
|
44945
45048
|
}
|
|
@@ -45127,8 +45230,8 @@
|
|
|
45127
45230
|
width: Math.min(this.table.tableNoFrameWidth, Math.max(this.colHeaderGroup.attribute.width, this.bodyGroup.attribute.width, 0) +
|
|
45128
45231
|
Math.max(this.cornerHeaderGroup.attribute.width, this.rowHeaderGroup.attribute.width, 0) +
|
|
45129
45232
|
this.rightBottomCornerGroup.attribute.width),
|
|
45130
|
-
height: Math.min(this.table.tableNoFrameHeight, (this.colHeaderGroup.attribute.height
|
|
45131
|
-
(this.bodyGroup.attribute.height
|
|
45233
|
+
height: Math.min(this.table.tableNoFrameHeight, Math.max(this.colHeaderGroup.attribute.height, this.cornerHeaderGroup.attribute.height, 0) +
|
|
45234
|
+
Math.max(this.rowHeaderGroup.attribute.height, this.bodyGroup.attribute.height, 0) +
|
|
45132
45235
|
this.bottomFrozenGroup.attribute.height)
|
|
45133
45236
|
});
|
|
45134
45237
|
if (this.tableGroup.border) {
|
|
@@ -45256,7 +45359,7 @@
|
|
|
45256
45359
|
if (!this.isPivot && !this.transpose) {
|
|
45257
45360
|
this.component.setFrozenColumnShadow(this.table.frozenColCount - 1);
|
|
45258
45361
|
}
|
|
45259
|
-
this.table.
|
|
45362
|
+
this.table.stateManager.checkFrozen();
|
|
45260
45363
|
this.updateContainer();
|
|
45261
45364
|
this.createFrameBorder();
|
|
45262
45365
|
this.updateBorderSizeAndPosition();
|
|
@@ -45299,7 +45402,17 @@
|
|
|
45299
45402
|
if (actualWidth < canvasWidth && actualWidth - actualHeaderWidth > 0) {
|
|
45300
45403
|
const factor = (canvasWidth - actualHeaderWidth) / (actualWidth - actualHeaderWidth);
|
|
45301
45404
|
for (let col = table.frozenColCount; col < table.colCount - table.rightFrozenColCount; col++) {
|
|
45302
|
-
|
|
45405
|
+
let colWidth;
|
|
45406
|
+
if (col === table.colCount - table.rightFrozenColCount - 1) {
|
|
45407
|
+
colWidth =
|
|
45408
|
+
canvasWidth -
|
|
45409
|
+
actualHeaderWidth -
|
|
45410
|
+
table.getColsWidth(table.frozenColCount, table.colCount - table.rightFrozenColCount - 2);
|
|
45411
|
+
}
|
|
45412
|
+
else {
|
|
45413
|
+
colWidth = Math.round(table.getColWidth(col) * factor);
|
|
45414
|
+
}
|
|
45415
|
+
this.setColWidth(col, colWidth);
|
|
45303
45416
|
}
|
|
45304
45417
|
}
|
|
45305
45418
|
}
|
|
@@ -45367,7 +45480,17 @@
|
|
|
45367
45480
|
if (actualHeight < canvasHeight && actualHeight - actualHeaderHeight > 0) {
|
|
45368
45481
|
const factor = (canvasHeight - actualHeaderHeight) / (actualHeight - actualHeaderHeight);
|
|
45369
45482
|
for (let row = table.frozenRowCount; row < table.rowCount - table.bottomFrozenRowCount; row++) {
|
|
45370
|
-
|
|
45483
|
+
let rowHeight;
|
|
45484
|
+
if (row === table.rowCount - table.bottomFrozenRowCount - 1) {
|
|
45485
|
+
rowHeight =
|
|
45486
|
+
canvasHeight -
|
|
45487
|
+
actualHeaderHeight -
|
|
45488
|
+
table.getRowsHeight(table.frozenRowCount, table.rowCount - table.bottomFrozenRowCount - 2);
|
|
45489
|
+
}
|
|
45490
|
+
else {
|
|
45491
|
+
rowHeight = Math.round(table.getRowHeight(row) * factor);
|
|
45492
|
+
}
|
|
45493
|
+
this.setRowHeight(row, rowHeight);
|
|
45371
45494
|
}
|
|
45372
45495
|
}
|
|
45373
45496
|
}
|
|
@@ -45426,18 +45549,19 @@
|
|
|
45426
45549
|
updateContainerAttrWidthAndX() {
|
|
45427
45550
|
const cornerX = updateContainerChildrenX(this.cornerHeaderGroup, 0);
|
|
45428
45551
|
const rowHeaderX = updateContainerChildrenX(this.rowHeaderGroup, 0);
|
|
45429
|
-
const colHeaderX = this.colHeaderGroup.hasChildNodes()
|
|
45552
|
+
const colHeaderX = this.colHeaderGroup.hasChildNodes() && this.colHeaderGroup.firstChild
|
|
45430
45553
|
? updateContainerChildrenX(this.colHeaderGroup, this.colHeaderGroup.firstChild.col > 0
|
|
45431
45554
|
? this.table.getColsWidth(this.table.frozenColCount ?? 0, this.colHeaderGroup.firstChild.col - 1)
|
|
45432
45555
|
: 0)
|
|
45433
45556
|
: 0;
|
|
45434
|
-
const bodyX = this.bodyGroup.hasChildNodes()
|
|
45557
|
+
const bodyX = this.bodyGroup.hasChildNodes() && this.bodyGroup.firstChild
|
|
45435
45558
|
? updateContainerChildrenX(this.bodyGroup, this.bodyGroup.firstChild.col > 0
|
|
45436
45559
|
? this.table.getColsWidth(this.table.frozenColCount ?? 0, this.bodyGroup.firstChild.col - 1)
|
|
45437
45560
|
: 0)
|
|
45438
45561
|
: 0;
|
|
45439
45562
|
const rightX = updateContainerChildrenX(this.rightFrozenGroup, 0);
|
|
45440
45563
|
this.bottomFrozenGroup.hasChildNodes() &&
|
|
45564
|
+
this.bottomFrozenGroup.firstChild &&
|
|
45441
45565
|
updateContainerChildrenX(this.bottomFrozenGroup, this.bottomFrozenGroup.firstChild.col > 0
|
|
45442
45566
|
? this.table.getColsWidth(this.table.frozenColCount ?? 0, this.bottomFrozenGroup.firstChild.col - 1)
|
|
45443
45567
|
: 0);
|
|
@@ -45461,11 +45585,11 @@
|
|
|
45461
45585
|
updateContainer() {
|
|
45462
45586
|
this.updateContainerAttrWidthAndX();
|
|
45463
45587
|
this.updateTableSize();
|
|
45464
|
-
const oldHorizontalBarPos = this.table.
|
|
45465
|
-
const oldVerticalBarPos = this.table.
|
|
45588
|
+
const oldHorizontalBarPos = this.table.stateManager.scroll.horizontalBarPos;
|
|
45589
|
+
const oldVerticalBarPos = this.table.stateManager.scroll.verticalBarPos;
|
|
45466
45590
|
this.component.updateScrollBar();
|
|
45467
|
-
this.table.
|
|
45468
|
-
this.table.
|
|
45591
|
+
this.table.stateManager.setScrollLeft(oldHorizontalBarPos);
|
|
45592
|
+
this.table.stateManager.setScrollTop(oldVerticalBarPos);
|
|
45469
45593
|
this.updateNextFrame();
|
|
45470
45594
|
}
|
|
45471
45595
|
updateCellContentWhileResize(col, row) {
|
|
@@ -45612,7 +45736,7 @@
|
|
|
45612
45736
|
updateRow(removeCells, addCells, updateCells, this.table);
|
|
45613
45737
|
this.recalculateColWidths();
|
|
45614
45738
|
this.recalculateRowHeights();
|
|
45615
|
-
this.table.
|
|
45739
|
+
this.table.stateManager.checkFrozen();
|
|
45616
45740
|
if (!this.isPivot && !this.transpose) {
|
|
45617
45741
|
this.component.setFrozenColumnShadow(this.table.frozenColCount - 1);
|
|
45618
45742
|
}
|
|
@@ -45880,13 +46004,13 @@
|
|
|
45880
46004
|
return;
|
|
45881
46005
|
}
|
|
45882
46006
|
table.internalProps.sortState = tableState;
|
|
45883
|
-
table.
|
|
46007
|
+
table.stateManager.setSortState(tableState);
|
|
45884
46008
|
if (headerC?.sort) {
|
|
45885
46009
|
executeSort(tableState, table, headerC);
|
|
45886
46010
|
}
|
|
45887
46011
|
table.internalProps.layoutMap.clearCellRangeMap();
|
|
45888
46012
|
table.scenegraph.sortCell();
|
|
45889
|
-
table.
|
|
46013
|
+
table.stateManager.updateSelectPos(-1, -1);
|
|
45890
46014
|
}
|
|
45891
46015
|
function executeSort(newState, table, headerDefine) {
|
|
45892
46016
|
let hd;
|
|
@@ -45922,9 +46046,6 @@
|
|
|
45922
46046
|
col = -1;
|
|
45923
46047
|
row = -1;
|
|
45924
46048
|
}
|
|
45925
|
-
if (cellPos.col === col && cellPos.row === row) {
|
|
45926
|
-
return;
|
|
45927
|
-
}
|
|
45928
46049
|
if (col !== -1 && row !== -1 && state.select.ranges.length > 0) {
|
|
45929
46050
|
if (interactionState === InteractionState.grabing) {
|
|
45930
46051
|
const currentRange = state.select.ranges[state.select.ranges.length - 1];
|
|
@@ -46235,7 +46356,7 @@
|
|
|
46235
46356
|
const cellLocation = state.table.getCellLocation(col, row);
|
|
46236
46357
|
const delta = cellLocation === 'columnHeader' ? state.columnMove.x : cellLocation === 'rowHeader' ? state.columnMove.y : 0;
|
|
46237
46358
|
state.table.scenegraph.component.showMoveCol(col, row, delta);
|
|
46238
|
-
state.table.
|
|
46359
|
+
state.table.stateManager.updateSelectPos(-1, -1);
|
|
46239
46360
|
state.table.scenegraph.updateNextFrame();
|
|
46240
46361
|
}
|
|
46241
46362
|
function updateMoveCol(col, row, x, y, state) {
|
|
@@ -46505,7 +46626,7 @@
|
|
|
46505
46626
|
}
|
|
46506
46627
|
}
|
|
46507
46628
|
|
|
46508
|
-
class
|
|
46629
|
+
class StateManager {
|
|
46509
46630
|
table;
|
|
46510
46631
|
interactionState;
|
|
46511
46632
|
select;
|
|
@@ -46791,7 +46912,7 @@
|
|
|
46791
46912
|
this.columnResize.x = x;
|
|
46792
46913
|
this.columnResize.isRightFrozen = isRightFrozen;
|
|
46793
46914
|
this.table.scenegraph.component.showResizeCol(col, y, isRightFrozen);
|
|
46794
|
-
this.table.
|
|
46915
|
+
this.table.stateManager.updateSelectPos(-1, -1);
|
|
46795
46916
|
this.table.scenegraph.updateNextFrame();
|
|
46796
46917
|
}
|
|
46797
46918
|
updateResizeCol(xInTable, yInTable) {
|
|
@@ -46841,7 +46962,7 @@
|
|
|
46841
46962
|
const totalHeight = this.table.getAllRowsHeight();
|
|
46842
46963
|
this.scroll.verticalBarPos = Math.ceil(yRatio * (totalHeight - this.table.scenegraph.height));
|
|
46843
46964
|
this.table.scenegraph.setY(-this.scroll.verticalBarPos);
|
|
46844
|
-
this.table.
|
|
46965
|
+
this.table.stateManager.updateHoverPos(-1, -1);
|
|
46845
46966
|
this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
|
|
46846
46967
|
scrollTop: this.scroll.verticalBarPos,
|
|
46847
46968
|
scrollLeft: this.scroll.horizontalBarPos,
|
|
@@ -46857,7 +46978,7 @@
|
|
|
46857
46978
|
const totalWidth = this.table.getAllColsWidth();
|
|
46858
46979
|
this.scroll.horizontalBarPos = Math.ceil(xRatio * (totalWidth - this.table.scenegraph.width));
|
|
46859
46980
|
this.table.scenegraph.setX(-this.scroll.horizontalBarPos);
|
|
46860
|
-
this.table.
|
|
46981
|
+
this.table.stateManager.updateHoverPos(-1, -1);
|
|
46861
46982
|
this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
|
|
46862
46983
|
scrollTop: this.scroll.verticalBarPos,
|
|
46863
46984
|
scrollLeft: this.scroll.horizontalBarPos,
|
|
@@ -46877,7 +46998,7 @@
|
|
|
46877
46998
|
this.table.scenegraph.setY(-top);
|
|
46878
46999
|
const yRatio = top / (totalHeight - this.table.scenegraph.height);
|
|
46879
47000
|
this.table.scenegraph.component.updateVerticalScrollBarPos(yRatio);
|
|
46880
|
-
this.table.
|
|
47001
|
+
this.table.stateManager.updateHoverPos(-1, -1);
|
|
46881
47002
|
this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
|
|
46882
47003
|
scrollTop: this.scroll.verticalBarPos,
|
|
46883
47004
|
scrollLeft: this.scroll.horizontalBarPos,
|
|
@@ -46898,7 +47019,7 @@
|
|
|
46898
47019
|
this.table.scenegraph.setX(-left);
|
|
46899
47020
|
const xRatio = left / (totalWidth - this.table.scenegraph.width);
|
|
46900
47021
|
this.table.scenegraph.component.updateHorizontalScrollBarPos(xRatio);
|
|
46901
|
-
this.table.
|
|
47022
|
+
this.table.stateManager.updateHoverPos(-1, -1);
|
|
46902
47023
|
this.table.fireListeners(TABLE_EVENT_TYPE.SCROLL, {
|
|
46903
47024
|
scrollTop: this.scroll.verticalBarPos,
|
|
46904
47025
|
scrollLeft: this.scroll.horizontalBarPos,
|
|
@@ -47399,18 +47520,18 @@
|
|
|
47399
47520
|
}
|
|
47400
47521
|
const dimension = table.internalProps.layoutMap.getHeaderDimension(col, row);
|
|
47401
47522
|
if (dimension?.drillDown || dimension?.drillUp) {
|
|
47402
|
-
table.
|
|
47523
|
+
table.stateManager.updateDrillState(dimension.dimensionKey, dimension.title, dimension.drillDown, dimension.drillUp, col, row);
|
|
47403
47524
|
}
|
|
47404
47525
|
else {
|
|
47405
|
-
table.
|
|
47526
|
+
table.stateManager.updateDrillState(undefined, undefined, false, false, -1, -1);
|
|
47406
47527
|
}
|
|
47407
47528
|
});
|
|
47408
47529
|
table.on(TABLE_EVENT_TYPE.MOUSELEAVE_TABLE, (e) => {
|
|
47409
|
-
table.
|
|
47530
|
+
table.stateManager.updateDrillState(undefined, undefined, false, false, -1, -1);
|
|
47410
47531
|
});
|
|
47411
47532
|
}
|
|
47412
47533
|
function drillClick(table) {
|
|
47413
|
-
table.fireListeners(PIVOT_TABLE_EVENT_TYPE.DRILLMENU_CLICK, table.
|
|
47534
|
+
table.fireListeners(PIVOT_TABLE_EVENT_TYPE.DRILLMENU_CLICK, table.stateManager.drill);
|
|
47414
47535
|
}
|
|
47415
47536
|
function checkHaveDrill(table) {
|
|
47416
47537
|
const rowsDefine = table.internalProps.layoutMap.rowsDefine;
|
|
@@ -47451,12 +47572,12 @@
|
|
|
47451
47572
|
const { col, row, x, y } = e;
|
|
47452
47573
|
const type = table.getBodyColumnType(col, row);
|
|
47453
47574
|
if (type !== 'sparkline') {
|
|
47454
|
-
table.
|
|
47575
|
+
table.stateManager.updateSparklineHoverPose(-1, -1, 0, 0);
|
|
47455
47576
|
}
|
|
47456
|
-
table.
|
|
47577
|
+
table.stateManager.updateSparklineHoverPose(col, row, x, y);
|
|
47457
47578
|
});
|
|
47458
47579
|
table.on(TABLE_EVENT_TYPE.MOUSELEAVE_TABLE, (e) => {
|
|
47459
|
-
table.
|
|
47580
|
+
table.stateManager.updateSparklineHoverPose(-1, -1, 0, 0);
|
|
47460
47581
|
});
|
|
47461
47582
|
}
|
|
47462
47583
|
|
|
@@ -47493,9 +47614,9 @@
|
|
|
47493
47614
|
let LastBodyPointerXY;
|
|
47494
47615
|
let isDown = false;
|
|
47495
47616
|
let isDraging = false;
|
|
47496
|
-
function bindTableGroupListener(
|
|
47497
|
-
const table =
|
|
47498
|
-
const
|
|
47617
|
+
function bindTableGroupListener(eventManager) {
|
|
47618
|
+
const table = eventManager.table;
|
|
47619
|
+
const stateManager = table.stateManager;
|
|
47499
47620
|
document.body.addEventListener('pointerdown', e => {
|
|
47500
47621
|
LastBodyPointerXY = { x: e.x, y: e.y };
|
|
47501
47622
|
isDown = true;
|
|
@@ -47514,16 +47635,16 @@
|
|
|
47514
47635
|
}
|
|
47515
47636
|
}
|
|
47516
47637
|
const { x, y } = table._getMouseAbstractPoint(e, false);
|
|
47517
|
-
if (
|
|
47638
|
+
if (stateManager.interactionState === InteractionState.scrolling) {
|
|
47518
47639
|
return;
|
|
47519
47640
|
}
|
|
47520
|
-
if (
|
|
47521
|
-
if (
|
|
47522
|
-
|
|
47641
|
+
if (stateManager.interactionState === InteractionState.grabing) {
|
|
47642
|
+
if (stateManager.isResizeCol()) {
|
|
47643
|
+
eventManager.dealColumnResize(x, y);
|
|
47523
47644
|
if (table.hasListeners(TABLE_EVENT_TYPE.RESIZE_COLUMN)) {
|
|
47524
47645
|
table.fireListeners(TABLE_EVENT_TYPE.RESIZE_COLUMN, {
|
|
47525
|
-
col: table.
|
|
47526
|
-
colWidth: table.getColWidth(table.
|
|
47646
|
+
col: table.stateManager.columnResize.col,
|
|
47647
|
+
colWidth: table.getColWidth(table.stateManager.columnResize.col)
|
|
47527
47648
|
});
|
|
47528
47649
|
}
|
|
47529
47650
|
}
|
|
@@ -47533,43 +47654,43 @@
|
|
|
47533
47654
|
const lastX = LastPointerXY?.x ?? e.x;
|
|
47534
47655
|
const lastY = LastPointerXY?.y ?? e.y;
|
|
47535
47656
|
LastPointerXY = { x: e.x, y: e.y };
|
|
47536
|
-
if (
|
|
47537
|
-
clearTimeout(
|
|
47538
|
-
|
|
47657
|
+
if (eventManager.touchSetTimeout) {
|
|
47658
|
+
clearTimeout(eventManager.touchSetTimeout);
|
|
47659
|
+
eventManager.touchSetTimeout = undefined;
|
|
47539
47660
|
}
|
|
47540
47661
|
const eventArgsSet = getCellEventArgsSet(e);
|
|
47541
|
-
if (
|
|
47662
|
+
if (stateManager.interactionState === InteractionState.scrolling) {
|
|
47542
47663
|
return;
|
|
47543
47664
|
}
|
|
47544
|
-
if (
|
|
47665
|
+
if (stateManager.interactionState === InteractionState.grabing &&
|
|
47545
47666
|
Math.abs(lastX - e.x) + Math.abs(lastY - e.y) >= 1) {
|
|
47546
|
-
if (
|
|
47547
|
-
else if (
|
|
47548
|
-
|
|
47667
|
+
if (stateManager.isResizeCol()) ;
|
|
47668
|
+
else if (stateManager.isMoveCol()) {
|
|
47669
|
+
eventManager.dealColumnMover(eventArgsSet);
|
|
47549
47670
|
}
|
|
47550
47671
|
else {
|
|
47551
|
-
|
|
47672
|
+
eventManager.dealTableSelect(eventArgsSet, true);
|
|
47552
47673
|
}
|
|
47553
47674
|
return;
|
|
47554
47675
|
}
|
|
47555
|
-
if (
|
|
47556
|
-
|
|
47676
|
+
if (stateManager.isResizeCol() || eventManager.checkColumnResize(eventArgsSet)) {
|
|
47677
|
+
stateManager.updateCursor('col-resize');
|
|
47557
47678
|
}
|
|
47558
47679
|
else {
|
|
47559
|
-
|
|
47680
|
+
stateManager.updateCursor();
|
|
47560
47681
|
}
|
|
47561
47682
|
const cellGoup = e.path.find(node => node.role === 'cell');
|
|
47562
47683
|
if (table.hasListeners(TABLE_EVENT_TYPE.MOUSELEAVE_CELL)) {
|
|
47563
47684
|
if (cellGoup?.role === 'cell' &&
|
|
47564
|
-
table.
|
|
47565
|
-
table.
|
|
47566
|
-
(cellGoup.col !== table.
|
|
47685
|
+
table.stateManager.hover.cellPos.col !== -1 &&
|
|
47686
|
+
table.stateManager.hover.cellPos.row !== -1 &&
|
|
47687
|
+
(cellGoup.col !== table.stateManager.hover.cellPos.col || cellGoup.row !== table.stateManager.hover.cellPos.row)) {
|
|
47567
47688
|
table.fireListeners(TABLE_EVENT_TYPE.MOUSELEAVE_CELL, {
|
|
47568
|
-
col: table.
|
|
47569
|
-
row: table.
|
|
47689
|
+
col: table.stateManager.hover.cellPos.col,
|
|
47690
|
+
row: table.stateManager.hover.cellPos.row,
|
|
47570
47691
|
cellRange: table.getCellRangeRelativeRect({
|
|
47571
|
-
col: table.
|
|
47572
|
-
row: table.
|
|
47692
|
+
col: table.stateManager.hover.cellPos.col,
|
|
47693
|
+
row: table.stateManager.hover.cellPos.row
|
|
47573
47694
|
}),
|
|
47574
47695
|
scaleRatio: table.canvas.getBoundingClientRect().width / table.canvas.offsetWidth,
|
|
47575
47696
|
event: e.nativeEvent,
|
|
@@ -47581,7 +47702,7 @@
|
|
|
47581
47702
|
if (cellGoup?.role === 'cell' &&
|
|
47582
47703
|
isValid$6(cellGoup.col) &&
|
|
47583
47704
|
isValid$6(cellGoup.row) &&
|
|
47584
|
-
(cellGoup.col !== table.
|
|
47705
|
+
(cellGoup.col !== table.stateManager.hover.cellPos.col || cellGoup.row !== table.stateManager.hover.cellPos.row)) {
|
|
47585
47706
|
table.fireListeners(TABLE_EVENT_TYPE.MOUSEENTER_CELL, {
|
|
47586
47707
|
col: cellGoup.col,
|
|
47587
47708
|
row: cellGoup.row,
|
|
@@ -47595,8 +47716,8 @@
|
|
|
47595
47716
|
});
|
|
47596
47717
|
}
|
|
47597
47718
|
}
|
|
47598
|
-
|
|
47599
|
-
|
|
47719
|
+
eventManager.dealIconHover(eventArgsSet);
|
|
47720
|
+
eventManager.dealTableHover(eventArgsSet);
|
|
47600
47721
|
if (eventArgsSet.eventArgs && table.hasListeners(TABLE_EVENT_TYPE.MOUSEMOVE_CELL)) {
|
|
47601
47722
|
let icon;
|
|
47602
47723
|
let position;
|
|
@@ -47628,7 +47749,7 @@
|
|
|
47628
47749
|
const eventArgsSet = getCellEventArgsSet(e);
|
|
47629
47750
|
const cellGoup = eventArgsSet?.eventArgs?.target;
|
|
47630
47751
|
if (cellGoup?.role === 'table') {
|
|
47631
|
-
|
|
47752
|
+
eventManager.dealTableHover();
|
|
47632
47753
|
}
|
|
47633
47754
|
});
|
|
47634
47755
|
table.scenegraph.tableGroup.addEventListener('pointerover', (e) => {
|
|
@@ -47661,11 +47782,11 @@
|
|
|
47661
47782
|
}
|
|
47662
47783
|
});
|
|
47663
47784
|
table.scenegraph.tableGroup.addEventListener('pointerleave', (e) => {
|
|
47664
|
-
if (!
|
|
47665
|
-
|
|
47666
|
-
|
|
47785
|
+
if (!stateManager.isResizeCol() && !stateManager.isMoveCol() && !stateManager.isSelecting()) {
|
|
47786
|
+
stateManager.updateInteractionState(InteractionState.default);
|
|
47787
|
+
stateManager.updateCursor();
|
|
47667
47788
|
}
|
|
47668
|
-
|
|
47789
|
+
eventManager.dealTableHover();
|
|
47669
47790
|
const target = e.target;
|
|
47670
47791
|
if (target && !target.isDescendantsOf(table.scenegraph.tableGroup)) {
|
|
47671
47792
|
table.fireListeners(TABLE_EVENT_TYPE.MOUSELEAVE_TABLE, {
|
|
@@ -47677,31 +47798,31 @@
|
|
|
47677
47798
|
}
|
|
47678
47799
|
});
|
|
47679
47800
|
table.scenegraph.tableGroup.addEventListener('pointerupoutside', (e) => {
|
|
47680
|
-
if (
|
|
47801
|
+
if (stateManager.isResizeCol()) {
|
|
47681
47802
|
endResizeCol(table);
|
|
47682
47803
|
}
|
|
47683
|
-
else if (
|
|
47684
|
-
table.
|
|
47685
|
-
if (table.
|
|
47686
|
-
table.
|
|
47687
|
-
table.
|
|
47688
|
-
table.
|
|
47804
|
+
else if (stateManager.isMoveCol()) {
|
|
47805
|
+
table.stateManager.endMoveCol();
|
|
47806
|
+
if (table.stateManager.columnMove?.colSource !== -1 &&
|
|
47807
|
+
table.stateManager.columnMove?.rowSource !== -1 &&
|
|
47808
|
+
table.stateManager.columnMove?.colTarget !== -1 &&
|
|
47809
|
+
table.stateManager.columnMove?.rowTarget !== -1) {
|
|
47689
47810
|
if (table.hasListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION)) {
|
|
47690
47811
|
table.fireListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION, {
|
|
47691
|
-
target: { col: table.
|
|
47812
|
+
target: { col: table.stateManager.columnMove.colTarget, row: table.stateManager.columnMove.rowTarget },
|
|
47692
47813
|
source: {
|
|
47693
|
-
col: table.
|
|
47694
|
-
row: table.
|
|
47814
|
+
col: table.stateManager.columnMove.colSource,
|
|
47815
|
+
row: table.stateManager.columnMove.rowSource
|
|
47695
47816
|
}
|
|
47696
47817
|
});
|
|
47697
47818
|
}
|
|
47698
47819
|
}
|
|
47699
47820
|
}
|
|
47700
|
-
else if (
|
|
47701
|
-
if (table.
|
|
47702
|
-
const lastCol = table.
|
|
47703
|
-
const lastRow = table.
|
|
47704
|
-
table.
|
|
47821
|
+
else if (stateManager.isSelecting()) {
|
|
47822
|
+
if (table.stateManager.select?.ranges?.length) {
|
|
47823
|
+
const lastCol = table.stateManager.select.ranges[table.stateManager.select.ranges.length - 1].end.col;
|
|
47824
|
+
const lastRow = table.stateManager.select.ranges[table.stateManager.select.ranges.length - 1].end.row;
|
|
47825
|
+
table.stateManager.endSelectCells();
|
|
47705
47826
|
if (table.hasListeners(TABLE_EVENT_TYPE.DRAG_SELECT_END)) {
|
|
47706
47827
|
const cellsEvent = {
|
|
47707
47828
|
event: e.nativeEvent,
|
|
@@ -47716,8 +47837,8 @@
|
|
|
47716
47837
|
}
|
|
47717
47838
|
}
|
|
47718
47839
|
}
|
|
47719
|
-
|
|
47720
|
-
|
|
47840
|
+
stateManager.updateInteractionState(InteractionState.default);
|
|
47841
|
+
eventManager.dealTableHover();
|
|
47721
47842
|
});
|
|
47722
47843
|
table.scenegraph.tableGroup.addEventListener('pointerdown', (e) => {
|
|
47723
47844
|
LastPointerXY = { x: e.x, y: e.y };
|
|
@@ -47725,52 +47846,52 @@
|
|
|
47725
47846
|
return;
|
|
47726
47847
|
}
|
|
47727
47848
|
const eventArgsSet = getCellEventArgsSet(e);
|
|
47728
|
-
if (
|
|
47849
|
+
if (stateManager.interactionState !== InteractionState.default) {
|
|
47729
47850
|
return;
|
|
47730
47851
|
}
|
|
47731
47852
|
if (table.isPivotChart() && eventArgsSet?.eventArgs?.target.type !== 'chart') {
|
|
47732
47853
|
table.scenegraph.updateChartState(null);
|
|
47733
47854
|
}
|
|
47734
|
-
if (
|
|
47855
|
+
if (stateManager.menu.isShow &&
|
|
47735
47856
|
eventArgsSet.eventArgs &&
|
|
47736
|
-
eventArgsSet.eventArgs.target !==
|
|
47737
|
-
|
|
47857
|
+
eventArgsSet.eventArgs.target !== stateManager.residentHoverIcon?.icon) {
|
|
47858
|
+
stateManager.hideMenu();
|
|
47738
47859
|
}
|
|
47739
47860
|
const hitIcon = eventArgsSet?.eventArgs?.target?.role?.startsWith('icon')
|
|
47740
47861
|
? eventArgsSet.eventArgs.target
|
|
47741
47862
|
: undefined;
|
|
47742
47863
|
if (!hitIcon || hitIcon.attribute.interactive === false) {
|
|
47743
47864
|
if (e.pointerType === 'touch') {
|
|
47744
|
-
|
|
47745
|
-
|
|
47746
|
-
|
|
47747
|
-
|
|
47748
|
-
if (!
|
|
47749
|
-
|
|
47865
|
+
eventManager.touchEnd = false;
|
|
47866
|
+
eventManager.touchSetTimeout = setTimeout(() => {
|
|
47867
|
+
eventManager.isTouchdown = false;
|
|
47868
|
+
eventManager.touchMove = true;
|
|
47869
|
+
if (!eventManager.touchEnd && eventManager.checkColumnResize(eventArgsSet, true)) {
|
|
47870
|
+
stateManager.updateInteractionState(InteractionState.grabing);
|
|
47750
47871
|
return;
|
|
47751
47872
|
}
|
|
47752
|
-
if (!
|
|
47753
|
-
|
|
47873
|
+
if (!eventManager.touchEnd && eventManager.chechColumnMover(eventArgsSet)) {
|
|
47874
|
+
stateManager.updateInteractionState(InteractionState.grabing);
|
|
47754
47875
|
return;
|
|
47755
47876
|
}
|
|
47756
|
-
if (
|
|
47757
|
-
|
|
47877
|
+
if (eventManager.dealTableSelect(eventArgsSet) && !eventManager.touchEnd) {
|
|
47878
|
+
stateManager.updateInteractionState(InteractionState.grabing);
|
|
47758
47879
|
}
|
|
47759
47880
|
}, 500);
|
|
47760
|
-
|
|
47881
|
+
eventManager.dealTableHover(eventArgsSet);
|
|
47761
47882
|
}
|
|
47762
47883
|
else {
|
|
47763
|
-
if (
|
|
47884
|
+
if (eventManager.checkColumnResize(eventArgsSet, true)) {
|
|
47764
47885
|
table.scenegraph.updateChartState(null);
|
|
47765
|
-
|
|
47886
|
+
stateManager.updateInteractionState(InteractionState.grabing);
|
|
47766
47887
|
return;
|
|
47767
47888
|
}
|
|
47768
|
-
if (
|
|
47769
|
-
|
|
47889
|
+
if (eventManager.chechColumnMover(eventArgsSet)) {
|
|
47890
|
+
stateManager.updateInteractionState(InteractionState.grabing);
|
|
47770
47891
|
return;
|
|
47771
47892
|
}
|
|
47772
|
-
if (
|
|
47773
|
-
|
|
47893
|
+
if (eventManager.dealTableSelect(eventArgsSet)) {
|
|
47894
|
+
stateManager.updateInteractionState(InteractionState.grabing);
|
|
47774
47895
|
}
|
|
47775
47896
|
}
|
|
47776
47897
|
}
|
|
@@ -47790,26 +47911,26 @@
|
|
|
47790
47911
|
if (e.button !== 0) {
|
|
47791
47912
|
return;
|
|
47792
47913
|
}
|
|
47793
|
-
if (
|
|
47794
|
-
|
|
47795
|
-
if (
|
|
47914
|
+
if (stateManager.interactionState === 'grabing') {
|
|
47915
|
+
stateManager.updateInteractionState(InteractionState.default);
|
|
47916
|
+
if (stateManager.isResizeCol()) {
|
|
47796
47917
|
endResizeCol(table);
|
|
47797
47918
|
}
|
|
47798
|
-
else if (
|
|
47919
|
+
else if (stateManager.isMoveCol()) {
|
|
47799
47920
|
const eventArgsSet = getCellEventArgsSet(e);
|
|
47800
|
-
table.
|
|
47921
|
+
table.stateManager.endMoveCol();
|
|
47801
47922
|
if (eventArgsSet.eventArgs && table.hasListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION)) {
|
|
47802
47923
|
table.fireListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION, {
|
|
47803
47924
|
target: { col: eventArgsSet.eventArgs.col, row: eventArgsSet.eventArgs.row },
|
|
47804
47925
|
source: {
|
|
47805
|
-
col: table.
|
|
47806
|
-
row: table.
|
|
47926
|
+
col: table.stateManager.columnMove.colSource,
|
|
47927
|
+
row: table.stateManager.columnMove.colSource
|
|
47807
47928
|
}
|
|
47808
47929
|
});
|
|
47809
47930
|
}
|
|
47810
47931
|
}
|
|
47811
|
-
else if (
|
|
47812
|
-
table.
|
|
47932
|
+
else if (stateManager.isSelecting()) {
|
|
47933
|
+
table.stateManager.endSelectCells();
|
|
47813
47934
|
const eventArgsSet = getCellEventArgsSet(e);
|
|
47814
47935
|
if (eventArgsSet.eventArgs && table.hasListeners(TABLE_EVENT_TYPE.DRAG_SELECT_END)) {
|
|
47815
47936
|
const cellsEvent = {
|
|
@@ -47825,8 +47946,8 @@
|
|
|
47825
47946
|
}
|
|
47826
47947
|
}
|
|
47827
47948
|
}
|
|
47828
|
-
else if (
|
|
47829
|
-
|
|
47949
|
+
else if (stateManager.interactionState === InteractionState.scrolling) {
|
|
47950
|
+
stateManager.updateInteractionState(InteractionState.default);
|
|
47830
47951
|
}
|
|
47831
47952
|
if (table.hasListeners(TABLE_EVENT_TYPE.MOUSEUP_CELL)) {
|
|
47832
47953
|
const eventArgsSet = getCellEventArgsSet(e);
|
|
@@ -47843,7 +47964,7 @@
|
|
|
47843
47964
|
table.scenegraph.tableGroup.addEventListener('rightdown', (e) => {
|
|
47844
47965
|
const eventArgsSet = getCellEventArgsSet(e);
|
|
47845
47966
|
if (eventArgsSet.eventArgs) {
|
|
47846
|
-
|
|
47967
|
+
stateManager.triggerContextMenu(eventArgsSet.eventArgs.col, eventArgsSet.eventArgs.row, eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y);
|
|
47847
47968
|
const { col, row } = eventArgsSet.eventArgs;
|
|
47848
47969
|
if (table.hasListeners(TABLE_EVENT_TYPE.CONTEXTMENU_CELL)) {
|
|
47849
47970
|
const cellInfo = table.getCellInfo(col, row);
|
|
@@ -47869,7 +47990,7 @@
|
|
|
47869
47990
|
: undefined,
|
|
47870
47991
|
target: eventArgsSet?.eventArgs?.target
|
|
47871
47992
|
};
|
|
47872
|
-
if (cellInRanges(table.
|
|
47993
|
+
if (cellInRanges(table.stateManager.select.ranges, col, row)) {
|
|
47873
47994
|
cellsEvent.cells = table.getSelectedCellInfos();
|
|
47874
47995
|
}
|
|
47875
47996
|
else {
|
|
@@ -47880,22 +48001,22 @@
|
|
|
47880
48001
|
}
|
|
47881
48002
|
});
|
|
47882
48003
|
table.scenegraph.tableGroup.addEventListener('pointertap', (e) => {
|
|
47883
|
-
if (table.
|
|
48004
|
+
if (table.stateManager.columnResize.resizing || table.stateManager.columnMove.moving) {
|
|
47884
48005
|
return;
|
|
47885
48006
|
}
|
|
47886
48007
|
const eventArgsSet = getCellEventArgsSet(e);
|
|
47887
|
-
|
|
48008
|
+
eventManager.dealIconClick(e, eventArgsSet);
|
|
47888
48009
|
if (!eventArgsSet?.eventArgs) {
|
|
47889
48010
|
return;
|
|
47890
48011
|
}
|
|
47891
|
-
if (
|
|
48012
|
+
if (eventManager.touchSetTimeout || e.pointerType !== 'touch') {
|
|
47892
48013
|
if (e.pointerType === 'touch') {
|
|
47893
48014
|
const eventArgsSet = getCellEventArgsSet(e);
|
|
47894
|
-
if (
|
|
47895
|
-
clearTimeout(
|
|
47896
|
-
|
|
47897
|
-
|
|
47898
|
-
|
|
48015
|
+
if (eventManager.touchSetTimeout) {
|
|
48016
|
+
clearTimeout(eventManager.touchSetTimeout);
|
|
48017
|
+
eventManager.dealTableSelect(eventArgsSet);
|
|
48018
|
+
stateManager.endSelectCells();
|
|
48019
|
+
eventManager.touchSetTimeout = undefined;
|
|
47899
48020
|
}
|
|
47900
48021
|
}
|
|
47901
48022
|
if (table.hasListeners(TABLE_EVENT_TYPE.CLICK_CELL)) {
|
|
@@ -47933,14 +48054,14 @@
|
|
|
47933
48054
|
if (!isDraging &&
|
|
47934
48055
|
target &&
|
|
47935
48056
|
!target.isDescendantsOf(table.scenegraph.tableGroup)) {
|
|
47936
|
-
|
|
47937
|
-
|
|
47938
|
-
|
|
47939
|
-
|
|
48057
|
+
stateManager.updateInteractionState(InteractionState.default);
|
|
48058
|
+
eventManager.dealTableHover();
|
|
48059
|
+
eventManager.dealTableSelect();
|
|
48060
|
+
stateManager.updateCursor();
|
|
47940
48061
|
table.scenegraph.updateChartState(null);
|
|
47941
48062
|
}
|
|
47942
48063
|
else if (isDraging) {
|
|
47943
|
-
|
|
48064
|
+
stateManager.endSelectCells();
|
|
47944
48065
|
}
|
|
47945
48066
|
});
|
|
47946
48067
|
table.scenegraph.tableGroup.addEventListener('checkbox_state_change', (e) => {
|
|
@@ -47954,18 +48075,18 @@
|
|
|
47954
48075
|
checked: e.detail.checked
|
|
47955
48076
|
};
|
|
47956
48077
|
if (table.isHeader(col, row)) {
|
|
47957
|
-
table.
|
|
48078
|
+
table.stateManager.setHeaderCheckedState(cellInfo.field, e.detail.checked);
|
|
47958
48079
|
const define = table.getBodyColumnDefine(col, row);
|
|
47959
48080
|
if (define.cellType === 'checkbox') {
|
|
47960
48081
|
table.scenegraph.updateCheckboxCellState(col, row, e.detail.checked);
|
|
47961
48082
|
}
|
|
47962
48083
|
}
|
|
47963
48084
|
else {
|
|
47964
|
-
table.
|
|
48085
|
+
table.stateManager.setCheckedState(col, row, cellInfo.field, e.detail.checked);
|
|
47965
48086
|
const define = table.getBodyColumnDefine(col, row);
|
|
47966
48087
|
if (define.headerType === 'checkbox') {
|
|
47967
|
-
const oldHeaderCheckedState = table.
|
|
47968
|
-
const newHeaderCheckedState = table.
|
|
48088
|
+
const oldHeaderCheckedState = table.stateManager.headerCheckedState[cellInfo.field];
|
|
48089
|
+
const newHeaderCheckedState = table.stateManager.updateHeaderCheckedState(cellInfo.field);
|
|
47969
48090
|
if (oldHeaderCheckedState !== newHeaderCheckedState) {
|
|
47970
48091
|
table.scenegraph.updateHeaderCheckboxCellState(col, row, newHeaderCheckedState);
|
|
47971
48092
|
}
|
|
@@ -47974,26 +48095,26 @@
|
|
|
47974
48095
|
table.fireListeners(TABLE_EVENT_TYPE.CHECKBOX_STATE_CHANGE, cellsEvent);
|
|
47975
48096
|
});
|
|
47976
48097
|
}
|
|
47977
|
-
function bindGesture(
|
|
47978
|
-
const table =
|
|
47979
|
-
|
|
48098
|
+
function bindGesture(eventManager) {
|
|
48099
|
+
const table = eventManager.table;
|
|
48100
|
+
eventManager.gesture = new Gesture(table.scenegraph.stage, {
|
|
47980
48101
|
tap: {
|
|
47981
48102
|
interval: 300
|
|
47982
48103
|
}
|
|
47983
48104
|
});
|
|
47984
|
-
|
|
48105
|
+
eventManager.gesture.on('doubletap', e => {
|
|
47985
48106
|
dblclickHandler(e, table);
|
|
47986
48107
|
});
|
|
47987
48108
|
}
|
|
47988
48109
|
function endResizeCol(table) {
|
|
47989
|
-
table.
|
|
48110
|
+
table.stateManager.endResizeCol();
|
|
47990
48111
|
if (table.hasListeners(TABLE_EVENT_TYPE.RESIZE_COLUMN_END)) {
|
|
47991
48112
|
const columns = [];
|
|
47992
48113
|
for (let col = 0; col < table.colCount; col++) {
|
|
47993
48114
|
columns.push(table.getColWidth(col));
|
|
47994
48115
|
}
|
|
47995
48116
|
table.fireListeners(TABLE_EVENT_TYPE.RESIZE_COLUMN_END, {
|
|
47996
|
-
col: table.
|
|
48117
|
+
col: table.stateManager.columnResize.col,
|
|
47997
48118
|
columns
|
|
47998
48119
|
});
|
|
47999
48120
|
}
|
|
@@ -48033,76 +48154,76 @@
|
|
|
48033
48154
|
}
|
|
48034
48155
|
}
|
|
48035
48156
|
|
|
48036
|
-
function bindScrollBarListener(
|
|
48037
|
-
const table =
|
|
48038
|
-
const
|
|
48157
|
+
function bindScrollBarListener(eventManager) {
|
|
48158
|
+
const table = eventManager.table;
|
|
48159
|
+
const stateManager = table.stateManager;
|
|
48039
48160
|
const scenegraph = table.scenegraph;
|
|
48040
48161
|
scenegraph.component.vScrollBar.addEventListener('pointerover', (e) => {
|
|
48041
|
-
|
|
48162
|
+
stateManager.showVerticalScrollBar();
|
|
48042
48163
|
});
|
|
48043
48164
|
scenegraph.component.hScrollBar.addEventListener('pointerover', (e) => {
|
|
48044
|
-
|
|
48165
|
+
stateManager.showHorizontalScrollBar();
|
|
48045
48166
|
});
|
|
48046
48167
|
scenegraph.component.vScrollBar.addEventListener('pointerout', (e) => {
|
|
48047
|
-
if (
|
|
48168
|
+
if (stateManager.interactionState === InteractionState.scrolling) {
|
|
48048
48169
|
return;
|
|
48049
48170
|
}
|
|
48050
|
-
|
|
48171
|
+
stateManager.hideVerticalScrollBar();
|
|
48051
48172
|
});
|
|
48052
48173
|
scenegraph.component.hScrollBar.addEventListener('pointerout', (e) => {
|
|
48053
|
-
if (
|
|
48174
|
+
if (stateManager.interactionState === InteractionState.scrolling) {
|
|
48054
48175
|
return;
|
|
48055
48176
|
}
|
|
48056
|
-
|
|
48177
|
+
stateManager.hideHorizontalScrollBar();
|
|
48057
48178
|
});
|
|
48058
48179
|
scenegraph.component.vScrollBar._slider.addEventListener('pointerdown', () => {
|
|
48059
|
-
if (
|
|
48060
|
-
|
|
48180
|
+
if (stateManager.interactionState !== InteractionState.scrolling) {
|
|
48181
|
+
stateManager.updateInteractionState(InteractionState.scrolling);
|
|
48061
48182
|
}
|
|
48062
48183
|
});
|
|
48063
48184
|
scenegraph.component.vScrollBar.addEventListener('pointerup', () => {
|
|
48064
|
-
|
|
48065
|
-
if (
|
|
48066
|
-
|
|
48185
|
+
stateManager.fastScrolling = false;
|
|
48186
|
+
if (stateManager.interactionState === InteractionState.scrolling) {
|
|
48187
|
+
stateManager.updateInteractionState(InteractionState.default);
|
|
48067
48188
|
}
|
|
48068
48189
|
});
|
|
48069
48190
|
scenegraph.component.vScrollBar.addEventListener('pointerupoutside', () => {
|
|
48070
|
-
|
|
48071
|
-
if (
|
|
48072
|
-
|
|
48191
|
+
stateManager.fastScrolling = false;
|
|
48192
|
+
if (stateManager.interactionState === InteractionState.scrolling) {
|
|
48193
|
+
stateManager.updateInteractionState(InteractionState.default);
|
|
48073
48194
|
}
|
|
48074
48195
|
});
|
|
48075
48196
|
scenegraph.component.hScrollBar._slider.addEventListener('pointerdown', () => {
|
|
48076
|
-
if (
|
|
48077
|
-
|
|
48197
|
+
if (stateManager.interactionState !== InteractionState.scrolling) {
|
|
48198
|
+
stateManager.updateInteractionState(InteractionState.scrolling);
|
|
48078
48199
|
}
|
|
48079
48200
|
});
|
|
48080
48201
|
scenegraph.component.hScrollBar.addEventListener('pointerup', () => {
|
|
48081
|
-
|
|
48082
|
-
if (
|
|
48083
|
-
|
|
48202
|
+
stateManager.fastScrolling = false;
|
|
48203
|
+
if (stateManager.interactionState === InteractionState.scrolling) {
|
|
48204
|
+
stateManager.updateInteractionState(InteractionState.default);
|
|
48084
48205
|
}
|
|
48085
48206
|
});
|
|
48086
48207
|
scenegraph.component.hScrollBar.addEventListener('pointerupoutside', () => {
|
|
48087
|
-
|
|
48088
|
-
if (
|
|
48089
|
-
|
|
48208
|
+
stateManager.fastScrolling = false;
|
|
48209
|
+
if (stateManager.interactionState === InteractionState.scrolling) {
|
|
48210
|
+
stateManager.updateInteractionState(InteractionState.default);
|
|
48090
48211
|
}
|
|
48091
48212
|
});
|
|
48092
|
-
const throttleVerticalWheel = throttle(
|
|
48093
|
-
const throttleHorizontalWheel = throttle(
|
|
48213
|
+
const throttleVerticalWheel = throttle(stateManager.updateVerticalScrollBar, 20);
|
|
48214
|
+
const throttleHorizontalWheel = throttle(stateManager.updateHorizontalScrollBar, 20);
|
|
48094
48215
|
scenegraph.component.vScrollBar.addEventListener('scroll', (e) => {
|
|
48095
|
-
|
|
48096
|
-
if (
|
|
48097
|
-
|
|
48216
|
+
stateManager.fastScrolling = true;
|
|
48217
|
+
if (stateManager.interactionState !== InteractionState.scrolling) {
|
|
48218
|
+
stateManager.updateInteractionState(InteractionState.scrolling);
|
|
48098
48219
|
}
|
|
48099
48220
|
const ratio = e.detail.value[0] / (1 - e.detail.value[1] + e.detail.value[0]);
|
|
48100
48221
|
throttleVerticalWheel(ratio, e);
|
|
48101
48222
|
});
|
|
48102
48223
|
scenegraph.component.hScrollBar.addEventListener('scroll', (e) => {
|
|
48103
|
-
|
|
48104
|
-
if (
|
|
48105
|
-
|
|
48224
|
+
stateManager.fastScrolling = true;
|
|
48225
|
+
if (stateManager.interactionState !== InteractionState.scrolling) {
|
|
48226
|
+
stateManager.updateInteractionState(InteractionState.scrolling);
|
|
48106
48227
|
}
|
|
48107
48228
|
const ratio = e.detail.value[0] / (1 - e.detail.value[1] + e.detail.value[0]);
|
|
48108
48229
|
throttleHorizontalWheel(ratio);
|
|
@@ -48175,21 +48296,21 @@
|
|
|
48175
48296
|
return totalWidth !== 0 && deltaX >= 0 && Math.abs(state.scroll.horizontalBarPos - totalWidth) < 1;
|
|
48176
48297
|
}
|
|
48177
48298
|
|
|
48178
|
-
function bindContainerDomListener(
|
|
48179
|
-
const table =
|
|
48180
|
-
const
|
|
48299
|
+
function bindContainerDomListener(eventManager) {
|
|
48300
|
+
const table = eventManager.table;
|
|
48301
|
+
const stateManager = table.stateManager;
|
|
48181
48302
|
const handler = table.internalProps.handler;
|
|
48182
48303
|
handler.on(table.getElement(), 'blur', (e) => {
|
|
48183
|
-
|
|
48304
|
+
eventManager.dealTableHover();
|
|
48184
48305
|
});
|
|
48185
48306
|
handler.on(table.getElement(), 'wheel', (e) => {
|
|
48186
|
-
handleWhell(e,
|
|
48307
|
+
handleWhell(e, stateManager);
|
|
48187
48308
|
});
|
|
48188
48309
|
handler.on(table.getElement(), 'keydown', (e) => {
|
|
48189
48310
|
if (table.keyboardOptions?.selectAllOnCtrlA) {
|
|
48190
48311
|
if (e.key === 'a' && (e.ctrlKey || e.metaKey)) {
|
|
48191
48312
|
e.preventDefault();
|
|
48192
|
-
|
|
48313
|
+
eventManager.deelTableSelectAll();
|
|
48193
48314
|
}
|
|
48194
48315
|
}
|
|
48195
48316
|
if (table.hasListeners(TABLE_EVENT_TYPE.KEYDOWN)) {
|
|
@@ -48197,7 +48318,6 @@
|
|
|
48197
48318
|
keyCode: e.keyCode ?? e.which,
|
|
48198
48319
|
code: e.code,
|
|
48199
48320
|
event: e,
|
|
48200
|
-
cells: table.getSelectedCellInfos(),
|
|
48201
48321
|
scaleRatio: table.canvas.getBoundingClientRect().width / table.canvas.offsetWidth
|
|
48202
48322
|
};
|
|
48203
48323
|
table.fireListeners(TABLE_EVENT_TYPE.KEYDOWN, cellsEvent);
|
|
@@ -48215,7 +48335,7 @@
|
|
|
48215
48335
|
e.clipboardData.setData('text/plain', data);
|
|
48216
48336
|
}
|
|
48217
48337
|
table.fireListeners(TABLE_EVENT_TYPE.COPY_DATA, {
|
|
48218
|
-
cellRange: table.
|
|
48338
|
+
cellRange: table.stateManager.select.ranges,
|
|
48219
48339
|
copyData: data
|
|
48220
48340
|
});
|
|
48221
48341
|
}
|
|
@@ -48229,87 +48349,87 @@
|
|
|
48229
48349
|
});
|
|
48230
48350
|
}
|
|
48231
48351
|
|
|
48232
|
-
function bindTouchListener(
|
|
48233
|
-
const table =
|
|
48234
|
-
const
|
|
48352
|
+
function bindTouchListener(eventManager) {
|
|
48353
|
+
const table = eventManager.table;
|
|
48354
|
+
const stateManager = table.stateManager;
|
|
48235
48355
|
const scenegraph = table.scenegraph;
|
|
48236
|
-
|
|
48356
|
+
eventManager.touchMovePoints = [];
|
|
48237
48357
|
table.scenegraph.tableGroup.addEventListener('touchstart', (e) => {
|
|
48238
48358
|
if (e.target.isChildOf(scenegraph.component.vScrollBar) || e.target.isChildOf(scenegraph.component.vScrollBar)) {
|
|
48239
48359
|
return;
|
|
48240
48360
|
}
|
|
48241
|
-
|
|
48242
|
-
|
|
48361
|
+
eventManager.isTouchdown = true;
|
|
48362
|
+
eventManager.touchMovePoints.push({
|
|
48243
48363
|
x: e.page.x,
|
|
48244
48364
|
y: e.page.y,
|
|
48245
48365
|
timestamp: Date.now()
|
|
48246
48366
|
});
|
|
48247
48367
|
});
|
|
48248
48368
|
window.addEventListener('touchmove', (e) => {
|
|
48249
|
-
if (
|
|
48369
|
+
if (eventManager.touchMove) {
|
|
48250
48370
|
e.preventDefault();
|
|
48251
48371
|
}
|
|
48252
|
-
if (!
|
|
48372
|
+
if (!eventManager.isTouchdown || !isTouchEvent$1(e)) {
|
|
48253
48373
|
return;
|
|
48254
48374
|
}
|
|
48255
|
-
if (
|
|
48256
|
-
|
|
48375
|
+
if (eventManager.touchMovePoints.length > 4) {
|
|
48376
|
+
eventManager.touchMovePoints.shift();
|
|
48257
48377
|
}
|
|
48258
|
-
|
|
48378
|
+
eventManager.touchMovePoints.push({
|
|
48259
48379
|
x: e.changedTouches[0].pageX,
|
|
48260
48380
|
y: e.changedTouches[0].pageY,
|
|
48261
48381
|
timestamp: Date.now()
|
|
48262
48382
|
});
|
|
48263
|
-
const deltaX = -
|
|
48264
|
-
|
|
48265
|
-
const deltaY = -
|
|
48266
|
-
|
|
48267
|
-
handleWhell({ deltaX, deltaY },
|
|
48383
|
+
const deltaX = -eventManager.touchMovePoints[eventManager.touchMovePoints.length - 1].x +
|
|
48384
|
+
eventManager.touchMovePoints[eventManager.touchMovePoints.length - 2].x;
|
|
48385
|
+
const deltaY = -eventManager.touchMovePoints[eventManager.touchMovePoints.length - 1].y +
|
|
48386
|
+
eventManager.touchMovePoints[eventManager.touchMovePoints.length - 2].y;
|
|
48387
|
+
handleWhell({ deltaX, deltaY }, stateManager);
|
|
48268
48388
|
if (e.cancelable &&
|
|
48269
48389
|
(table.internalProps.overscrollBehavior === 'none' ||
|
|
48270
|
-
(Math.abs(deltaY) >= Math.abs(deltaX) && deltaY !== 0 && isVerticalScrollable(deltaY,
|
|
48271
|
-
(Math.abs(deltaY) <= Math.abs(deltaX) && deltaX !== 0 && isHorizontalScrollable(deltaX,
|
|
48390
|
+
(Math.abs(deltaY) >= Math.abs(deltaX) && deltaY !== 0 && isVerticalScrollable(deltaY, stateManager)) ||
|
|
48391
|
+
(Math.abs(deltaY) <= Math.abs(deltaX) && deltaX !== 0 && isHorizontalScrollable(deltaX, stateManager)))) {
|
|
48272
48392
|
e.preventDefault();
|
|
48273
48393
|
}
|
|
48274
48394
|
}, { passive: false });
|
|
48275
48395
|
window.addEventListener('touchend', (e) => {
|
|
48276
|
-
|
|
48277
|
-
|
|
48278
|
-
if (!
|
|
48396
|
+
eventManager.touchEnd = true;
|
|
48397
|
+
eventManager.touchMove = false;
|
|
48398
|
+
if (!eventManager.isTouchdown || !isTouchEvent$1(e)) {
|
|
48279
48399
|
return;
|
|
48280
48400
|
}
|
|
48281
|
-
if (
|
|
48282
|
-
if (
|
|
48283
|
-
|
|
48401
|
+
if (eventManager.touchMovePoints?.length) {
|
|
48402
|
+
if (eventManager.touchMovePoints.length > 4) {
|
|
48403
|
+
eventManager.touchMovePoints.shift();
|
|
48284
48404
|
}
|
|
48285
|
-
|
|
48405
|
+
eventManager.touchMovePoints.push({
|
|
48286
48406
|
x: e.changedTouches[0].pageX,
|
|
48287
48407
|
y: e.changedTouches[0].pageY,
|
|
48288
48408
|
timestamp: Date.now()
|
|
48289
48409
|
});
|
|
48290
|
-
const firstPoint =
|
|
48291
|
-
const lastPoint =
|
|
48410
|
+
const firstPoint = eventManager.touchMovePoints[0];
|
|
48411
|
+
const lastPoint = eventManager.touchMovePoints[eventManager.touchMovePoints?.length - 1];
|
|
48292
48412
|
const vX = (lastPoint.x - firstPoint.x) / (lastPoint.timestamp - firstPoint.timestamp);
|
|
48293
48413
|
const vY = (lastPoint.y - firstPoint.y) / (lastPoint.timestamp - firstPoint.timestamp);
|
|
48294
|
-
startInertia(vX, vY,
|
|
48414
|
+
startInertia(vX, vY, stateManager);
|
|
48295
48415
|
}
|
|
48296
|
-
|
|
48297
|
-
|
|
48416
|
+
eventManager.isTouchdown = false;
|
|
48417
|
+
eventManager.touchMovePoints = [];
|
|
48298
48418
|
});
|
|
48299
48419
|
window.addEventListener('touchcancel', (e) => {
|
|
48300
|
-
|
|
48301
|
-
|
|
48302
|
-
if (!
|
|
48420
|
+
eventManager.touchEnd = true;
|
|
48421
|
+
eventManager.touchMove = false;
|
|
48422
|
+
if (!eventManager.isTouchdown) {
|
|
48303
48423
|
return;
|
|
48304
48424
|
}
|
|
48305
|
-
|
|
48306
|
-
|
|
48425
|
+
eventManager.isTouchdown = false;
|
|
48426
|
+
eventManager.touchMovePoints = [];
|
|
48307
48427
|
});
|
|
48308
48428
|
}
|
|
48309
48429
|
function isTouchEvent$1(e) {
|
|
48310
48430
|
return !!e.changedTouches;
|
|
48311
48431
|
}
|
|
48312
|
-
function startInertia(vX, vY,
|
|
48432
|
+
function startInertia(vX, vY, stateManager) {
|
|
48313
48433
|
let time = Date.now();
|
|
48314
48434
|
const friction = 0.95;
|
|
48315
48435
|
const inertia = () => {
|
|
@@ -48329,7 +48449,7 @@
|
|
|
48329
48449
|
stopped = false;
|
|
48330
48450
|
dy = ((vY + newVY) / 2) * dffTime;
|
|
48331
48451
|
}
|
|
48332
|
-
handleWhell({ deltaX: -dx, deltaY: -dy },
|
|
48452
|
+
handleWhell({ deltaX: -dx, deltaY: -dy }, stateManager);
|
|
48333
48453
|
if (stopped) {
|
|
48334
48454
|
return;
|
|
48335
48455
|
}
|
|
@@ -48346,7 +48466,7 @@
|
|
|
48346
48466
|
return;
|
|
48347
48467
|
}
|
|
48348
48468
|
table.scenegraph.tableGroup.addEventListener('click', (e) => {
|
|
48349
|
-
if (table.
|
|
48469
|
+
if (table.stateManager.columnMove.moving || table.stateManager.columnResize.resizing) {
|
|
48350
48470
|
return;
|
|
48351
48471
|
}
|
|
48352
48472
|
if (e.target.name === 'axis-label') {
|
|
@@ -48466,7 +48586,7 @@
|
|
|
48466
48586
|
return 'bottom';
|
|
48467
48587
|
}
|
|
48468
48588
|
|
|
48469
|
-
class
|
|
48589
|
+
class EventManager {
|
|
48470
48590
|
table;
|
|
48471
48591
|
isTouchdown;
|
|
48472
48592
|
touchMovePoints;
|
|
@@ -48495,28 +48615,28 @@
|
|
|
48495
48615
|
if (this.table.isReleased) {
|
|
48496
48616
|
return;
|
|
48497
48617
|
}
|
|
48498
|
-
const
|
|
48618
|
+
const stateManager = this.table.stateManager;
|
|
48499
48619
|
this.table.on(TABLE_EVENT_TYPE.ICON_CLICK, iconInfo => {
|
|
48500
48620
|
const { col, row, x, y, funcType, icon } = iconInfo;
|
|
48501
48621
|
if (funcType === IconFuncTypeEnum.dropDown) {
|
|
48502
|
-
|
|
48622
|
+
stateManager.triggerDropDownMenu(col, row, x, y);
|
|
48503
48623
|
}
|
|
48504
48624
|
else if (funcType === IconFuncTypeEnum.sort) {
|
|
48505
|
-
|
|
48625
|
+
stateManager.triggerSort(col, row, icon);
|
|
48506
48626
|
}
|
|
48507
48627
|
else if (funcType === IconFuncTypeEnum.frozen) {
|
|
48508
|
-
|
|
48628
|
+
stateManager.triggerFreeze(col, row, icon);
|
|
48509
48629
|
}
|
|
48510
48630
|
else if (funcType === IconFuncTypeEnum.drillDown) {
|
|
48511
48631
|
drillClick(this.table);
|
|
48512
48632
|
}
|
|
48513
48633
|
else if (funcType === IconFuncTypeEnum.collapse || funcType === IconFuncTypeEnum.expand) {
|
|
48514
|
-
this.table.
|
|
48634
|
+
this.table.stateManager.updateSelectPos(-1, -1);
|
|
48515
48635
|
this.table.toggleHierarchyState(col, row);
|
|
48516
48636
|
}
|
|
48517
48637
|
});
|
|
48518
48638
|
this.table.on(TABLE_EVENT_TYPE.DROPDOWN_MENU_CLICK, () => {
|
|
48519
|
-
|
|
48639
|
+
stateManager.hideMenu();
|
|
48520
48640
|
});
|
|
48521
48641
|
if (checkHaveTextStick(this.table)) {
|
|
48522
48642
|
this.table.on(TABLE_EVENT_TYPE.SCROLL, e => {
|
|
@@ -48542,31 +48662,31 @@
|
|
|
48542
48662
|
}
|
|
48543
48663
|
dealTableHover(eventArgsSet) {
|
|
48544
48664
|
if (!eventArgsSet) {
|
|
48545
|
-
this.table.
|
|
48665
|
+
this.table.stateManager.updateHoverPos(-1, -1);
|
|
48546
48666
|
return;
|
|
48547
48667
|
}
|
|
48548
48668
|
const { eventArgs } = eventArgsSet;
|
|
48549
48669
|
if (eventArgs) {
|
|
48550
|
-
this.table.
|
|
48670
|
+
this.table.stateManager.updateHoverPos(eventArgs.col, eventArgs.row);
|
|
48551
48671
|
}
|
|
48552
48672
|
else {
|
|
48553
|
-
this.table.
|
|
48673
|
+
this.table.stateManager.updateHoverPos(-1, -1);
|
|
48554
48674
|
}
|
|
48555
48675
|
}
|
|
48556
48676
|
dealIconHover(eventArgsSet) {
|
|
48557
48677
|
const { eventArgs } = eventArgsSet;
|
|
48558
48678
|
if (eventArgs) {
|
|
48559
|
-
this.table.
|
|
48679
|
+
this.table.stateManager.updateHoverIcon(eventArgs.col, eventArgs.row, eventArgs.target, eventArgs.targetCell, eventArgs.event);
|
|
48560
48680
|
}
|
|
48561
48681
|
else {
|
|
48562
|
-
this.table.
|
|
48682
|
+
this.table.stateManager.updateHoverIcon(-1, -1, undefined, undefined);
|
|
48563
48683
|
}
|
|
48564
48684
|
}
|
|
48565
48685
|
dealMenuHover(eventArgsSet) {
|
|
48566
48686
|
}
|
|
48567
48687
|
dealTableSelect(eventArgsSet, isSelectMoving) {
|
|
48568
48688
|
if (!eventArgsSet) {
|
|
48569
|
-
this.table.
|
|
48689
|
+
this.table.stateManager.updateSelectPos(-1, -1);
|
|
48570
48690
|
return false;
|
|
48571
48691
|
}
|
|
48572
48692
|
const { eventArgs } = eventArgsSet;
|
|
@@ -48576,30 +48696,30 @@
|
|
|
48576
48696
|
}
|
|
48577
48697
|
const define = this.table.getBodyColumnDefine(eventArgs.col, eventArgs.row);
|
|
48578
48698
|
if (this.table.isHeader(eventArgs.col, eventArgs.row) &&
|
|
48579
|
-
(define?.disableHeaderSelect || this.table.
|
|
48699
|
+
(define?.disableHeaderSelect || this.table.stateManager.select?.disableHeader)) {
|
|
48580
48700
|
if (!isSelectMoving) {
|
|
48581
|
-
this.table.
|
|
48701
|
+
this.table.stateManager.updateSelectPos(-1, -1);
|
|
48582
48702
|
}
|
|
48583
48703
|
return false;
|
|
48584
48704
|
}
|
|
48585
48705
|
else if (!this.table.isHeader(eventArgs.col, eventArgs.row) && define?.disableSelect) {
|
|
48586
48706
|
if (!isSelectMoving) {
|
|
48587
|
-
this.table.
|
|
48707
|
+
this.table.stateManager.updateSelectPos(-1, -1);
|
|
48588
48708
|
}
|
|
48589
48709
|
return false;
|
|
48590
48710
|
}
|
|
48591
48711
|
if (this.table.isPivotChart() &&
|
|
48592
48712
|
(eventArgsSet?.eventArgs?.target.name === 'axis-label' || eventArgsSet?.eventArgs?.target.type === 'chart')) {
|
|
48593
|
-
this.table.
|
|
48713
|
+
this.table.stateManager.updateSelectPos(-1, -1);
|
|
48594
48714
|
return false;
|
|
48595
48715
|
}
|
|
48596
|
-
this.table.
|
|
48716
|
+
this.table.stateManager.updateSelectPos(eventArgs.col, eventArgs.row, eventArgs.event.shiftKey, eventArgs.event.ctrlKey || eventArgs.event.metaKey);
|
|
48597
48717
|
return true;
|
|
48598
48718
|
}
|
|
48599
48719
|
return false;
|
|
48600
48720
|
}
|
|
48601
48721
|
deelTableSelectAll() {
|
|
48602
|
-
this.table.
|
|
48722
|
+
this.table.stateManager.updateSelectPos(-1, -1, false, false, true);
|
|
48603
48723
|
}
|
|
48604
48724
|
dealMenuSelect(eventArgsSet) {
|
|
48605
48725
|
}
|
|
@@ -48609,7 +48729,7 @@
|
|
|
48609
48729
|
const resizeCol = this.table.scenegraph.getResizeColAt(eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y, eventArgs.targetCell);
|
|
48610
48730
|
if (this.table._canResizeColumn(resizeCol.col, resizeCol.row) && resizeCol.col >= 0) {
|
|
48611
48731
|
if (update) {
|
|
48612
|
-
this.table.
|
|
48732
|
+
this.table.stateManager.startResizeCol(resizeCol.col, eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y, resizeCol.rightFrozen);
|
|
48613
48733
|
}
|
|
48614
48734
|
return true;
|
|
48615
48735
|
}
|
|
@@ -48617,22 +48737,22 @@
|
|
|
48617
48737
|
return false;
|
|
48618
48738
|
}
|
|
48619
48739
|
dealColumnResize(xInTable, yInTable) {
|
|
48620
|
-
this.table.
|
|
48740
|
+
this.table.stateManager.updateResizeCol(xInTable, yInTable);
|
|
48621
48741
|
}
|
|
48622
48742
|
chechColumnMover(eventArgsSet) {
|
|
48623
48743
|
const { eventArgs } = eventArgsSet;
|
|
48624
48744
|
if (eventArgs &&
|
|
48625
48745
|
this.table.isHeader(eventArgs.col, eventArgs.row) &&
|
|
48626
|
-
checkCellInSelect(eventArgs.col, eventArgs.row, this.table.
|
|
48746
|
+
checkCellInSelect(eventArgs.col, eventArgs.row, this.table.stateManager.select.ranges) &&
|
|
48627
48747
|
this.table._canDragHeaderPosition(eventArgs.col, eventArgs.row)) {
|
|
48628
|
-
this.table.
|
|
48748
|
+
this.table.stateManager.startMoveCol(eventArgs.col, eventArgs.row, eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y);
|
|
48629
48749
|
return true;
|
|
48630
48750
|
}
|
|
48631
48751
|
return false;
|
|
48632
48752
|
}
|
|
48633
48753
|
dealColumnMover(eventArgsSet) {
|
|
48634
48754
|
const { eventArgs } = eventArgsSet;
|
|
48635
|
-
this.table.
|
|
48755
|
+
this.table.stateManager.updateMoveCol(eventArgs.col, eventArgs.row, eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y);
|
|
48636
48756
|
}
|
|
48637
48757
|
startColumnResize(eventArgsSet) {
|
|
48638
48758
|
}
|
|
@@ -49239,8 +49359,8 @@
|
|
|
49239
49359
|
const children = this._menuInstanceInfo.content[dropDownIndex]?.children;
|
|
49240
49360
|
for (let i = 0; i < children.length; i++) {
|
|
49241
49361
|
const menuItem = children[i];
|
|
49242
|
-
const isHighlight = table.
|
|
49243
|
-
? isMenuHighlight(table, table.
|
|
49362
|
+
const isHighlight = table.stateManager.menu.dropDownMenuHighlight
|
|
49363
|
+
? isMenuHighlight(table, table.stateManager.menu.dropDownMenuHighlight, typeof menuItem === 'object' ? menuItem?.menuKey || menuItem?.text : menuItem, col, row)
|
|
49244
49364
|
: false;
|
|
49245
49365
|
const item = createItem(menuItem, isHighlight);
|
|
49246
49366
|
item.col = col;
|
|
@@ -49316,7 +49436,7 @@
|
|
|
49316
49436
|
if (typeof menu === 'object' && menu.children && menu.children.length) {
|
|
49317
49437
|
for (let j = 0; j < menu.children.length; j++) {
|
|
49318
49438
|
const childItem = menu.children[j];
|
|
49319
|
-
if (isMenuHighlight(table, table.
|
|
49439
|
+
if (isMenuHighlight(table, table.stateManager.menu.dropDownMenuHighlight, typeof childItem === 'object' ? childItem?.menuKey : childItem, col, row) &&
|
|
49320
49440
|
menuKey === (typeof childItem === 'object' ? childItem?.menuKey : childItem)) {
|
|
49321
49441
|
highlight = true;
|
|
49322
49442
|
return;
|
|
@@ -49365,16 +49485,16 @@
|
|
|
49365
49485
|
const menuListItem = menuInstanceInfo.content;
|
|
49366
49486
|
for (let i = 0; i < menuListItem?.length ?? 0; i++) {
|
|
49367
49487
|
const menuItem = menuListItem[i];
|
|
49368
|
-
let isHighlight = table.
|
|
49369
|
-
? isMenuHighlight(table, table.
|
|
49488
|
+
let isHighlight = table.stateManager.menu.dropDownMenuHighlight
|
|
49489
|
+
? isMenuHighlight(table, table.stateManager.menu.dropDownMenuHighlight, typeof menuItem === 'object' ? menuItem?.menuKey || menuItem?.text : menuItem, col, row)
|
|
49370
49490
|
: false;
|
|
49371
|
-
if (table.
|
|
49491
|
+
if (table.stateManager.menu.dropDownMenuHighlight &&
|
|
49372
49492
|
typeof menuItem === 'object' &&
|
|
49373
49493
|
Array.isArray(menuItem.children) &&
|
|
49374
49494
|
menuItem.children.length) {
|
|
49375
49495
|
for (let i = 0; i < menuItem.children.length; i++) {
|
|
49376
49496
|
const childItem = menuItem.children[i];
|
|
49377
|
-
if (isMenuHighlight(table, table.
|
|
49497
|
+
if (isMenuHighlight(table, table.stateManager.menu.dropDownMenuHighlight, typeof childItem === 'object' ? childItem?.menuKey || childItem?.text : childItem, col, row)) {
|
|
49378
49498
|
isHighlight = true;
|
|
49379
49499
|
break;
|
|
49380
49500
|
}
|
|
@@ -49803,8 +49923,8 @@
|
|
|
49803
49923
|
if (typeof menu === 'object' && menu.children && menu.children.length) {
|
|
49804
49924
|
for (let j = 0; j < menu.children.length; j++) {
|
|
49805
49925
|
const childItem = menu.children[j];
|
|
49806
|
-
if (_table.
|
|
49807
|
-
isMenuHighlight(_table, _table.
|
|
49926
|
+
if (_table.stateManager.menu?.dropDownMenuHighlight &&
|
|
49927
|
+
isMenuHighlight(_table, _table.stateManager.menu?.dropDownMenuHighlight, typeof childItem === 'object' ? childItem?.menuKey : childItem, col, row)) {
|
|
49808
49928
|
highlightIndex = i;
|
|
49809
49929
|
subHighlightIndex = j;
|
|
49810
49930
|
break;
|
|
@@ -50179,12 +50299,12 @@
|
|
|
50179
50299
|
if (isMobile()) {
|
|
50180
50300
|
rootElement.style.fontSize = '11px';
|
|
50181
50301
|
}
|
|
50182
|
-
const { x1: menuLeft, x2: menuRight, y1: menuTop, y2: menuBottom } = table.
|
|
50302
|
+
const { x1: menuLeft, x2: menuRight, y1: menuTop, y2: menuBottom } = table.stateManager.menu.bounds;
|
|
50183
50303
|
const tooltipLeft = tooltipX;
|
|
50184
50304
|
const tooltipRight = tooltipLeft + rootElementWidth;
|
|
50185
50305
|
const tooltipTop = tooltipY;
|
|
50186
50306
|
const tooltipBottom = tooltipLeft + rootElementHeight;
|
|
50187
|
-
if (table.
|
|
50307
|
+
if (table.stateManager.menu.isShow &&
|
|
50188
50308
|
menuLeft < tooltipRight &&
|
|
50189
50309
|
menuRight > tooltipLeft &&
|
|
50190
50310
|
menuBottom > tooltipTop &&
|
|
@@ -50391,8 +50511,8 @@
|
|
|
50391
50511
|
if (isMobile()) {
|
|
50392
50512
|
return;
|
|
50393
50513
|
}
|
|
50394
|
-
const { x1: left, x2: right, y1: top, y2: bottom } = table.
|
|
50395
|
-
if (table.
|
|
50514
|
+
const { x1: left, x2: right, y1: top, y2: bottom } = table.stateManager.menu.bounds;
|
|
50515
|
+
if (table.stateManager.menu.isShow &&
|
|
50396
50516
|
typeof e.x === 'number' &&
|
|
50397
50517
|
typeof e.y === 'number' &&
|
|
50398
50518
|
e.x > left &&
|
|
@@ -50458,7 +50578,7 @@
|
|
|
50458
50578
|
this._unbindFromCell();
|
|
50459
50579
|
}
|
|
50460
50580
|
}
|
|
50461
|
-
if (this._attachInfo && table.
|
|
50581
|
+
if (this._attachInfo && table.stateManager.menu.isShow) {
|
|
50462
50582
|
this._bindToCell(e.col, e.row);
|
|
50463
50583
|
}
|
|
50464
50584
|
});
|
|
@@ -51533,14 +51653,14 @@
|
|
|
51533
51653
|
canvasHeight;
|
|
51534
51654
|
_vDataSet;
|
|
51535
51655
|
scenegraph;
|
|
51536
|
-
|
|
51537
|
-
|
|
51656
|
+
stateManager;
|
|
51657
|
+
eventManager;
|
|
51538
51658
|
_pixelRatio;
|
|
51539
51659
|
static get EVENT_TYPE() {
|
|
51540
51660
|
return TABLE_EVENT_TYPE;
|
|
51541
51661
|
}
|
|
51542
51662
|
options;
|
|
51543
|
-
version = "0.15.
|
|
51663
|
+
version = "0.15.1";
|
|
51544
51664
|
pagination;
|
|
51545
51665
|
id = `VTable${Date.now()}`;
|
|
51546
51666
|
headerStyleCache;
|
|
@@ -51649,8 +51769,8 @@
|
|
|
51649
51769
|
: 10;
|
|
51650
51770
|
this._vDataSet = new DataSet();
|
|
51651
51771
|
this.scenegraph = new Scenegraph(this);
|
|
51652
|
-
this.
|
|
51653
|
-
this.
|
|
51772
|
+
this.stateManager = new StateManager(this);
|
|
51773
|
+
this.eventManager = new EventManager(this);
|
|
51654
51774
|
if (options.legends) {
|
|
51655
51775
|
internalProps.legends = createLegend(options.legends, this);
|
|
51656
51776
|
this.scenegraph.tableGroup.setAttributes({
|
|
@@ -51725,7 +51845,7 @@
|
|
|
51725
51845
|
if (this.tableNoFrameWidth - this.getColsWidth(0, frozenColCount - 1) <= 120) {
|
|
51726
51846
|
this.internalProps.frozenColCount = 0;
|
|
51727
51847
|
}
|
|
51728
|
-
this.
|
|
51848
|
+
this.stateManager.setFrozenCol(this.internalProps.frozenColCount);
|
|
51729
51849
|
}
|
|
51730
51850
|
setFrozenColCount(frozenColCount) {
|
|
51731
51851
|
if (frozenColCount >= this.colCount) {
|
|
@@ -51736,7 +51856,7 @@
|
|
|
51736
51856
|
if (this.tableNoFrameWidth - this.getColsWidth(0, frozenColCount - 1) <= 120) {
|
|
51737
51857
|
this.internalProps.frozenColCount = 0;
|
|
51738
51858
|
}
|
|
51739
|
-
this.
|
|
51859
|
+
this.stateManager.setFrozenCol(this.internalProps.frozenColCount);
|
|
51740
51860
|
}
|
|
51741
51861
|
_setFrozenColCount(frozenColCount) {
|
|
51742
51862
|
if (frozenColCount >= this.colCount) {
|
|
@@ -51951,9 +52071,6 @@
|
|
|
51951
52071
|
get rowHierarchyType() {
|
|
51952
52072
|
return 'grid';
|
|
51953
52073
|
}
|
|
51954
|
-
setColWidths(widths) {
|
|
51955
|
-
widths.forEach((value, index) => this.setColWidth(index, value));
|
|
51956
|
-
}
|
|
51957
52074
|
getColsWidth(startCol, endCol) {
|
|
51958
52075
|
endCol = Math.min(endCol, this.colCount - 1);
|
|
51959
52076
|
const cachedColWidth = this._colRangeWidthsMap.get(`$${startCol}$${endCol}`);
|
|
@@ -52001,7 +52118,7 @@
|
|
|
52001
52118
|
}
|
|
52002
52119
|
return this.internalProps.defaultRowHeight;
|
|
52003
52120
|
}
|
|
52004
|
-
|
|
52121
|
+
_setRowHeight(row, height, clearCache) {
|
|
52005
52122
|
this.rowHeightsMap.put(row, Math.round(height));
|
|
52006
52123
|
if (clearCache) {
|
|
52007
52124
|
this._clearRowRangeHeightsMap(row);
|
|
@@ -52094,13 +52211,13 @@
|
|
|
52094
52211
|
}
|
|
52095
52212
|
return this._adjustColWidth(col, this._colWidthDefineToPxWidth(width));
|
|
52096
52213
|
}
|
|
52097
|
-
|
|
52214
|
+
_setColWidth(col, width, clearCache, skipCheckFrozen) {
|
|
52098
52215
|
this.colWidthsMap.put(col, typeof width === 'number' ? Math.round(width) : width);
|
|
52099
52216
|
if (clearCache) {
|
|
52100
52217
|
this._clearColRangeWidthsMap(col);
|
|
52101
52218
|
}
|
|
52102
52219
|
if (!skipCheckFrozen) {
|
|
52103
|
-
this.
|
|
52220
|
+
this.stateManager.checkFrozen();
|
|
52104
52221
|
}
|
|
52105
52222
|
}
|
|
52106
52223
|
_clearColRangeWidthsMap(col) {
|
|
@@ -52397,6 +52514,11 @@
|
|
|
52397
52514
|
}
|
|
52398
52515
|
renderAsync() {
|
|
52399
52516
|
this.scenegraph.updateNextFrame();
|
|
52517
|
+
return new Promise((resolve, reject) => {
|
|
52518
|
+
setTimeout(() => {
|
|
52519
|
+
resolve();
|
|
52520
|
+
}, 0);
|
|
52521
|
+
});
|
|
52400
52522
|
}
|
|
52401
52523
|
_toRelativeRect(absoluteRect) {
|
|
52402
52524
|
const rect = absoluteRect.copy();
|
|
@@ -52503,16 +52625,16 @@
|
|
|
52503
52625
|
return count;
|
|
52504
52626
|
}
|
|
52505
52627
|
get scrollTop() {
|
|
52506
|
-
return this.
|
|
52628
|
+
return this.stateManager.scroll.verticalBarPos;
|
|
52507
52629
|
}
|
|
52508
52630
|
set scrollTop(scrollTop) {
|
|
52509
|
-
this.
|
|
52631
|
+
this.stateManager.setScrollTop(scrollTop);
|
|
52510
52632
|
}
|
|
52511
52633
|
get scrollLeft() {
|
|
52512
|
-
return this.
|
|
52634
|
+
return this.stateManager.scroll.horizontalBarPos;
|
|
52513
52635
|
}
|
|
52514
52636
|
set scrollLeft(scrollLeft) {
|
|
52515
|
-
this.
|
|
52637
|
+
this.stateManager.setScrollLeft(scrollLeft);
|
|
52516
52638
|
}
|
|
52517
52639
|
getScrollLeft() {
|
|
52518
52640
|
return this.scrollLeft;
|
|
@@ -52617,6 +52739,7 @@
|
|
|
52617
52739
|
this.colContentWidthsMap = new NumberMap();
|
|
52618
52740
|
this.colWidthsLimit = {};
|
|
52619
52741
|
internalProps.theme = themes.of(options.theme ?? themes.DEFAULT);
|
|
52742
|
+
this.scenegraph.updateStageBackground();
|
|
52620
52743
|
internalProps.autoWrapText = options.autoWrapText;
|
|
52621
52744
|
internalProps.allowFrozenColCount = options.allowFrozenColCount ?? internalProps.colCount;
|
|
52622
52745
|
internalProps.limitMaxAutoWidth = options.limitMaxAutoWidth ?? 450;
|
|
@@ -52633,7 +52756,7 @@
|
|
|
52633
52756
|
internalProps.title?.release();
|
|
52634
52757
|
internalProps.layoutMap.release();
|
|
52635
52758
|
this.scenegraph.clearCells();
|
|
52636
|
-
this.
|
|
52759
|
+
this.stateManager.initState();
|
|
52637
52760
|
this._updateSize();
|
|
52638
52761
|
if (options.legends) {
|
|
52639
52762
|
internalProps.legends = createLegend(options.legends, this);
|
|
@@ -52662,11 +52785,13 @@
|
|
|
52662
52785
|
this.clearRowHeightCache();
|
|
52663
52786
|
}
|
|
52664
52787
|
renderWithRecreateCells() {
|
|
52788
|
+
const oldHoverState = { col: this.stateManager.hover.cellPos.col, row: this.stateManager.hover.cellPos.row };
|
|
52665
52789
|
this.refreshHeader();
|
|
52666
52790
|
this.scenegraph.clearCells();
|
|
52667
52791
|
this.headerStyleCache = new Map();
|
|
52668
52792
|
this.bodyStyleCache = new Map();
|
|
52669
52793
|
this.scenegraph.createSceneGraph();
|
|
52794
|
+
this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row);
|
|
52670
52795
|
this.render();
|
|
52671
52796
|
}
|
|
52672
52797
|
getFrozenRowsHeight() {
|
|
@@ -52864,20 +52989,25 @@
|
|
|
52864
52989
|
return Math.min(Math.ceil(absoluteX / this.internalProps.defaultColWidth), this.colCount - 1);
|
|
52865
52990
|
}
|
|
52866
52991
|
clearSelected() {
|
|
52867
|
-
this.
|
|
52992
|
+
this.stateManager.updateSelectPos(-1, -1);
|
|
52868
52993
|
}
|
|
52869
52994
|
selectCell(col, row) {
|
|
52870
|
-
this.
|
|
52871
|
-
this.
|
|
52995
|
+
this.stateManager.updateSelectPos(col, row);
|
|
52996
|
+
this.stateManager.endSelectCells();
|
|
52872
52997
|
}
|
|
52873
52998
|
selectCells(cellRanges) {
|
|
52874
52999
|
const { scrollLeft, scrollTop } = this;
|
|
52875
53000
|
cellRanges.forEach((cellRange, index) => {
|
|
52876
|
-
|
|
52877
|
-
|
|
52878
|
-
|
|
52879
|
-
|
|
52880
|
-
|
|
53001
|
+
if (cellRange.start.col === cellRange.end.col && cellRange.start.row === cellRange.end.row) {
|
|
53002
|
+
this.stateManager.updateSelectPos(cellRange.start.col, cellRange.start.row, false, index >= 1);
|
|
53003
|
+
}
|
|
53004
|
+
else {
|
|
53005
|
+
this.stateManager.updateSelectPos(cellRange.start.col, cellRange.start.row, false, index >= 1);
|
|
53006
|
+
this.stateManager.updateInteractionState(InteractionState.grabing);
|
|
53007
|
+
this.stateManager.updateSelectPos(cellRange.end.col, cellRange.end.row, false, index >= 1);
|
|
53008
|
+
}
|
|
53009
|
+
this.stateManager.endSelectCells(false);
|
|
53010
|
+
this.stateManager.updateInteractionState(InteractionState.default);
|
|
52881
53011
|
});
|
|
52882
53012
|
this.setScrollTop(scrollTop);
|
|
52883
53013
|
this.setScrollLeft(scrollLeft);
|
|
@@ -52931,12 +53061,15 @@
|
|
|
52931
53061
|
this.options.theme = theme;
|
|
52932
53062
|
}
|
|
52933
53063
|
updateTheme(theme) {
|
|
53064
|
+
const oldHoverState = { col: this.stateManager.hover.cellPos.col, row: this.stateManager.hover.cellPos.row };
|
|
52934
53065
|
this.internalProps.theme = themes.of(theme ?? themes.DEFAULT);
|
|
52935
53066
|
this.options.theme = theme;
|
|
53067
|
+
this.scenegraph.updateStageBackground();
|
|
52936
53068
|
this.scenegraph.clearCells();
|
|
52937
53069
|
this.headerStyleCache = new Map();
|
|
52938
53070
|
this.bodyStyleCache = new Map();
|
|
52939
53071
|
this.scenegraph.createSceneGraph();
|
|
53072
|
+
this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row);
|
|
52940
53073
|
this.render();
|
|
52941
53074
|
}
|
|
52942
53075
|
getBodyField(col, row) {
|
|
@@ -53071,10 +53204,10 @@
|
|
|
53071
53204
|
return description;
|
|
53072
53205
|
}
|
|
53073
53206
|
setDropDownMenuHighlight(cells) {
|
|
53074
|
-
this.
|
|
53207
|
+
this.stateManager.setDropDownMenuHighlight(cells);
|
|
53075
53208
|
}
|
|
53076
53209
|
_dropDownMenuIsHighlight(colNow, rowNow, index) {
|
|
53077
|
-
return this.
|
|
53210
|
+
return this.stateManager.dropDownMenuIsHighlight(colNow, rowNow, index);
|
|
53078
53211
|
}
|
|
53079
53212
|
isHeader(col, row) {
|
|
53080
53213
|
return this.internalProps.layoutMap && this.internalProps.layoutMap.isHeader(col, row);
|
|
@@ -53255,8 +53388,8 @@
|
|
|
53255
53388
|
return limit.max !== limit.min;
|
|
53256
53389
|
}
|
|
53257
53390
|
_canDragHeaderPosition(col, row) {
|
|
53258
|
-
if (this.isHeader(col, row) && this.
|
|
53259
|
-
const selectRange = this.
|
|
53391
|
+
if (this.isHeader(col, row) && this.stateManager.isSelected(col, row)) {
|
|
53392
|
+
const selectRange = this.stateManager.select.ranges[0];
|
|
53260
53393
|
if (this.isColumnHeader(col, row)) {
|
|
53261
53394
|
if (selectRange.end.row !== this.rowCount - 1) {
|
|
53262
53395
|
return false;
|
|
@@ -53310,7 +53443,7 @@
|
|
|
53310
53443
|
menuType = Array.isArray(dropDownMenuOptions.content) ? 'dropdown-menu' : 'container';
|
|
53311
53444
|
}
|
|
53312
53445
|
if (this.internalProps.menu.renderMode === 'html') {
|
|
53313
|
-
this.
|
|
53446
|
+
this.stateManager.menu.isShow = true;
|
|
53314
53447
|
this.internalProps.menuHandler._bindToCell(col, row, menuType, dropDownMenuOptions);
|
|
53315
53448
|
}
|
|
53316
53449
|
}
|
|
@@ -53402,8 +53535,8 @@
|
|
|
53402
53535
|
this.render();
|
|
53403
53536
|
}
|
|
53404
53537
|
getCopyValue() {
|
|
53405
|
-
if (this.
|
|
53406
|
-
const ranges = this.
|
|
53538
|
+
if (this.stateManager.select?.ranges?.length > 0) {
|
|
53539
|
+
const ranges = this.stateManager.select.ranges;
|
|
53407
53540
|
let minCol = Math.min(ranges[0].start.col, ranges[0].end.col);
|
|
53408
53541
|
let maxCol = Math.max(ranges[0].start.col, ranges[0].end.col);
|
|
53409
53542
|
let minRow = Math.min(ranges[0].start.row, ranges[0].end.row);
|
|
@@ -53500,10 +53633,10 @@
|
|
|
53500
53633
|
return '';
|
|
53501
53634
|
}
|
|
53502
53635
|
getSelectedCellInfos() {
|
|
53503
|
-
if (!this.
|
|
53636
|
+
if (!this.stateManager.select?.ranges) {
|
|
53504
53637
|
return null;
|
|
53505
53638
|
}
|
|
53506
|
-
const ranges = this.
|
|
53639
|
+
const ranges = this.stateManager.select.ranges;
|
|
53507
53640
|
if (!ranges.length) {
|
|
53508
53641
|
return [];
|
|
53509
53642
|
}
|
|
@@ -53609,7 +53742,7 @@
|
|
|
53609
53742
|
});
|
|
53610
53743
|
}
|
|
53611
53744
|
_getActiveChartInstance() {
|
|
53612
|
-
const cellGroup = this.scenegraph.getCell(this.
|
|
53745
|
+
const cellGroup = this.scenegraph.getCell(this.stateManager.hover?.cellPos?.col, this.stateManager.hover?.cellPos?.row);
|
|
53613
53746
|
return cellGroup?.getChildren()?.[0]?.type === 'chart'
|
|
53614
53747
|
? cellGroup.getChildren()[0].activeChartInstance
|
|
53615
53748
|
: null;
|
|
@@ -53628,6 +53761,16 @@
|
|
|
53628
53761
|
}
|
|
53629
53762
|
return false;
|
|
53630
53763
|
}
|
|
53764
|
+
getCustomMergeValue(col, row) {
|
|
53765
|
+
if (this.internalProps.customMergeCell) {
|
|
53766
|
+
const customMerge = this.getCustomMerge(col, row);
|
|
53767
|
+
if (customMerge) {
|
|
53768
|
+
const { text } = customMerge;
|
|
53769
|
+
return text;
|
|
53770
|
+
}
|
|
53771
|
+
}
|
|
53772
|
+
return undefined;
|
|
53773
|
+
}
|
|
53631
53774
|
exportImg() {
|
|
53632
53775
|
const c = this.scenegraph.stage.toCanvas();
|
|
53633
53776
|
return c.toDataURL();
|
|
@@ -53908,7 +54051,6 @@
|
|
|
53908
54051
|
title: { visible: false },
|
|
53909
54052
|
domainLine: { visible: false },
|
|
53910
54053
|
seriesIndex: index,
|
|
53911
|
-
height: -1,
|
|
53912
54054
|
sync: { axisId: NO_AXISID_FRO_VTABLE }
|
|
53913
54055
|
}));
|
|
53914
54056
|
});
|
|
@@ -53931,8 +54073,7 @@
|
|
|
53931
54073
|
domainLine: { visible: false },
|
|
53932
54074
|
tick: { visible: false },
|
|
53933
54075
|
subTick: { visible: false },
|
|
53934
|
-
title: { visible: false }
|
|
53935
|
-
width: -1
|
|
54076
|
+
title: { visible: false }
|
|
53936
54077
|
}));
|
|
53937
54078
|
}
|
|
53938
54079
|
else {
|
|
@@ -53966,7 +54107,6 @@
|
|
|
53966
54107
|
title: { visible: false },
|
|
53967
54108
|
domainLine: { visible: false },
|
|
53968
54109
|
seriesIndex: index,
|
|
53969
|
-
width: -1,
|
|
53970
54110
|
sync: { axisId: NO_AXISID_FRO_VTABLE }
|
|
53971
54111
|
}));
|
|
53972
54112
|
});
|
|
@@ -53990,8 +54130,7 @@
|
|
|
53990
54130
|
domainLine: { visible: false },
|
|
53991
54131
|
tick: { visible: false },
|
|
53992
54132
|
subTick: { visible: false },
|
|
53993
|
-
title: { visible: false }
|
|
53994
|
-
height: -1
|
|
54133
|
+
title: { visible: false }
|
|
53995
54134
|
}));
|
|
53996
54135
|
}
|
|
53997
54136
|
return axes;
|
|
@@ -54777,6 +54916,9 @@
|
|
|
54777
54916
|
isEmpty(col, row) {
|
|
54778
54917
|
return false;
|
|
54779
54918
|
}
|
|
54919
|
+
isAxisCell(col, row) {
|
|
54920
|
+
return false;
|
|
54921
|
+
}
|
|
54780
54922
|
getChartAxes(col, row) {
|
|
54781
54923
|
return [];
|
|
54782
54924
|
}
|
|
@@ -54946,13 +55088,22 @@
|
|
|
54946
55088
|
bindEvent() {
|
|
54947
55089
|
const handler = this.table.internalProps.handler;
|
|
54948
55090
|
this.table.on(TABLE_EVENT_TYPE.DBLCLICK_CELL, e => {
|
|
54949
|
-
|
|
54950
|
-
|
|
54951
|
-
|
|
54952
|
-
|
|
54953
|
-
|
|
55091
|
+
if (!this.table.options.editCellTrigger ||
|
|
55092
|
+
this.table.options.editCellTrigger === 'doubleclick') {
|
|
55093
|
+
const { col, row } = e;
|
|
55094
|
+
const eventArgsSet = getCellEventArgsSet(e.federatedEvent);
|
|
55095
|
+
const resizeCol = this.table.scenegraph.getResizeColAt(eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y, eventArgsSet.eventArgs?.targetCell);
|
|
55096
|
+
if (this.table._canResizeColumn(resizeCol.col, resizeCol.row) && resizeCol.col >= 0) {
|
|
55097
|
+
return;
|
|
55098
|
+
}
|
|
55099
|
+
this.startEditCell(col, row);
|
|
55100
|
+
}
|
|
55101
|
+
});
|
|
55102
|
+
this.table.on(TABLE_EVENT_TYPE.CLICK_CELL, e => {
|
|
55103
|
+
if (this.table.options.editCellTrigger === 'click') {
|
|
55104
|
+
const { col, row } = e;
|
|
55105
|
+
this.startEditCell(col, row);
|
|
54954
55106
|
}
|
|
54955
|
-
this.startEditCell(col, row);
|
|
54956
55107
|
});
|
|
54957
55108
|
document.body.addEventListener('pointerdown', (e) => {
|
|
54958
55109
|
const target = e.target;
|
|
@@ -55038,7 +55189,9 @@
|
|
|
55038
55189
|
: [];
|
|
55039
55190
|
this.showHeader = options.showHeader ?? true;
|
|
55040
55191
|
this.transpose = options.transpose ?? false;
|
|
55041
|
-
|
|
55192
|
+
if (Env.mode !== 'node') {
|
|
55193
|
+
this.editorManager = new EditManeger(this);
|
|
55194
|
+
}
|
|
55042
55195
|
this.refreshHeader();
|
|
55043
55196
|
if (options.dataSource) {
|
|
55044
55197
|
_setDataSource(this, options.dataSource);
|
|
@@ -55070,6 +55223,7 @@
|
|
|
55070
55223
|
return this.internalProps.sortState;
|
|
55071
55224
|
}
|
|
55072
55225
|
updateColumns(columns) {
|
|
55226
|
+
const oldHoverState = { col: this.stateManager.hover.cellPos.col, row: this.stateManager.hover.cellPos.row };
|
|
55073
55227
|
this.internalProps.columns = cloneDeep$1(columns);
|
|
55074
55228
|
this.options.columns = columns;
|
|
55075
55229
|
this.refreshHeader();
|
|
@@ -55077,6 +55231,7 @@
|
|
|
55077
55231
|
this.headerStyleCache = new Map();
|
|
55078
55232
|
this.bodyStyleCache = new Map();
|
|
55079
55233
|
this.scenegraph.createSceneGraph();
|
|
55234
|
+
this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row);
|
|
55080
55235
|
this.renderAsync();
|
|
55081
55236
|
}
|
|
55082
55237
|
get header() {
|
|
@@ -55108,6 +55263,10 @@
|
|
|
55108
55263
|
if (col === -1 || row === -1) {
|
|
55109
55264
|
return null;
|
|
55110
55265
|
}
|
|
55266
|
+
const customMergeText = this.getCustomMergeValue(col, row);
|
|
55267
|
+
if (customMergeText) {
|
|
55268
|
+
return customMergeText;
|
|
55269
|
+
}
|
|
55111
55270
|
const table = this;
|
|
55112
55271
|
if (table.internalProps.layoutMap.isHeader(col, row)) {
|
|
55113
55272
|
const { title } = table.internalProps.layoutMap.getHeader(col, row);
|
|
@@ -55252,7 +55411,7 @@
|
|
|
55252
55411
|
for (let col = 0; col < layoutMap.columnWidths.length; col++) {
|
|
55253
55412
|
const { width, minWidth, maxWidth } = layoutMap.columnWidths?.[col] ?? {};
|
|
55254
55413
|
if (width && ((typeof width === 'string' && width !== 'auto') || (typeof width === 'number' && width > 0))) {
|
|
55255
|
-
table.
|
|
55414
|
+
table._setColWidth(col, width);
|
|
55256
55415
|
}
|
|
55257
55416
|
if (minWidth && ((typeof minWidth === 'number' && minWidth > 0) || typeof minWidth === 'string')) {
|
|
55258
55417
|
table.setMinColWidth(col, minWidth);
|
|
@@ -55288,7 +55447,7 @@
|
|
|
55288
55447
|
table.bottomFrozenRowCount = this.options.bottomFrozenRowCount ?? 0;
|
|
55289
55448
|
table.rightFrozenColCount = this.options.rightFrozenColCount ?? 0;
|
|
55290
55449
|
}
|
|
55291
|
-
this.
|
|
55450
|
+
this.stateManager.setFrozenCol(this.internalProps.frozenColCount);
|
|
55292
55451
|
}
|
|
55293
55452
|
getFieldData(field, col, row) {
|
|
55294
55453
|
if (field === null) {
|
|
@@ -55518,25 +55677,36 @@
|
|
|
55518
55677
|
this.scenegraph.sortCell();
|
|
55519
55678
|
}
|
|
55520
55679
|
}
|
|
55521
|
-
this.
|
|
55680
|
+
this.stateManager.updateSortState(sortState);
|
|
55522
55681
|
}
|
|
55523
55682
|
getCheckboxState(field) {
|
|
55524
|
-
if (this.
|
|
55525
|
-
this.
|
|
55683
|
+
if (this.stateManager.checkedState.length < this.rowCount - this.columnHeaderLevelCount) {
|
|
55684
|
+
this.stateManager.initLeftRecordsCheckState(this.records);
|
|
55526
55685
|
}
|
|
55527
55686
|
if (isValid$6(field)) {
|
|
55528
|
-
return this.
|
|
55687
|
+
return this.stateManager.checkedState.map(state => {
|
|
55529
55688
|
return state[field];
|
|
55530
55689
|
});
|
|
55531
55690
|
}
|
|
55532
|
-
return this.
|
|
55691
|
+
return this.stateManager.checkedState;
|
|
55692
|
+
}
|
|
55693
|
+
getCellCheckboxState(col, row) {
|
|
55694
|
+
const define = this.getBodyColumnDefine(col, row);
|
|
55695
|
+
const field = define?.field;
|
|
55696
|
+
const cellType = define?.cellType;
|
|
55697
|
+
if (isValid$6(field) && cellType === 'checkbox') {
|
|
55698
|
+
const dataIndex = this.dataSource.getIndexKey(this.getRecordIndexByCell(col, row));
|
|
55699
|
+
return this.stateManager.checkedState[dataIndex][field];
|
|
55700
|
+
}
|
|
55701
|
+
return undefined;
|
|
55533
55702
|
}
|
|
55534
55703
|
setRecords(records, sort) {
|
|
55535
55704
|
typeof window !== 'undefined' ? window.performance.now() : 0;
|
|
55705
|
+
const oldHoverState = { col: this.stateManager.hover.cellPos.col, row: this.stateManager.hover.cellPos.row };
|
|
55536
55706
|
this.scenegraph.clearCells();
|
|
55537
55707
|
if (sort !== undefined) {
|
|
55538
55708
|
this.internalProps.sortState = sort;
|
|
55539
|
-
this.
|
|
55709
|
+
this.stateManager.setSortState(this.sortState);
|
|
55540
55710
|
}
|
|
55541
55711
|
if (records) {
|
|
55542
55712
|
_setRecords(this, records);
|
|
@@ -55561,7 +55731,7 @@
|
|
|
55561
55731
|
else {
|
|
55562
55732
|
hd = this.internalProps.layoutMap.headerObjects.find((col) => col && col.field === field);
|
|
55563
55733
|
}
|
|
55564
|
-
|
|
55734
|
+
this.dataSource.sort(hd.field, order, sortFunc ?? defaultOrderFn);
|
|
55565
55735
|
}
|
|
55566
55736
|
}
|
|
55567
55737
|
this.refreshRowColCount();
|
|
@@ -55569,8 +55739,9 @@
|
|
|
55569
55739
|
else {
|
|
55570
55740
|
_setRecords(this, records);
|
|
55571
55741
|
}
|
|
55572
|
-
this.
|
|
55742
|
+
this.stateManager.initCheckedState(records);
|
|
55573
55743
|
this.scenegraph.createSceneGraph();
|
|
55744
|
+
this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row);
|
|
55574
55745
|
if (this.internalProps.title && !this.internalProps.title.isReleased) {
|
|
55575
55746
|
this._updateSize();
|
|
55576
55747
|
this.internalProps.title.resize();
|
|
@@ -55583,14 +55754,22 @@
|
|
|
55583
55754
|
this.dataSource.setRecord(record, index);
|
|
55584
55755
|
}
|
|
55585
55756
|
startEditCell(col, row) {
|
|
55586
|
-
|
|
55757
|
+
if (isValid$6(col) && isValid$6(row)) {
|
|
55758
|
+
this.editorManager.startEditCell(col, row);
|
|
55759
|
+
}
|
|
55760
|
+
else if (this.stateManager.select?.cellPos) {
|
|
55761
|
+
const { col, row } = this.stateManager.select.cellPos;
|
|
55762
|
+
if (isValid$6(col) && isValid$6(row)) {
|
|
55763
|
+
this.editorManager.startEditCell(col, row);
|
|
55764
|
+
}
|
|
55765
|
+
}
|
|
55587
55766
|
}
|
|
55588
55767
|
completeEditCell() {
|
|
55589
55768
|
this.editorManager.completeEdit();
|
|
55590
55769
|
}
|
|
55591
55770
|
getEditor(col, row) {
|
|
55592
55771
|
const define = this.getBodyColumnDefine(col, row);
|
|
55593
|
-
|
|
55772
|
+
let editorDefine = define?.editor ?? this.options.editor;
|
|
55594
55773
|
if (typeof editorDefine === 'function') {
|
|
55595
55774
|
const arg = {
|
|
55596
55775
|
col,
|
|
@@ -55599,9 +55778,9 @@
|
|
|
55599
55778
|
value: this.getCellValue(col, row) || '',
|
|
55600
55779
|
table: this
|
|
55601
55780
|
};
|
|
55602
|
-
|
|
55781
|
+
editorDefine = editorDefine(arg);
|
|
55603
55782
|
}
|
|
55604
|
-
|
|
55783
|
+
if (typeof editorDefine === 'string') {
|
|
55605
55784
|
return get(editorDefine);
|
|
55606
55785
|
}
|
|
55607
55786
|
return editorDefine;
|
|
@@ -56772,16 +56951,19 @@
|
|
|
56772
56951
|
}
|
|
56773
56952
|
return 0;
|
|
56774
56953
|
}
|
|
56775
|
-
|
|
56776
|
-
|
|
56777
|
-
|
|
56778
|
-
|
|
56779
|
-
|
|
56780
|
-
|
|
56781
|
-
|
|
56954
|
+
if (this.indicatorKeys.length >= 1) {
|
|
56955
|
+
const axisOption = this._table.pivotChartAxes.find(axisOption => {
|
|
56956
|
+
return axisOption.orient === 'bottom';
|
|
56957
|
+
});
|
|
56958
|
+
if (axisOption?.visible === false) {
|
|
56959
|
+
return 0;
|
|
56960
|
+
}
|
|
56961
|
+
if (this.indicatorsAsCol) {
|
|
56962
|
+
return 1;
|
|
56963
|
+
}
|
|
56782
56964
|
return 1;
|
|
56783
56965
|
}
|
|
56784
|
-
return
|
|
56966
|
+
return 0;
|
|
56785
56967
|
}
|
|
56786
56968
|
get rightFrozenColCount() {
|
|
56787
56969
|
if (!this._table.isPivotChart()) {
|
|
@@ -56887,7 +57069,7 @@
|
|
|
56887
57069
|
id: '',
|
|
56888
57070
|
field: undefined,
|
|
56889
57071
|
indicatorKey: undefined,
|
|
56890
|
-
cellType:
|
|
57072
|
+
cellType: 'text',
|
|
56891
57073
|
define: undefined
|
|
56892
57074
|
});
|
|
56893
57075
|
}
|
|
@@ -56897,7 +57079,7 @@
|
|
|
56897
57079
|
id: '',
|
|
56898
57080
|
field: undefined,
|
|
56899
57081
|
indicatorKey: undefined,
|
|
56900
|
-
cellType:
|
|
57082
|
+
cellType: 'text',
|
|
56901
57083
|
define: undefined
|
|
56902
57084
|
});
|
|
56903
57085
|
}
|
|
@@ -57606,12 +57788,32 @@
|
|
|
57606
57788
|
if (!this._table.isPivotChart()) {
|
|
57607
57789
|
return false;
|
|
57608
57790
|
}
|
|
57609
|
-
if (
|
|
57791
|
+
if (this.isLeftBottomCorner(col, row)) {
|
|
57610
57792
|
return true;
|
|
57611
57793
|
}
|
|
57612
|
-
if (this.
|
|
57794
|
+
if (this.isRightBottomCorner(col, row)) {
|
|
57613
57795
|
return true;
|
|
57614
57796
|
}
|
|
57797
|
+
if (this.isRightTopCorner(col, row)) {
|
|
57798
|
+
return true;
|
|
57799
|
+
}
|
|
57800
|
+
return false;
|
|
57801
|
+
}
|
|
57802
|
+
isAxisCell(col, row) {
|
|
57803
|
+
if (!this._table.isPivotChart()) {
|
|
57804
|
+
return false;
|
|
57805
|
+
}
|
|
57806
|
+
if (this.indicatorKeys.length >= 1) {
|
|
57807
|
+
if (this.isBottomFrozenRow(col, row) || this.isRightFrozenColumn(col, row)) {
|
|
57808
|
+
return true;
|
|
57809
|
+
}
|
|
57810
|
+
if (this.isRowHeader(col, row) && col === this.rowHeaderLevelCount - 1) {
|
|
57811
|
+
return true;
|
|
57812
|
+
}
|
|
57813
|
+
if (this.hasTwoIndicatorAxes && this.indicatorsAsCol && row === this.columnHeaderLevelCount - 1) {
|
|
57814
|
+
return true;
|
|
57815
|
+
}
|
|
57816
|
+
}
|
|
57615
57817
|
return false;
|
|
57616
57818
|
}
|
|
57617
57819
|
getChartAxes(col, row) {
|
|
@@ -57828,7 +58030,7 @@
|
|
|
57828
58030
|
for (const key in this.dataset.collectValuesBy) {
|
|
57829
58031
|
if (this.dataset.collectValuesBy[key].type === 'yField' && !this.dataset.collectValuesBy[key].range) {
|
|
57830
58032
|
collectedValues =
|
|
57831
|
-
this.dataset.collectedValues[key][path
|
|
58033
|
+
this.dataset.collectedValues[key]?.[path
|
|
57832
58034
|
.map(pathObj => {
|
|
57833
58035
|
return pathObj.value;
|
|
57834
58036
|
})
|
|
@@ -57853,7 +58055,7 @@
|
|
|
57853
58055
|
for (const key in this.dataset.collectValuesBy) {
|
|
57854
58056
|
if (this.dataset.collectValuesBy[key].type === 'xField' && !this.dataset.collectValuesBy[key].range) {
|
|
57855
58057
|
collectedValues =
|
|
57856
|
-
this.dataset.collectedValues[key][path
|
|
58058
|
+
this.dataset.collectedValues[key]?.[path
|
|
57857
58059
|
.map(pathObj => {
|
|
57858
58060
|
return pathObj.value;
|
|
57859
58061
|
})
|
|
@@ -57974,7 +58176,7 @@
|
|
|
57974
58176
|
}
|
|
57975
58177
|
const space = bandSpace(count, paddingInner, paddingOuter);
|
|
57976
58178
|
const step = bandwidth / (1 - paddingInner);
|
|
57977
|
-
const wholeSize = space * step;
|
|
58179
|
+
const wholeSize = Math.ceil(space * step);
|
|
57978
58180
|
return wholeSize;
|
|
57979
58181
|
}
|
|
57980
58182
|
function bandSpace(count, paddingInner, paddingOuter) {
|
|
@@ -59513,12 +59715,15 @@
|
|
|
59513
59715
|
this.updatePivotSortState(options.pivotSortState);
|
|
59514
59716
|
}
|
|
59515
59717
|
this.refreshHeader();
|
|
59516
|
-
this.
|
|
59718
|
+
this.stateManager.initCheckedState(records);
|
|
59517
59719
|
this.scenegraph.createSceneGraph();
|
|
59518
59720
|
if (options.title) {
|
|
59519
59721
|
this.internalProps.title = new Title(options.title, this);
|
|
59520
59722
|
this.scenegraph.resize();
|
|
59521
59723
|
}
|
|
59724
|
+
setTimeout(() => {
|
|
59725
|
+
this.fireListeners(TABLE_EVENT_TYPE.INITIALIZED, null);
|
|
59726
|
+
}, 0);
|
|
59522
59727
|
}
|
|
59523
59728
|
static get EVENT_TYPE() {
|
|
59524
59729
|
return PIVOT_TABLE_EVENT_TYPE;
|
|
@@ -59555,7 +59760,7 @@
|
|
|
59555
59760
|
this.internalProps.rowTree =
|
|
59556
59761
|
!options.indicatorsAsCol && !options.rows?.length && !options.rowTree ? [] : cloneDeep$1(options.rowTree);
|
|
59557
59762
|
options.records && (this.internalProps.records = options.records);
|
|
59558
|
-
this.
|
|
59763
|
+
this.stateManager.initCheckedState(this.internalProps.records);
|
|
59559
59764
|
this.pagination = options.pagination;
|
|
59560
59765
|
internalProps.columnResizeType = options.columnResizeType ?? 'column';
|
|
59561
59766
|
internalProps.dataConfig = cloneDeep$1(options.dataConfig);
|
|
@@ -59667,7 +59872,7 @@
|
|
|
59667
59872
|
for (let col = 0; col < internalProps.layoutMap.columnWidths.length; col++) {
|
|
59668
59873
|
const { width, minWidth, maxWidth } = internalProps.layoutMap.columnWidths?.[col] ?? {};
|
|
59669
59874
|
if (width && ((typeof width === 'string' && width !== 'auto') || (typeof width === 'number' && width > 0))) {
|
|
59670
|
-
this.
|
|
59875
|
+
this._setColWidth(col, width);
|
|
59671
59876
|
}
|
|
59672
59877
|
if (minWidth && ((typeof minWidth === 'number' && minWidth > 0) || typeof minWidth === 'string')) {
|
|
59673
59878
|
this.setMinColWidth(col, minWidth);
|
|
@@ -59690,7 +59895,7 @@
|
|
|
59690
59895
|
table.frozenRowCount = layoutMap.headerLevelCount;
|
|
59691
59896
|
table.bottomFrozenRowCount = this.options.bottomFrozenRowCount ?? 0;
|
|
59692
59897
|
table.rightFrozenColCount = this.options.rightFrozenColCount ?? 0;
|
|
59693
|
-
this.
|
|
59898
|
+
this.stateManager.setFrozenCol(this.internalProps.frozenColCount);
|
|
59694
59899
|
}
|
|
59695
59900
|
_getSortFuncFromHeaderOption(columns, field, fieldKey) {
|
|
59696
59901
|
return undefined;
|
|
@@ -59750,6 +59955,10 @@
|
|
|
59750
59955
|
return dataValue;
|
|
59751
59956
|
}
|
|
59752
59957
|
getCellValue(col, row) {
|
|
59958
|
+
const customMergeText = this.getCustomMergeValue(col, row);
|
|
59959
|
+
if (customMergeText) {
|
|
59960
|
+
return customMergeText;
|
|
59961
|
+
}
|
|
59753
59962
|
if (this.internalProps.layoutMap.isHeader(col, row)) {
|
|
59754
59963
|
const { title, fieldFormat } = this.internalProps.layoutMap.getHeader(col, row);
|
|
59755
59964
|
return typeof fieldFormat === 'function' ? fieldFormat(title) : title;
|
|
@@ -59989,6 +60198,7 @@
|
|
|
59989
60198
|
return result;
|
|
59990
60199
|
}
|
|
59991
60200
|
setRecords(records) {
|
|
60201
|
+
const oldHoverState = { col: this.stateManager.hover.cellPos.col, row: this.stateManager.hover.cellPos.row };
|
|
59992
60202
|
this.options.records = this.internalProps.records = records;
|
|
59993
60203
|
const options = this.options;
|
|
59994
60204
|
const internalProps = this.internalProps;
|
|
@@ -60014,6 +60224,7 @@
|
|
|
60014
60224
|
this.refreshHeader();
|
|
60015
60225
|
this.scenegraph.clearCells();
|
|
60016
60226
|
this.scenegraph.createSceneGraph();
|
|
60227
|
+
this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row);
|
|
60017
60228
|
if (this.internalProps.title && !this.internalProps.title.isReleased) {
|
|
60018
60229
|
this._updateSize();
|
|
60019
60230
|
this.internalProps.title.resize();
|
|
@@ -60097,6 +60308,9 @@
|
|
|
60097
60308
|
this.internalProps.title = new Title(options.title, this);
|
|
60098
60309
|
this.scenegraph.resize();
|
|
60099
60310
|
}
|
|
60311
|
+
setTimeout(() => {
|
|
60312
|
+
this.fireListeners(TABLE_EVENT_TYPE.INITIALIZED, null);
|
|
60313
|
+
}, 0);
|
|
60100
60314
|
}
|
|
60101
60315
|
static get EVENT_TYPE() {
|
|
60102
60316
|
return PIVOT_CHART_EVENT_TYPE;
|
|
@@ -60195,7 +60409,7 @@
|
|
|
60195
60409
|
for (let col = 0; col < internalProps.layoutMap.columnWidths.length; col++) {
|
|
60196
60410
|
const { width, minWidth, maxWidth } = internalProps.layoutMap.columnWidths?.[col] ?? {};
|
|
60197
60411
|
if (width && ((typeof width === 'string' && width !== 'auto') || (typeof width === 'number' && width > 0))) {
|
|
60198
|
-
this.
|
|
60412
|
+
this._setColWidth(col, width);
|
|
60199
60413
|
}
|
|
60200
60414
|
if (minWidth && ((typeof minWidth === 'number' && minWidth > 0) || typeof minWidth === 'string')) {
|
|
60201
60415
|
this.setMinColWidth(col, minWidth);
|
|
@@ -60218,7 +60432,7 @@
|
|
|
60218
60432
|
table.frozenRowCount = layoutMap.headerLevelCount;
|
|
60219
60433
|
table.bottomFrozenRowCount = layoutMap?.bottomFrozenRowCount ?? 0;
|
|
60220
60434
|
table.rightFrozenColCount = layoutMap?.rightFrozenColCount ?? 0;
|
|
60221
|
-
this.
|
|
60435
|
+
this.stateManager.setFrozenCol(this.internalProps.frozenColCount);
|
|
60222
60436
|
}
|
|
60223
60437
|
_getSortFuncFromHeaderOption(columns, field, fieldKey) {
|
|
60224
60438
|
return undefined;
|
|
@@ -60272,6 +60486,10 @@
|
|
|
60272
60486
|
return dataValue;
|
|
60273
60487
|
}
|
|
60274
60488
|
getCellValue(col, row) {
|
|
60489
|
+
const customMergeText = this.getCustomMergeValue(col, row);
|
|
60490
|
+
if (customMergeText) {
|
|
60491
|
+
return customMergeText;
|
|
60492
|
+
}
|
|
60275
60493
|
if (this.internalProps.layoutMap.isHeader(col, row)) {
|
|
60276
60494
|
const { title, fieldFormat } = this.internalProps.layoutMap.getHeader(col, row);
|
|
60277
60495
|
return typeof fieldFormat === 'function' ? fieldFormat(title) : title;
|
|
@@ -60744,16 +60962,10 @@
|
|
|
60744
60962
|
const viewBox = chartNode.getViewBox();
|
|
60745
60963
|
axes.forEach((axis, index) => {
|
|
60746
60964
|
if (axis.type === 'linear') {
|
|
60747
|
-
|
|
60748
|
-
chartAxis._domain = {
|
|
60749
|
-
min: axis.range?.min ?? 0,
|
|
60750
|
-
max: axis.range?.max ?? 0
|
|
60751
|
-
};
|
|
60965
|
+
chartInstance.updateModelSpecSync({ type: 'axes', index }, { min: axis.range?.min ?? 0, max: axis.range?.max ?? 0 }, true);
|
|
60752
60966
|
}
|
|
60753
60967
|
else if (axis.type === 'band') {
|
|
60754
|
-
|
|
60755
|
-
chartAxis._spec.domain = axis.domain.slice(0);
|
|
60756
|
-
chartAxis.updateScaleDomain();
|
|
60968
|
+
chartInstance.updateModelSpec({ type: 'axes', index }, { domain: axis.domain.slice(0) }, true);
|
|
60757
60969
|
}
|
|
60758
60970
|
});
|
|
60759
60971
|
chartInstance.updateViewBox({
|
|
@@ -60814,6 +61026,7 @@
|
|
|
60814
61026
|
return undefined;
|
|
60815
61027
|
}
|
|
60816
61028
|
setRecords(records) {
|
|
61029
|
+
const oldHoverState = { col: this.stateManager.hover.cellPos.col, row: this.stateManager.hover.cellPos.row };
|
|
60817
61030
|
this.options.records = this.internalProps.records = records;
|
|
60818
61031
|
this.options;
|
|
60819
61032
|
const internalProps = this.internalProps;
|
|
@@ -60822,6 +61035,7 @@
|
|
|
60822
61035
|
this.refreshHeader();
|
|
60823
61036
|
this.scenegraph.clearCells();
|
|
60824
61037
|
this.scenegraph.createSceneGraph();
|
|
61038
|
+
this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row);
|
|
60825
61039
|
if (this.internalProps.title && !this.internalProps.title.isReleased) {
|
|
60826
61040
|
this._updateSize();
|
|
60827
61041
|
this.internalProps.title.resize();
|
|
@@ -61336,7 +61550,7 @@
|
|
|
61336
61550
|
return new Tag$1(params ? params.attribute : {});
|
|
61337
61551
|
}
|
|
61338
61552
|
|
|
61339
|
-
const version = "0.15.
|
|
61553
|
+
const version = "0.15.1";
|
|
61340
61554
|
function getIcons() {
|
|
61341
61555
|
return get$2();
|
|
61342
61556
|
}
|