@visactor/vtable 0.18.0-alpha.0 → 0.18.0-alpha.2
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 +3 -0
- package/cjs/ListTable.js +74 -16
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.d.ts +2 -4
- package/cjs/PivotChart.js +42 -17
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable.d.ts +5 -0
- package/cjs/PivotTable.js +109 -14
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/body-helper/body-helper.js +2 -1
- package/cjs/body-helper/body-helper.js.map +1 -1
- package/cjs/components/axis/axis.js +4 -1
- package/cjs/components/axis/axis.js.map +1 -1
- package/cjs/components/axis/get-axis-attributes.d.ts +1 -0
- package/cjs/components/axis/get-axis-attributes.js +2 -1
- package/cjs/components/axis/get-axis-attributes.js.map +1 -1
- package/cjs/components/axis/label-overlap.js.map +1 -1
- package/cjs/components/axis/linear-scale.js +1 -0
- package/cjs/components/axis/linear-scale.js.map +1 -1
- package/cjs/components/tooltip/TooltipHandler.js +2 -5
- package/cjs/components/tooltip/TooltipHandler.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +24 -4
- package/cjs/core/BaseTable.js +83 -52
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/style.js +1 -2
- package/cjs/core/tableHelper.d.ts +3 -2
- package/cjs/core/tableHelper.js +20 -7
- package/cjs/core/tableHelper.js.map +1 -1
- package/cjs/dataset/dataset.js +8 -13
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/edit/edit-manager.d.ts +1 -1
- package/cjs/edit/edit-manager.js +9 -12
- package/cjs/edit/edit-manager.js.map +1 -1
- package/cjs/event/EventHandler.d.ts +1 -0
- package/cjs/event/EventHandler.js +1 -1
- package/cjs/event/EventHandler.js.map +1 -1
- package/cjs/event/event.d.ts +12 -1
- package/cjs/event/event.js +8 -3
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/container-dom.js +51 -8
- package/cjs/event/listener/container-dom.js.map +1 -1
- package/cjs/event/listener/scroll-bar.js +24 -8
- package/cjs/event/listener/scroll-bar.js.map +1 -1
- package/cjs/event/listener/table-group.js +50 -42
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/event/listener/touch.js.map +1 -1
- package/cjs/event/media-click.js +5 -2
- package/cjs/event/media-click.js.map +1 -1
- package/cjs/event/pivot-chart/axis-click.js.map +1 -1
- package/cjs/event/scroll.js +1 -0
- package/cjs/event/util.d.ts +1 -1
- package/cjs/event/util.js.map +1 -1
- package/cjs/index.d.ts +5 -2
- package/cjs/index.js +29 -2
- package/cjs/index.js.map +1 -1
- package/cjs/layout/chart-helper/get-chart-spec.d.ts +1 -0
- package/cjs/layout/chart-helper/get-chart-spec.js +13 -2
- package/cjs/layout/chart-helper/get-chart-spec.js.map +1 -1
- package/cjs/layout/pivot-header-layout.d.ts +5 -4
- package/cjs/layout/pivot-header-layout.js +20 -16
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/pivot-layout-helper.d.ts +1 -0
- package/cjs/layout/pivot-layout-helper.js +16 -6
- package/cjs/layout/pivot-layout-helper.js.map +1 -1
- package/cjs/layout/simple-header-layout.d.ts +6 -4
- package/cjs/layout/simple-header-layout.js +44 -13
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/cjs/render/jsx/index.d.ts +2 -3
- package/cjs/render/jsx/index.js +1 -1
- package/cjs/render/jsx/index.js.map +1 -1
- package/cjs/render/layout/arc.d.ts +2 -2
- package/cjs/render/layout/arc.js +1 -1
- package/cjs/render/layout/arc.js.map +1 -1
- package/cjs/render/layout/circle.d.ts +2 -2
- package/cjs/render/layout/circle.js +1 -1
- package/cjs/render/layout/circle.js.map +1 -1
- package/cjs/render/layout/container.d.ts +2 -2
- package/cjs/render/layout/container.js +1 -1
- package/cjs/render/layout/container.js.map +1 -1
- package/cjs/render/layout/group.d.ts +2 -2
- package/cjs/render/layout/group.js +1 -1
- package/cjs/render/layout/group.js.map +1 -1
- package/cjs/render/layout/icon.d.ts +2 -2
- package/cjs/render/layout/icon.js +1 -1
- package/cjs/render/layout/icon.js.map +1 -1
- package/cjs/render/layout/image.d.ts +2 -2
- package/cjs/render/layout/image.js +1 -1
- package/cjs/render/layout/image.js.map +1 -1
- package/cjs/render/layout/rect.d.ts +2 -2
- package/cjs/render/layout/rect.js +1 -1
- package/cjs/render/layout/rect.js.map +1 -1
- package/cjs/render/layout/text.d.ts +3 -3
- package/cjs/render/layout/text.js +2 -2
- package/cjs/render/layout/text.js.map +1 -1
- package/cjs/scenegraph/component/cell-content.d.ts +4 -4
- package/cjs/scenegraph/component/cell-content.js +7 -6
- package/cjs/scenegraph/component/cell-content.js.map +1 -1
- package/cjs/scenegraph/component/cell-mover.d.ts +1 -1
- package/cjs/scenegraph/component/cell-mover.js +1 -1
- package/cjs/scenegraph/component/cell-mover.js.map +1 -1
- package/cjs/scenegraph/component/custom.d.ts +1 -1
- package/cjs/scenegraph/component/custom.js +34 -17
- package/cjs/scenegraph/component/custom.js.map +1 -1
- package/cjs/scenegraph/component/drill-icon.js.map +1 -1
- package/cjs/scenegraph/component/menu.d.ts +1 -1
- package/cjs/scenegraph/component/menu.js +1 -1
- package/cjs/scenegraph/component/menu.js.map +1 -1
- package/cjs/scenegraph/component/table-component.d.ts +1 -1
- package/cjs/scenegraph/component/table-component.js +13 -12
- package/cjs/scenegraph/component/table-component.js.map +1 -1
- package/cjs/scenegraph/debug-tool/debug-tool.d.ts +1 -1
- package/cjs/scenegraph/debug-tool/debug-tool.js +1 -1
- package/cjs/scenegraph/debug-tool/debug-tool.js.map +1 -1
- package/cjs/scenegraph/debug-tool/index.d.ts +1 -1
- package/cjs/scenegraph/debug-tool/index.js.map +1 -1
- package/cjs/scenegraph/graphic/chart.d.ts +2 -2
- package/cjs/scenegraph/graphic/chart.js +12 -5
- package/cjs/scenegraph/graphic/chart.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render-helper.js +5 -5
- package/cjs/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render.d.ts +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render.js +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.d.ts +18 -3
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +62 -6
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/image-contribution-render.d.ts +2 -2
- package/cjs/scenegraph/graphic/contributions/image-contribution-render.js +1 -1
- package/cjs/scenegraph/graphic/contributions/image-contribution-render.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/index.d.ts +1 -1
- package/cjs/scenegraph/graphic/contributions/index.js +6 -2
- package/cjs/scenegraph/graphic/contributions/index.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/rect-contribution-render.d.ts +2 -2
- package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js +2 -2
- package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
- package/cjs/scenegraph/graphic/group.d.ts +4 -2
- package/cjs/scenegraph/graphic/group.js +4 -2
- package/cjs/scenegraph/graphic/group.js.map +1 -1
- package/cjs/scenegraph/graphic/icon.d.ts +2 -2
- package/cjs/scenegraph/graphic/icon.js +1 -1
- package/cjs/scenegraph/graphic/icon.js.map +1 -1
- package/cjs/scenegraph/graphic/text.d.ts +2 -2
- package/cjs/scenegraph/graphic/text.js +2 -2
- package/cjs/scenegraph/graphic/text.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.d.ts +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +16 -11
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.d.ts +1 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +2 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.d.ts +1 -1
- package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js +5 -3
- package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/image-cell.d.ts +1 -1
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js +44 -19
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/progress-bar-cell.js +1 -1
- package/cjs/scenegraph/group-creater/cell-type/progress-bar-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.d.ts +1 -1
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js +3 -2
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/text-cell.d.ts +1 -1
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js +3 -2
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/video-cell.d.ts +1 -1
- package/cjs/scenegraph/group-creater/cell-type/video-cell.js +3 -2
- package/cjs/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/column-helper.d.ts +5 -2
- package/cjs/scenegraph/group-creater/column-helper.js +8 -3
- package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/init-scenegraph.js +11 -11
- package/cjs/scenegraph/group-creater/init-scenegraph.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +4 -3
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.js +7 -6
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +2 -2
- 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 +4 -3
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/cjs/scenegraph/icon/icon-update.d.ts +2 -0
- package/cjs/scenegraph/icon/icon-update.js +19 -4
- package/cjs/scenegraph/icon/icon-update.js.map +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js +12 -9
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js +24 -14
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
- package/cjs/scenegraph/layout/frozen.js +3 -1
- package/cjs/scenegraph/layout/frozen.js.map +1 -1
- package/cjs/scenegraph/layout/move-cell.js.map +1 -1
- package/cjs/scenegraph/layout/update-col.js +6 -5
- package/cjs/scenegraph/layout/update-col.js.map +1 -1
- package/cjs/scenegraph/layout/update-height.d.ts +1 -1
- package/cjs/scenegraph/layout/update-height.js +7 -5
- package/cjs/scenegraph/layout/update-height.js.map +1 -1
- package/cjs/scenegraph/layout/update-row.js +50 -14
- package/cjs/scenegraph/layout/update-row.js.map +1 -1
- package/cjs/scenegraph/layout/update-width.d.ts +1 -1
- package/cjs/scenegraph/layout/update-width.js +12 -11
- package/cjs/scenegraph/layout/update-width.js.map +1 -1
- package/cjs/scenegraph/refresh-node/update-chart.js +11 -1
- package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +7 -3
- package/cjs/scenegraph/scenegraph.js +54 -60
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/select/create-select-border.js +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/update-select-border.js +34 -17
- package/cjs/scenegraph/select/update-select-border.js.map +1 -1
- package/cjs/scenegraph/stick-text/index.js +9 -4
- 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.d.ts +3 -1
- package/cjs/scenegraph/style/frame-border.js +21 -3
- package/cjs/scenegraph/style/frame-border.js.map +1 -1
- package/cjs/scenegraph/utils/get-cell-merge.js +1 -1
- package/cjs/scenegraph/utils/get-cell-merge.js.map +1 -1
- package/cjs/scenegraph/utils/padding.js +1 -1
- package/cjs/scenegraph/utils/padding.js.map +1 -1
- package/cjs/scenegraph/utils/render-service.d.ts +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.d.ts +1 -1
- package/cjs/scenegraph/utils/text-icon-layout.js +13 -10
- package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/cjs/scenegraph/utils/text-measure.d.ts +2 -2
- package/cjs/scenegraph/utils/text-measure.js +1 -1
- package/cjs/scenegraph/utils/text-measure.js.map +1 -1
- package/cjs/scenegraph/utils/text-pos.d.ts +1 -1
- package/cjs/scenegraph/utils/text-pos.js.map +1 -1
- package/cjs/state/cell-move/adjust-header.js.map +1 -1
- package/cjs/state/cell-move/index.js +2 -1
- package/cjs/state/cell-move/index.js.map +1 -1
- package/cjs/state/select/update-position.js +60 -65
- package/cjs/state/select/update-position.js.map +1 -1
- package/cjs/state/spark-line/index.js +10 -6
- package/cjs/state/spark-line/index.js.map +1 -1
- package/cjs/state/state.d.ts +1 -1
- package/cjs/state/state.js +12 -16
- package/cjs/state/state.js.map +1 -1
- package/cjs/themes/ARCO.js +7 -2
- package/cjs/themes/ARCO.js.map +1 -1
- package/cjs/themes/BRIGHT.js +8 -1
- package/cjs/themes/BRIGHT.js.map +1 -1
- package/cjs/themes/DARK.js +7 -1
- package/cjs/themes/DARK.js.map +1 -1
- package/cjs/themes/DEFAULT.js +6 -0
- package/cjs/themes/DEFAULT.js.map +1 -1
- package/cjs/themes/SIMPLIFY.js +6 -0
- package/cjs/themes/SIMPLIFY.js.map +1 -1
- package/cjs/themes/component.d.ts +27 -0
- package/cjs/themes/component.js +29 -2
- package/cjs/themes/component.js.map +1 -1
- package/cjs/themes/theme.d.ts +2 -0
- package/cjs/themes/theme.js +29 -1
- package/cjs/themes/theme.js.map +1 -1
- package/cjs/tools/NumberMap.d.ts +4 -0
- package/cjs/tools/NumberMap.js +17 -1
- package/cjs/tools/NumberMap.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +10 -3
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/common.d.ts +1 -0
- package/cjs/ts-types/common.js.map +1 -1
- package/cjs/ts-types/component/title.d.ts +1 -1
- package/cjs/ts-types/component/title.js.map +1 -1
- package/cjs/ts-types/customElement.d.ts +1 -1
- package/cjs/ts-types/customElement.js.map +1 -1
- package/cjs/ts-types/customLayout.d.ts +1 -1
- package/cjs/ts-types/customLayout.js.map +1 -1
- package/cjs/ts-types/events.d.ts +3 -4
- package/cjs/ts-types/events.js.map +1 -1
- package/cjs/ts-types/list-table/define/basic-define.d.ts +5 -1
- package/cjs/ts-types/list-table/define/basic-define.js.map +1 -1
- package/cjs/ts-types/list-table/define/image-define.d.ts +2 -0
- package/cjs/ts-types/list-table/define/image-define.js.map +1 -1
- package/cjs/ts-types/list-table/define/multilinetext-define.d.ts +0 -1
- package/cjs/ts-types/list-table/define/multilinetext-define.js.map +1 -1
- package/cjs/ts-types/pivot-table/dimension/image-dimension.d.ts +1 -0
- package/cjs/ts-types/pivot-table/dimension/image-dimension.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/image-indicator.d.ts +2 -0
- package/cjs/ts-types/pivot-table/indicator/image-indicator.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +17 -0
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/ts-types/theme.d.ts +7 -0
- package/cjs/ts-types/theme.js.map +1 -1
- package/cjs/vrender.d.ts +4 -0
- package/cjs/vrender.js +40 -0
- package/cjs/vrender.js.map +1 -0
- package/dist/vtable.js +28869 -46496
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.d.ts +3 -0
- package/es/ListTable.js +73 -16
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.d.ts +2 -4
- package/es/PivotChart.js +42 -17
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable.d.ts +5 -0
- package/es/PivotTable.js +109 -14
- package/es/PivotTable.js.map +1 -1
- package/es/body-helper/body-helper.js +2 -1
- package/es/body-helper/body-helper.js.map +1 -1
- package/es/components/axis/axis.js +4 -1
- package/es/components/axis/axis.js.map +1 -1
- package/es/components/axis/get-axis-attributes.d.ts +1 -0
- package/es/components/axis/get-axis-attributes.js +2 -1
- package/es/components/axis/get-axis-attributes.js.map +1 -1
- package/es/components/axis/label-overlap.js.map +1 -1
- package/es/components/axis/linear-scale.js +1 -0
- package/es/components/axis/linear-scale.js.map +1 -1
- package/es/components/tooltip/TooltipHandler.js +2 -5
- package/es/components/tooltip/TooltipHandler.js.map +1 -1
- package/es/core/BaseTable.d.ts +24 -4
- package/es/core/BaseTable.js +87 -55
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/style.js +1 -2
- package/es/core/tableHelper.d.ts +3 -2
- package/es/core/tableHelper.js +19 -6
- package/es/core/tableHelper.js.map +1 -1
- package/es/dataset/dataset.js +8 -13
- package/es/dataset/dataset.js.map +1 -1
- package/es/edit/edit-manager.d.ts +1 -1
- package/es/edit/edit-manager.js +9 -12
- package/es/edit/edit-manager.js.map +1 -1
- package/es/event/EventHandler.d.ts +1 -0
- package/es/event/EventHandler.js +1 -1
- package/es/event/EventHandler.js.map +1 -1
- package/es/event/event.d.ts +12 -1
- package/es/event/event.js +8 -3
- package/es/event/event.js.map +1 -1
- package/es/event/listener/container-dom.js +51 -8
- package/es/event/listener/container-dom.js.map +1 -1
- package/es/event/listener/scroll-bar.js +24 -8
- package/es/event/listener/scroll-bar.js.map +1 -1
- package/es/event/listener/table-group.js +50 -42
- package/es/event/listener/table-group.js.map +1 -1
- package/es/event/listener/touch.js.map +1 -1
- package/es/event/media-click.js +5 -2
- package/es/event/media-click.js.map +1 -1
- package/es/event/pivot-chart/axis-click.js.map +1 -1
- package/es/event/scroll.js +2 -1
- package/es/event/util.d.ts +1 -1
- package/es/event/util.js.map +1 -1
- package/es/index.d.ts +5 -2
- package/es/index.js +10 -2
- package/es/index.js.map +1 -1
- package/es/layout/chart-helper/get-chart-spec.d.ts +1 -0
- package/es/layout/chart-helper/get-chart-spec.js +11 -0
- package/es/layout/chart-helper/get-chart-spec.js.map +1 -1
- package/es/layout/pivot-header-layout.d.ts +5 -4
- package/es/layout/pivot-header-layout.js +20 -16
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/pivot-layout-helper.d.ts +1 -0
- package/es/layout/pivot-layout-helper.js +16 -6
- package/es/layout/pivot-layout-helper.js.map +1 -1
- package/es/layout/simple-header-layout.d.ts +6 -4
- package/es/layout/simple-header-layout.js +45 -14
- package/es/layout/simple-header-layout.js.map +1 -1
- package/es/render/jsx/index.d.ts +2 -3
- package/es/render/jsx/index.js +1 -1
- package/es/render/jsx/index.js.map +1 -1
- package/es/render/layout/arc.d.ts +2 -2
- package/es/render/layout/arc.js +1 -1
- package/es/render/layout/arc.js.map +1 -1
- package/es/render/layout/circle.d.ts +2 -2
- package/es/render/layout/circle.js +1 -1
- package/es/render/layout/circle.js.map +1 -1
- package/es/render/layout/container.d.ts +2 -2
- package/es/render/layout/container.js +1 -1
- package/es/render/layout/container.js.map +1 -1
- package/es/render/layout/group.d.ts +2 -2
- package/es/render/layout/group.js +1 -1
- package/es/render/layout/group.js.map +1 -1
- package/es/render/layout/icon.d.ts +2 -2
- package/es/render/layout/icon.js +1 -1
- package/es/render/layout/icon.js.map +1 -1
- package/es/render/layout/image.d.ts +2 -2
- package/es/render/layout/image.js +1 -1
- package/es/render/layout/image.js.map +1 -1
- package/es/render/layout/rect.d.ts +2 -2
- package/es/render/layout/rect.js +1 -1
- package/es/render/layout/rect.js.map +1 -1
- package/es/render/layout/text.d.ts +3 -3
- package/es/render/layout/text.js +2 -2
- package/es/render/layout/text.js.map +1 -1
- package/es/scenegraph/component/cell-content.d.ts +4 -4
- package/es/scenegraph/component/cell-content.js +7 -8
- package/es/scenegraph/component/cell-content.js.map +1 -1
- package/es/scenegraph/component/cell-mover.d.ts +1 -1
- package/es/scenegraph/component/cell-mover.js +1 -1
- package/es/scenegraph/component/cell-mover.js.map +1 -1
- package/es/scenegraph/component/custom.d.ts +1 -1
- package/es/scenegraph/component/custom.js +35 -20
- package/es/scenegraph/component/custom.js.map +1 -1
- package/es/scenegraph/component/drill-icon.js.map +1 -1
- package/es/scenegraph/component/menu.d.ts +1 -1
- package/es/scenegraph/component/menu.js +1 -1
- package/es/scenegraph/component/menu.js.map +1 -1
- package/es/scenegraph/component/table-component.d.ts +1 -1
- package/es/scenegraph/component/table-component.js +13 -12
- package/es/scenegraph/component/table-component.js.map +1 -1
- package/es/scenegraph/debug-tool/debug-tool.d.ts +1 -1
- package/es/scenegraph/debug-tool/debug-tool.js +1 -1
- package/es/scenegraph/debug-tool/debug-tool.js.map +1 -1
- package/es/scenegraph/debug-tool/index.d.ts +1 -1
- package/es/scenegraph/debug-tool/index.js.map +1 -1
- package/es/scenegraph/graphic/chart.d.ts +2 -2
- package/es/scenegraph/graphic/chart.js +12 -5
- package/es/scenegraph/graphic/chart.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render-helper.js +5 -5
- package/es/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render.d.ts +1 -1
- package/es/scenegraph/graphic/contributions/chart-render.js +1 -1
- package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/es/scenegraph/graphic/contributions/group-contribution-render.d.ts +18 -3
- package/es/scenegraph/graphic/contributions/group-contribution-render.js +58 -3
- package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/es/scenegraph/graphic/contributions/image-contribution-render.d.ts +2 -2
- package/es/scenegraph/graphic/contributions/image-contribution-render.js +1 -1
- package/es/scenegraph/graphic/contributions/image-contribution-render.js.map +1 -1
- package/es/scenegraph/graphic/contributions/index.d.ts +1 -1
- package/es/scenegraph/graphic/contributions/index.js +5 -3
- package/es/scenegraph/graphic/contributions/index.js.map +1 -1
- package/es/scenegraph/graphic/contributions/rect-contribution-render.d.ts +2 -2
- package/es/scenegraph/graphic/contributions/rect-contribution-render.js +2 -2
- package/es/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
- package/es/scenegraph/graphic/group.d.ts +4 -2
- package/es/scenegraph/graphic/group.js +4 -2
- package/es/scenegraph/graphic/group.js.map +1 -1
- package/es/scenegraph/graphic/icon.d.ts +2 -2
- package/es/scenegraph/graphic/icon.js +1 -1
- package/es/scenegraph/graphic/icon.js.map +1 -1
- package/es/scenegraph/graphic/text.d.ts +2 -2
- package/es/scenegraph/graphic/text.js +1 -1
- package/es/scenegraph/graphic/text.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.d.ts +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +13 -10
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.d.ts +1 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.js +2 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/checkbox-cell.d.ts +1 -1
- package/es/scenegraph/group-creater/cell-type/checkbox-cell.js +5 -3
- package/es/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/image-cell.d.ts +1 -1
- package/es/scenegraph/group-creater/cell-type/image-cell.js +39 -17
- package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/progress-bar-cell.js +1 -1
- package/es/scenegraph/group-creater/cell-type/progress-bar-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.d.ts +1 -1
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.js +3 -2
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/text-cell.d.ts +1 -1
- package/es/scenegraph/group-creater/cell-type/text-cell.js +3 -2
- package/es/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/video-cell.d.ts +1 -1
- package/es/scenegraph/group-creater/cell-type/video-cell.js +3 -2
- package/es/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
- package/es/scenegraph/group-creater/column-helper.d.ts +5 -2
- package/es/scenegraph/group-creater/column-helper.js +10 -5
- package/es/scenegraph/group-creater/column-helper.js.map +1 -1
- package/es/scenegraph/group-creater/init-scenegraph.js +11 -11
- package/es/scenegraph/group-creater/init-scenegraph.js.map +1 -1
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +3 -2
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
- package/es/scenegraph/group-creater/progress/proxy.js +6 -6
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +2 -2
- 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 +5 -4
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/es/scenegraph/icon/icon-update.d.ts +2 -0
- package/es/scenegraph/icon/icon-update.js +16 -2
- package/es/scenegraph/icon/icon-update.js.map +1 -1
- package/es/scenegraph/layout/compute-col-width.js +12 -9
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.js +25 -17
- package/es/scenegraph/layout/compute-row-height.js.map +1 -1
- package/es/scenegraph/layout/frozen.js +3 -1
- package/es/scenegraph/layout/frozen.js.map +1 -1
- package/es/scenegraph/layout/move-cell.js.map +1 -1
- package/es/scenegraph/layout/update-col.js +6 -5
- package/es/scenegraph/layout/update-col.js.map +1 -1
- package/es/scenegraph/layout/update-height.d.ts +1 -1
- package/es/scenegraph/layout/update-height.js +7 -5
- package/es/scenegraph/layout/update-height.js.map +1 -1
- package/es/scenegraph/layout/update-row.js +50 -14
- package/es/scenegraph/layout/update-row.js.map +1 -1
- package/es/scenegraph/layout/update-width.d.ts +1 -1
- package/es/scenegraph/layout/update-width.js +12 -11
- package/es/scenegraph/layout/update-width.js.map +1 -1
- package/es/scenegraph/refresh-node/update-chart.js +11 -1
- package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +7 -3
- package/es/scenegraph/scenegraph.js +54 -58
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/select/create-select-border.js +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/update-select-border.js +34 -17
- package/es/scenegraph/select/update-select-border.js.map +1 -1
- package/es/scenegraph/stick-text/index.js +9 -4
- 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.d.ts +3 -1
- package/es/scenegraph/style/frame-border.js +18 -1
- package/es/scenegraph/style/frame-border.js.map +1 -1
- package/es/scenegraph/utils/get-cell-merge.js +1 -1
- package/es/scenegraph/utils/get-cell-merge.js.map +1 -1
- package/es/scenegraph/utils/padding.js +1 -1
- package/es/scenegraph/utils/padding.js.map +1 -1
- package/es/scenegraph/utils/render-service.d.ts +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.d.ts +1 -1
- package/es/scenegraph/utils/text-icon-layout.js +13 -12
- package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/es/scenegraph/utils/text-measure.d.ts +2 -2
- package/es/scenegraph/utils/text-measure.js +1 -1
- package/es/scenegraph/utils/text-measure.js.map +1 -1
- package/es/scenegraph/utils/text-pos.d.ts +1 -1
- package/es/scenegraph/utils/text-pos.js.map +1 -1
- package/es/state/cell-move/adjust-header.js.map +1 -1
- package/es/state/cell-move/index.js +2 -1
- package/es/state/cell-move/index.js.map +1 -1
- package/es/state/select/update-position.js +60 -65
- package/es/state/select/update-position.js.map +1 -1
- package/es/state/spark-line/index.js +10 -6
- package/es/state/spark-line/index.js.map +1 -1
- package/es/state/state.d.ts +1 -1
- package/es/state/state.js +14 -17
- package/es/state/state.js.map +1 -1
- package/es/themes/ARCO.js +7 -2
- package/es/themes/ARCO.js.map +1 -1
- package/es/themes/BRIGHT.js +8 -1
- package/es/themes/BRIGHT.js.map +1 -1
- package/es/themes/DARK.js +7 -1
- package/es/themes/DARK.js.map +1 -1
- package/es/themes/DEFAULT.js +6 -0
- package/es/themes/DEFAULT.js.map +1 -1
- package/es/themes/SIMPLIFY.js +6 -0
- package/es/themes/SIMPLIFY.js.map +1 -1
- package/es/themes/component.d.ts +27 -0
- package/es/themes/component.js +28 -0
- package/es/themes/component.js.map +1 -1
- package/es/themes/theme.d.ts +2 -0
- package/es/themes/theme.js +29 -2
- package/es/themes/theme.js.map +1 -1
- package/es/tools/NumberMap.d.ts +4 -0
- package/es/tools/NumberMap.js +17 -1
- package/es/tools/NumberMap.js.map +1 -1
- package/es/ts-types/base-table.d.ts +10 -3
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/common.d.ts +1 -0
- package/es/ts-types/common.js.map +1 -1
- package/es/ts-types/component/title.d.ts +1 -1
- package/es/ts-types/component/title.js.map +1 -1
- package/es/ts-types/customElement.d.ts +1 -1
- package/es/ts-types/customElement.js.map +1 -1
- package/es/ts-types/customLayout.d.ts +1 -1
- package/es/ts-types/customLayout.js.map +1 -1
- package/es/ts-types/events.d.ts +3 -4
- package/es/ts-types/events.js.map +1 -1
- package/es/ts-types/list-table/define/basic-define.d.ts +5 -1
- package/es/ts-types/list-table/define/basic-define.js.map +1 -1
- package/es/ts-types/list-table/define/image-define.d.ts +2 -0
- package/es/ts-types/list-table/define/image-define.js.map +1 -1
- package/es/ts-types/list-table/define/multilinetext-define.d.ts +0 -1
- package/es/ts-types/list-table/define/multilinetext-define.js.map +1 -1
- package/es/ts-types/pivot-table/dimension/image-dimension.d.ts +1 -0
- package/es/ts-types/pivot-table/dimension/image-dimension.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/image-indicator.d.ts +2 -0
- package/es/ts-types/pivot-table/indicator/image-indicator.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +17 -0
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/ts-types/theme.d.ts +7 -0
- package/es/ts-types/theme.js.map +1 -1
- package/es/vrender.d.ts +4 -0
- package/es/vrender.js +22 -0
- package/es/vrender.js.map +1 -0
- package/package.json +13 -12
|
@@ -7,9 +7,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
const ts_types_1 = require("../../ts-types");
|
|
8
8
|
|
|
9
9
|
function updateSelectPosition(state, col, row, isShift, isCtrl, isSelectAll) {
|
|
10
|
+
var _a;
|
|
10
11
|
const {table: table, interactionState: interactionState} = state, {scenegraph: scenegraph} = table, {highlightScope: highlightScope, disableHeader: disableHeader, cellPos: cellPos} = state.select;
|
|
11
12
|
if ((disableHeader && table.isHeader(col, row) || "none" === highlightScope) && (col = -1,
|
|
12
|
-
row = -1), -1 !== col && -1 !== row && state.select.ranges.length > 0)
|
|
13
|
+
row = -1), -1 !== col && -1 !== row) if (interactionState === ts_types_1.InteractionState.grabing && state.select.ranges.length > 0) {
|
|
13
14
|
const currentRange = state.select.ranges[state.select.ranges.length - 1];
|
|
14
15
|
col > currentRange.start.col && col > currentRange.end.col && table._makeVisibleCell(col + 1, row),
|
|
15
16
|
row > currentRange.start.row && row > currentRange.end.row && table._makeVisibleCell(col, row + 1),
|
|
@@ -29,80 +30,74 @@ function updateSelectPosition(state, col, row, isShift, isCtrl, isSelectAll) {
|
|
|
29
30
|
});
|
|
30
31
|
const currentRange = state.select.ranges[state.select.ranges.length - 1];
|
|
31
32
|
scenegraph.updateCellSelectBorder(currentRange.start.col, currentRange.start.row, currentRange.end.col, currentRange.end.row);
|
|
32
|
-
} else if (-1 === cellPos.col || -1 === cellPos.row || -1 !== col && -1 !== row) {
|
|
33
|
-
if (interactionState === ts_types_1.InteractionState.
|
|
33
|
+
} else if (-1 === cellPos.col || -1 === cellPos.row || -1 !== col && -1 !== row) if (interactionState !== ts_types_1.InteractionState.default || table.stateManager.isResizeCol()) {
|
|
34
|
+
if (interactionState === ts_types_1.InteractionState.grabing && !table.stateManager.isResizeCol()) {
|
|
35
|
+
-1 === cellPos.col && (cellPos.col = col), -1 === cellPos.row && (cellPos.row = row);
|
|
34
36
|
const currentRange = state.select.ranges[state.select.ranges.length - 1];
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
col: endCol,
|
|
52
|
-
row: endRow
|
|
53
|
-
};
|
|
54
|
-
} else currentRange.end = {
|
|
55
|
-
col: col,
|
|
56
|
-
row: row
|
|
37
|
+
currentRange && (currentRange.end = {
|
|
38
|
+
col: col,
|
|
39
|
+
row: row
|
|
40
|
+
}), cellPos.col = col, cellPos.row = row, currentRange && scenegraph.updateCellSelectBorder(currentRange.start.col, currentRange.start.row, col, row);
|
|
41
|
+
}
|
|
42
|
+
} else {
|
|
43
|
+
const currentRange = state.select.ranges[state.select.ranges.length - 1];
|
|
44
|
+
if (isShift && currentRange) {
|
|
45
|
+
if ("cell" !== state.select.headerSelectMode && table.isColumnHeader(col, row)) {
|
|
46
|
+
const startCol = Math.min(currentRange.start.col, currentRange.end.col, col), endCol = Math.max(currentRange.start.col, currentRange.end.col, col), startRow = Math.min(currentRange.start.row, currentRange.end.row, row), endRow = table.rowCount - 1;
|
|
47
|
+
currentRange.start = {
|
|
48
|
+
col: startCol,
|
|
49
|
+
row: startRow
|
|
50
|
+
}, currentRange.end = {
|
|
51
|
+
col: endCol,
|
|
52
|
+
row: endRow
|
|
57
53
|
};
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
col: col,
|
|
78
|
-
row: cellRange.start.row
|
|
79
|
-
},
|
|
80
|
-
end: {
|
|
81
|
-
col: table.colCount - 1,
|
|
82
|
-
row: cellRange.end.row
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
} else state.select.ranges.push({
|
|
54
|
+
} else if ("cell" !== state.select.headerSelectMode && table.isRowHeader(col, row)) {
|
|
55
|
+
const startCol = Math.min(currentRange.start.col, currentRange.end.col, col), endCol = table.colCount - 1, startRow = Math.min(currentRange.start.row, currentRange.end.row, row), endRow = Math.max(currentRange.start.row, currentRange.end.row, row);
|
|
56
|
+
currentRange.start = {
|
|
57
|
+
col: startCol,
|
|
58
|
+
row: startRow
|
|
59
|
+
}, currentRange.end = {
|
|
60
|
+
col: endCol,
|
|
61
|
+
row: endRow
|
|
62
|
+
};
|
|
63
|
+
} else currentRange.end = {
|
|
64
|
+
col: col,
|
|
65
|
+
row: row
|
|
66
|
+
};
|
|
67
|
+
scenegraph.deleteLastSelectedRangeComponents(), scenegraph.updateCellSelectBorder(currentRange.start.col, currentRange.start.row, currentRange.end.col, currentRange.end.row);
|
|
68
|
+
} else {
|
|
69
|
+
if (-1 === cellPos.col || -1 === cellPos.row || isCtrl || (state.select.ranges = [],
|
|
70
|
+
scenegraph.deleteAllSelectBorder()), "cell" !== state.select.headerSelectMode && table.isColumnHeader(col, row)) {
|
|
71
|
+
const cellRange = table.getCellRange(col, row);
|
|
72
|
+
state.select.ranges.push({
|
|
86
73
|
start: {
|
|
87
|
-
col: col,
|
|
74
|
+
col: cellRange.start.col,
|
|
88
75
|
row: row
|
|
89
76
|
},
|
|
90
77
|
end: {
|
|
78
|
+
col: cellRange.end.col,
|
|
79
|
+
row: table.rowCount - 1
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
} else if ("cell" !== state.select.headerSelectMode && table.isRowHeader(col, row)) {
|
|
83
|
+
const cellRange = table.getCellRange(col, row);
|
|
84
|
+
state.select.ranges.push({
|
|
85
|
+
start: {
|
|
91
86
|
col: col,
|
|
92
|
-
row: row
|
|
87
|
+
row: cellRange.start.row
|
|
88
|
+
},
|
|
89
|
+
end: {
|
|
90
|
+
col: table.colCount - 1,
|
|
91
|
+
row: cellRange.end.row
|
|
93
92
|
}
|
|
94
93
|
});
|
|
95
|
-
|
|
96
|
-
const
|
|
97
|
-
|
|
94
|
+
} else if (col >= 0 && row >= 0) {
|
|
95
|
+
const cellRange = table.getCellRange(col, row);
|
|
96
|
+
state.select.ranges.push(cellRange);
|
|
98
97
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
currentRange.end = {
|
|
103
|
-
col: col,
|
|
104
|
-
row: row
|
|
105
|
-
}, cellPos.col = col, cellPos.row = row, scenegraph.updateCellSelectBorder(currentRange.start.col, currentRange.start.row, col, row);
|
|
98
|
+
cellPos.col = col, cellPos.row = row;
|
|
99
|
+
const currentRange = null === (_a = state.select.ranges) || void 0 === _a ? void 0 : _a[state.select.ranges.length - 1];
|
|
100
|
+
currentRange && scenegraph.updateCellSelectBorder(currentRange.start.col, currentRange.start.row, currentRange.end.col, currentRange.end.row);
|
|
106
101
|
}
|
|
107
102
|
} else cellPos.col = -1, cellPos.row = -1, state.select.ranges = [], scenegraph.deleteAllSelectBorder();
|
|
108
103
|
scenegraph.updateNextFrame();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/state/select/update-position.ts"],"names":[],"mappings":";;;AACA,6CAAkD;AASlD,SAAgB,oBAAoB,CAClC,KAAmB,EACnB,GAAW,EACX,GAAW,EACX,OAAgB,EAChB,MAAe,EACf,WAAoB;IAEpB,MAAM,EAAE,KAAK,EAAE,gBAAgB,EAAE,GAAG,KAAK,CAAC;IAC1C,MAAM,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IAC7B,MAAM,EAAE,cAAc,EAAE,aAAa,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC;IAChE,IAAI,CAAC,aAAa,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,IAAI,cAAc,KAAK,MAAM,EAAE;QAC5E,GAAG,GAAG,CAAC,CAAC,CAAC;QACT,GAAG,GAAG,CAAC,CAAC,CAAC;KACV;IAMD,IAAI,GAAG,KAAK,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;QAC9D,IAAI,gBAAgB,KAAK,2BAAgB,CAAC,OAAO,EAAE;YACjD,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;YACzE,IAAI,GAAG,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG,IAAI,GAAG,GAAG,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE;gBAE9D,KAAK,CAAC,gBAAgB,CAAC,GAAG,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;aACtC;YACD,IAAI,GAAG,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG,IAAI,GAA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AC,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;KAC7F;IACD,UAAU,CAAC,eAAe,EAAE,CAAC;AAC/B,CAAC;AAjKD,oDAiKC;AACD,SAAgB,SAAS,CAAC,UAAsB;IAC9C,UAAU,CAAC,qDAAqD,EAAE,CAAC;AACrE,CAAC;AAFD,8BAEC","file":"update-position.js","sourcesContent":["import type { Scenegraph } from '../../scenegraph/scenegraph';\nimport { InteractionState } from '../../ts-types';\nimport type { StateManager } from '../state';\n/**\n * @description: 更新select位置\n * @param {StateManager} state\n * @param {number} col\n * @param {number} row\n * @return {*}\n */\nexport function updateSelectPosition(\n state: StateManager,\n col: number,\n row: number,\n isShift: boolean,\n isCtrl: boolean,\n isSelectAll: boolean\n) {\n const { table, interactionState } = state;\n const { scenegraph } = table;\n const { highlightScope, disableHeader, cellPos } = state.select;\n if ((disableHeader && table.isHeader(col, row)) || highlightScope === 'none') {\n col = -1;\n row = -1;\n }\n // 如果这里不继续进行 会造成问题drag select first cell seleted repeatly https://github.com/VisActor/VTable/issues/611\n // if (cellPos.col === col && cellPos.row === row) {\n // return;\n // }\n /** 完整显示选中单元格 自动滚动效果*/\n if (col !== -1 && row !== -1 && state.select.ranges.length > 0) {\n if (interactionState === InteractionState.grabing) {\n const currentRange = state.select.ranges[state.select.ranges.length - 1];\n if (col > currentRange.start.col && col > currentRange.end.col) {\n //向右扩展\n table._makeVisibleCell(col + 1, row);\n }\n if (row > currentRange.start.row && row > currentRange.end.row) {\n //向右扩展\n table._makeVisibleCell(col, row + 1);\n }\n if (col < currentRange.start.col && col < currentRange.end.col) {\n //向右扩展\n table._makeVisibleCell(col - 1, row);\n }\n if (row < currentRange.start.row && row < currentRange.end.row) {\n //向右扩展\n table._makeVisibleCell(col, row - 1);\n }\n } else {\n table._makeVisibleCell(col, row);\n }\n }\n if (isSelectAll) {\n state.select.ranges = [];\n scenegraph.deleteAllSelectBorder();\n state.select.ranges.push({\n start: { col: 0, row: 0 },\n end: { col: table.colCount - 1, row: table.rowCount - 1 }\n });\n const currentRange = state.select.ranges[state.select.ranges.length - 1];\n scenegraph.updateCellSelectBorder(\n currentRange.start.col,\n currentRange.start.row,\n currentRange.end.col,\n currentRange.end.row\n );\n } else if (cellPos.col !== -1 && cellPos.row !== -1 && (col === -1 || row === -1)) {\n // 输入-1清空选中状态\n // clearMultiSelect(scenegraph, ranges, highlightScope, singleStyle);\n cellPos.col = -1;\n cellPos.row = -1;\n state.select.ranges = [];\n // 隐藏select border\n scenegraph.deleteAllSelectBorder();\n } else if (interactionState === InteractionState.default) {\n const currentRange = state.select.ranges[state.select.ranges.length - 1];\n if (isShift && currentRange) {\n if (state.select.headerSelectMode !== 'cell' && table.isColumnHeader(col, row)) {\n const startCol = Math.min(currentRange.start.col, currentRange.end.col, col);\n const endCol = Math.max(currentRange.start.col, currentRange.end.col, col);\n const startRow = Math.min(currentRange.start.row, currentRange.end.row, row);\n const endRow = table.rowCount - 1;\n\n currentRange.start = { col: startCol, row: startRow };\n currentRange.end = { col: endCol, row: endRow };\n } else if (state.select.headerSelectMode !== 'cell' && table.isRowHeader(col, row)) {\n const startCol = Math.min(currentRange.start.col, currentRange.end.col, col);\n const endCol = table.colCount - 1;\n const startRow = Math.min(currentRange.start.row, currentRange.end.row, row);\n const endRow = Math.max(currentRange.start.row, currentRange.end.row, row);\n\n currentRange.start = { col: startCol, row: startRow };\n currentRange.end = { col: endCol, row: endRow };\n } else {\n currentRange.end = { col, row };\n }\n scenegraph.deleteLastSelectedRangeComponents();\n scenegraph.updateCellSelectBorder(\n currentRange.start.col,\n currentRange.start.row,\n currentRange.end.col,\n currentRange.end.row\n );\n // } else if (isCtrl) {\n // cellPos.col = col;\n // cellPos.row = row;\n // state.select.ranges.push({\n // start: { col: cellPos.col, row: cellPos.row },\n // end: { col: cellPos.col, row: cellPos.row },\n // });\n // // 单选或多选的开始,只选中第一个单元格\n // // updateCellSelect(scenegraph, col, row, ranges, highlightScope, singleStyle);\n // scenegraph.setCellNormalStyle(col, row);\n // // 更新select border\n // // calculateAndUpdateMultiSelectBorder(scenegraph, col, row, col, row, state.select.ranges);\n // // 更新select border\n // scenegraph.updateCellSelectBorder(cellPos.col, cellPos.row, cellPos.col, cellPos.row);\n } else {\n // 单选或多选开始\n if (cellPos.col !== -1 && cellPos.row !== -1 && !isCtrl) {\n state.select.ranges = [];\n scenegraph.deleteAllSelectBorder();\n }\n if (state.select.headerSelectMode !== 'cell' && table.isColumnHeader(col, row)) {\n const cellRange = table.getCellRange(col, row);\n state.select.ranges.push({\n start: { col: cellRange.start.col, row },\n end: { col: cellRange.end.col, row: table.rowCount - 1 }\n });\n } else if (state.select.headerSelectMode !== 'cell' && table.isRowHeader(col, row)) {\n const cellRange = table.getCellRange(col, row);\n state.select.ranges.push({\n start: { col, row: cellRange.start.row },\n end: { col: table.colCount - 1, row: cellRange.end.row }\n });\n } else {\n state.select.ranges.push({\n start: { col, row },\n end: { col, row }\n });\n }\n cellPos.col = col;\n cellPos.row = row;\n // scenegraph.setCellNormalStyle(col, row);\n const currentRange = state.select.ranges[state.select.ranges.length - 1];\n scenegraph.updateCellSelectBorder(\n currentRange.start.col,\n currentRange.start.row,\n currentRange.end.col,\n currentRange.end.row\n );\n }\n } else if (interactionState === InteractionState.grabing) {\n // 可能有cellPosStart从-1开始grabing的情况\n if (cellPos.col === -1) {\n cellPos.col = col;\n }\n if (cellPos.row === -1) {\n cellPos.row = row;\n }\n const currentRange = state.select.ranges[state.select.ranges.length - 1];\n currentRange.end = {\n col,\n row\n };\n cellPos.col = col;\n cellPos.row = row;\n scenegraph.updateCellSelectBorder(currentRange.start.col, currentRange.start.row, col, row);\n }\n scenegraph.updateNextFrame();\n}\nexport function selectEnd(scenegraph: Scenegraph) {\n scenegraph.moveSelectingRangeComponentsToSelectedRangeComponents();\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/state/select/update-position.ts"],"names":[],"mappings":";;;AACA,6CAAkD;AASlD,SAAgB,oBAAoB,CAClC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AC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;KAC7G;IACD,UAAU,CAAC,eAAe,EAAE,CAAC;AAC/B,CAAC;AAjKD,oDAiKC;AACD,SAAgB,SAAS,CAAC,UAAsB;IAC9C,UAAU,CAAC,qDAAqD,EAAE,CAAC;AACrE,CAAC;AAFD,8BAEC","file":"update-position.js","sourcesContent":["import type { Scenegraph } from '../../scenegraph/scenegraph';\nimport { InteractionState } from '../../ts-types';\nimport type { StateManager } from '../state';\n/**\n * @description: 更新select位置\n * @param {StateManager} state\n * @param {number} col\n * @param {number} row\n * @return {*}\n */\nexport function updateSelectPosition(\n state: StateManager,\n col: number,\n row: number,\n isShift: boolean,\n isCtrl: boolean,\n isSelectAll: boolean\n) {\n const { table, interactionState } = state;\n const { scenegraph } = table;\n const { highlightScope, disableHeader, cellPos } = state.select;\n if ((disableHeader && table.isHeader(col, row)) || highlightScope === 'none') {\n col = -1;\n row = -1;\n }\n // 如果这里不继续进行 会造成问题drag select first cell seleted repeatly https://github.com/VisActor/VTable/issues/611\n // if (cellPos.col === col && cellPos.row === row) {\n // return;\n // }\n /** 完整显示选中单元格 自动滚动效果*/\n if (col !== -1 && row !== -1) {\n if (interactionState === InteractionState.grabing && state.select.ranges.length > 0) {\n const currentRange = state.select.ranges[state.select.ranges.length - 1];\n if (col > currentRange.start.col && col > currentRange.end.col) {\n //向右扩展\n table._makeVisibleCell(col + 1, row);\n }\n if (row > currentRange.start.row && row > currentRange.end.row) {\n //向右扩展\n table._makeVisibleCell(col, row + 1);\n }\n if (col < currentRange.start.col && col < currentRange.end.col) {\n //向右扩展\n table._makeVisibleCell(col - 1, row);\n }\n if (row < currentRange.start.row && row < currentRange.end.row) {\n //向右扩展\n table._makeVisibleCell(col, row - 1);\n }\n } else {\n table._makeVisibleCell(col, row);\n }\n }\n if (isSelectAll) {\n state.select.ranges = [];\n scenegraph.deleteAllSelectBorder();\n state.select.ranges.push({\n start: { col: 0, row: 0 },\n end: { col: table.colCount - 1, row: table.rowCount - 1 }\n });\n const currentRange = state.select.ranges[state.select.ranges.length - 1];\n scenegraph.updateCellSelectBorder(\n currentRange.start.col,\n currentRange.start.row,\n currentRange.end.col,\n currentRange.end.row\n );\n } else if (cellPos.col !== -1 && cellPos.row !== -1 && (col === -1 || row === -1)) {\n // 输入-1清空选中状态\n // clearMultiSelect(scenegraph, ranges, highlightScope, singleStyle);\n cellPos.col = -1;\n cellPos.row = -1;\n state.select.ranges = [];\n // 隐藏select border\n scenegraph.deleteAllSelectBorder();\n } else if (interactionState === InteractionState.default && !table.stateManager.isResizeCol()) {\n const currentRange = state.select.ranges[state.select.ranges.length - 1];\n if (isShift && currentRange) {\n if (state.select.headerSelectMode !== 'cell' && table.isColumnHeader(col, row)) {\n const startCol = Math.min(currentRange.start.col, currentRange.end.col, col);\n const endCol = Math.max(currentRange.start.col, currentRange.end.col, col);\n const startRow = Math.min(currentRange.start.row, currentRange.end.row, row);\n const endRow = table.rowCount - 1;\n\n currentRange.start = { col: startCol, row: startRow };\n currentRange.end = { col: endCol, row: endRow };\n } else if (state.select.headerSelectMode !== 'cell' && table.isRowHeader(col, row)) {\n const startCol = Math.min(currentRange.start.col, currentRange.end.col, col);\n const endCol = table.colCount - 1;\n const startRow = Math.min(currentRange.start.row, currentRange.end.row, row);\n const endRow = Math.max(currentRange.start.row, currentRange.end.row, row);\n\n currentRange.start = { col: startCol, row: startRow };\n currentRange.end = { col: endCol, row: endRow };\n } else {\n currentRange.end = { col, row };\n }\n scenegraph.deleteLastSelectedRangeComponents();\n scenegraph.updateCellSelectBorder(\n currentRange.start.col,\n currentRange.start.row,\n currentRange.end.col,\n currentRange.end.row\n );\n // } else if (isCtrl) {\n // cellPos.col = col;\n // cellPos.row = row;\n // state.select.ranges.push({\n // start: { col: cellPos.col, row: cellPos.row },\n // end: { col: cellPos.col, row: cellPos.row },\n // });\n // // 单选或多选的开始,只选中第一个单元格\n // // updateCellSelect(scenegraph, col, row, ranges, highlightScope, singleStyle);\n // scenegraph.setCellNormalStyle(col, row);\n // // 更新select border\n // // calculateAndUpdateMultiSelectBorder(scenegraph, col, row, col, row, state.select.ranges);\n // // 更新select border\n // scenegraph.updateCellSelectBorder(cellPos.col, cellPos.row, cellPos.col, cellPos.row);\n } else {\n // 单选或多选开始\n if (cellPos.col !== -1 && cellPos.row !== -1 && !isCtrl) {\n state.select.ranges = [];\n scenegraph.deleteAllSelectBorder();\n }\n if (state.select.headerSelectMode !== 'cell' && table.isColumnHeader(col, row)) {\n const cellRange = table.getCellRange(col, row);\n state.select.ranges.push({\n start: { col: cellRange.start.col, row },\n end: { col: cellRange.end.col, row: table.rowCount - 1 }\n });\n } else if (state.select.headerSelectMode !== 'cell' && table.isRowHeader(col, row)) {\n const cellRange = table.getCellRange(col, row);\n state.select.ranges.push({\n start: { col, row: cellRange.start.row },\n end: { col: table.colCount - 1, row: cellRange.end.row }\n });\n } else if (col >= 0 && row >= 0) {\n const cellRange = table.getCellRange(col, row);\n state.select.ranges.push(cellRange);\n }\n cellPos.col = col;\n cellPos.row = row;\n // scenegraph.setCellNormalStyle(col, row);\n const currentRange = state.select.ranges?.[state.select.ranges.length - 1];\n currentRange &&\n scenegraph.updateCellSelectBorder(\n currentRange.start.col,\n currentRange.start.row,\n currentRange.end.col,\n currentRange.end.row\n );\n }\n } else if (interactionState === InteractionState.grabing && !table.stateManager.isResizeCol()) {\n // 可能有cellPosStart从-1开始grabing的情况\n if (cellPos.col === -1) {\n cellPos.col = col;\n }\n if (cellPos.row === -1) {\n cellPos.row = row;\n }\n const currentRange = state.select.ranges[state.select.ranges.length - 1];\n currentRange &&\n (currentRange.end = {\n col,\n row\n });\n cellPos.col = col;\n cellPos.row = row;\n currentRange && scenegraph.updateCellSelectBorder(currentRange.start.col, currentRange.start.row, col, row);\n }\n scenegraph.updateNextFrame();\n}\nexport function selectEnd(scenegraph: Scenegraph) {\n scenegraph.moveSelectingRangeComponentsToSelectedRangeComponents();\n}\n"]}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: !0
|
|
5
5
|
}), exports.updateChartHover = exports.clearChartHover = void 0;
|
|
6
6
|
|
|
7
|
-
const vrender_1 = require("
|
|
7
|
+
const vrender_1 = require("./../../vrender"), TABLE_EVENT_TYPE_1 = require("../../core/TABLE_EVENT_TYPE");
|
|
8
8
|
|
|
9
9
|
function clearChartHover(col, row, table) {
|
|
10
10
|
const sparkline = table.scenegraph.getCell(col, row).getChildByName("sparkline"), highlightLine = null == sparkline ? void 0 : sparkline.getChildByName("highlight-line"), highlightSymbol = null == sparkline ? void 0 : sparkline.getChildByName("highlight-symbol");
|
|
@@ -34,18 +34,22 @@ function updateChartHover(col, row, x, y, table) {
|
|
|
34
34
|
}, defined)) {
|
|
35
35
|
const highlightLine = sparkline.getChildByName("highlight-line");
|
|
36
36
|
if (highlightLine) highlightLine.setAttributes({
|
|
37
|
-
|
|
37
|
+
points: [ {
|
|
38
|
+
x: pointX,
|
|
39
|
+
y: max
|
|
40
|
+
}, {
|
|
41
|
+
x: pointX,
|
|
42
|
+
y: min
|
|
43
|
+
} ],
|
|
38
44
|
visible: !0,
|
|
39
45
|
pickable: !0
|
|
40
46
|
}); else {
|
|
41
47
|
const highlightLine = (0, vrender_1.createLine)({
|
|
42
|
-
x: pointX,
|
|
43
|
-
y: 0,
|
|
44
48
|
points: [ {
|
|
45
|
-
x:
|
|
49
|
+
x: pointX,
|
|
46
50
|
y: max
|
|
47
51
|
}, {
|
|
48
|
-
x:
|
|
52
|
+
x: pointX,
|
|
49
53
|
y: min
|
|
50
54
|
} ],
|
|
51
55
|
lineWidth: null === (_a = line.hover) || void 0 === _a ? void 0 : _a.strokeWidth,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/state/spark-line/index.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"sources":["../src/state/spark-line/index.ts"],"names":[],"mappings":";;;AAAA,6CAA2D;AAC3D,kEAA+D;AA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;YACH,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC;YACrC,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC;YACnC,SAAS,EAAE,KAAK,CAAC,kBAAkB,CAAC,GAAG,EAAE,GAAG,CAAC;YAC7C,eAAe,EAAE,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,kBAAkB,CAAC,GAAG,EAAE,GAAG,CAAC;YAC3E,KAAK,EAAE,KAAK,CAAC,mBAAmB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,KAAK;YAChD,SAAS,EAAE,KAAK,CAAC,mBAAmB,CAAC,GAAG,EAAE,GAAG,CAAC;YAC9C,SAAS,EAAE;gBACT,SAAS,EAAE,UAAU,CAAC,SAAS;aAChC;YACD,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,qBAAqB,EAAE,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,WAAW;SAClF,CAAC;QACF,KAAK,CAAC,aAAa,CAAC,mCAAgB,CAAC,sBAAsB,EAAE,SAAuC,CAAC,CAAC;KACvG;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AApGD,4CAoGC","file":"index.js","sourcesContent":["import { createLine, createSymbol } from './../../vrender';\nimport { TABLE_EVENT_TYPE } from '../../core/TABLE_EVENT_TYPE';\nimport type { MousePointerSparklineEvent } from '../../ts-types';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\n\nexport function clearChartHover(col: number, row: number, table: BaseTableAPI) {\n const cellGroup = table.scenegraph.getCell(col, row);\n const sparkline = cellGroup.getChildByName('sparkline');\n const highlightLine = sparkline?.getChildByName('highlight-line');\n const highlightSymbol = sparkline?.getChildByName('highlight-symbol');\n if (highlightLine) {\n highlightLine.setAttributes({\n visible: false,\n pickable: false\n });\n }\n if (highlightSymbol) {\n highlightSymbol.setAttributes({\n visible: false,\n pickable: false\n });\n }\n\n table.scenegraph.updateNextFrame();\n}\n\nexport function updateChartHover(col: number, row: number, x: number, y: number, table: BaseTableAPI): boolean {\n const cellGroup = table.scenegraph.getCell(col, row);\n const sparkline = cellGroup.getChildByName('sparkline');\n const line = sparkline?.getChildByName('sparkline-line');\n const symbol = sparkline?.getChildByName('sparkline-symbol-group');\n if (!line) {\n return false;\n }\n const bandwidth = (line as any).bandwidth;\n const min = (line as any).min;\n const max = (line as any).max;\n const points = line.attribute.points;\n x = x - sparkline.globalAABBBounds.x1;\n y = y - sparkline.globalAABBBounds.y1;\n\n let chartPoint;\n for (let i = 0; i < points.length; i++) {\n const { x: pointX, y: pointY, defined, rawData } = points[i];\n\n if (Math.abs(x - pointX) < bandwidth / 2) {\n chartPoint = {\n point: points[i],\n points,\n pointsBandWidth: bandwidth,\n pointData: rawData\n };\n if (defined) {\n // 添加highlight line\n const highlightLine = sparkline.getChildByName('highlight-line');\n if (highlightLine) {\n highlightLine.setAttributes({\n // x: pointX,\n points: [\n { x: pointX, y: max },\n { x: pointX, y: min }\n ],\n visible: true,\n pickable: true\n });\n } else {\n const highlightLine = createLine({\n // x: 0,\n // y: 0,\n points: [\n { x: pointX, y: max },\n { x: pointX, y: min }\n ],\n lineWidth: line.hover?.strokeWidth,\n stroke: line.hover?.stroke\n });\n highlightLine.name = 'highlight-line';\n sparkline.addChild(highlightLine);\n }\n\n // 添加highlight symbol\n const highlightSymbol = sparkline.getChildByName('highlight-symbol');\n if (highlightSymbol) {\n highlightSymbol.setAttributes({\n x: pointX,\n y: pointY,\n visible: true,\n pickable: true\n });\n } else {\n const highlightSymbol = createSymbol({\n x: pointX,\n y: pointY,\n stroke: symbol.hover.stroke,\n lineWidth: symbol.hover.strokeWidth,\n fill: symbol.hover.fill,\n size: symbol.hover.size * 2, // 之前配置的是圆半径\n symbolType: 'circle'\n });\n highlightSymbol.name = 'highlight-symbol';\n sparkline.addChild(highlightSymbol);\n }\n break;\n }\n }\n }\n table.scenegraph.updateNextFrame();\n\n if (chartPoint) {\n const eventInfo: Omit<MousePointerSparklineEvent, 'target'> = {\n col,\n row,\n field: table.getHeaderField(col, row),\n value: table.getCellValue(col, row),\n dataValue: table.getCellOriginValue(col, row),\n cellHeaderPaths: table.internalProps.layoutMap.getCellHeaderPaths(col, row),\n title: table.getBodyColumnDefine(col, row).title,\n cellRange: table.getCellRelativeRect(col, row),\n sparkline: {\n pointData: chartPoint.pointData\n },\n scaleRatio: table.canvas.getBoundingClientRect().width / table.canvas.offsetWidth\n };\n table.fireListeners(TABLE_EVENT_TYPE.MOUSEOVER_CHART_SYMBOL, eventInfo as MousePointerSparklineEvent);\n }\n return true;\n}\n"]}
|
package/cjs/state/state.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { Icon } from '../scenegraph/graphic/icon';
|
|
|
3
3
|
import type { CellAddress, CellPosition, CellRange, DropDownMenuHighlightInfo, MenuListItem, SortOrder, SortState } from '../ts-types';
|
|
4
4
|
import { HighlightScope, InteractionState } from '../ts-types';
|
|
5
5
|
import { Bounds } from '@visactor/vutils';
|
|
6
|
-
import type { FederatedEvent } from '
|
|
6
|
+
import type { FederatedEvent } from './../vrender';
|
|
7
7
|
import type { BaseTableAPI } from '../ts-types/base-table';
|
|
8
8
|
export declare class StateManager {
|
|
9
9
|
table: BaseTableAPI;
|
package/cjs/state/state.js
CHANGED
|
@@ -134,12 +134,11 @@ class StateManager {
|
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
136
|
setSelectState() {
|
|
137
|
-
|
|
138
|
-
const {headerSelectMode: headerSelectMode, disableSelect: disableSelect, disableHeaderSelect: disableHeaderSelect} = null !== (_b = null === (_a = this.table.options) || void 0 === _a ? void 0 : _a.select) && void 0 !== _b ? _b : {
|
|
137
|
+
const {headerSelectMode: headerSelectMode, disableSelect: disableSelect, disableHeaderSelect: disableHeaderSelect} = Object.assign({}, {
|
|
139
138
|
headerSelectMode: "inline",
|
|
140
139
|
disableSelect: !1,
|
|
141
140
|
disableHeaderSelect: !1
|
|
142
|
-
};
|
|
141
|
+
}, this.table.options.select);
|
|
143
142
|
this.select.highlightScope = disableSelect ? ts_types_1.HighlightScope.none : ts_types_1.HighlightScope.single,
|
|
144
143
|
this.select.singleStyle = !disableSelect, this.select.disableHeader = disableHeaderSelect,
|
|
145
144
|
this.select.headerSelectMode = headerSelectMode;
|
|
@@ -151,7 +150,8 @@ class StateManager {
|
|
|
151
150
|
})), seled;
|
|
152
151
|
}
|
|
153
152
|
setSortState(sortState) {
|
|
154
|
-
this.sort.field = sortState.field, this.sort.fieldKey = sortState
|
|
153
|
+
this.sort.field = null == sortState ? void 0 : sortState.field, this.sort.fieldKey = null == sortState ? void 0 : sortState.fieldKey,
|
|
154
|
+
this.sort.order = null == sortState ? void 0 : sortState.order;
|
|
155
155
|
}
|
|
156
156
|
setFrozenState() {
|
|
157
157
|
this.frozen.col = this.table.frozenColCount - 1;
|
|
@@ -293,11 +293,10 @@ class StateManager {
|
|
|
293
293
|
setScrollTop(top) {
|
|
294
294
|
var _a, _b;
|
|
295
295
|
const totalHeight = this.table.getAllRowsHeight();
|
|
296
|
-
top = Math.max(0, Math.min(top, totalHeight - this.table.scenegraph.height)), top = Math.ceil(top),
|
|
296
|
+
top = Math.max(0, Math.min(top, totalHeight - this.table.scenegraph.height)), (top = Math.ceil(top)) !== this.scroll.verticalBarPos && this.table.stateManager.updateHoverPos(-1, -1),
|
|
297
297
|
this.scroll.verticalBarPos = top, this.table.scenegraph.setY(-top);
|
|
298
298
|
const yRatio = top / (totalHeight - this.table.scenegraph.height);
|
|
299
|
-
this.table.scenegraph.component.updateVerticalScrollBarPos(yRatio), this.table.
|
|
300
|
-
this.table.fireListeners(TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE.SCROLL, {
|
|
299
|
+
this.table.scenegraph.component.updateVerticalScrollBarPos(yRatio), this.table.fireListeners(TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE.SCROLL, {
|
|
301
300
|
scrollTop: this.scroll.verticalBarPos,
|
|
302
301
|
scrollLeft: this.scroll.horizontalBarPos,
|
|
303
302
|
scrollHeight: null === (_a = this.table.theme.scrollStyle) || void 0 === _a ? void 0 : _a.width,
|
|
@@ -312,11 +311,10 @@ class StateManager {
|
|
|
312
311
|
var _a, _b;
|
|
313
312
|
const totalWidth = this.table.getAllColsWidth();
|
|
314
313
|
this.table.getFrozenColsWidth();
|
|
315
|
-
left = Math.max(0, Math.min(left, totalWidth - this.table.scenegraph.width)), left = Math.ceil(left),
|
|
314
|
+
left = Math.max(0, Math.min(left, totalWidth - this.table.scenegraph.width)), (left = Math.ceil(left)) !== this.scroll.horizontalBarPos && this.table.stateManager.updateHoverPos(-1, -1),
|
|
316
315
|
this.scroll.horizontalBarPos = left, this.table.scenegraph.setX(-left);
|
|
317
316
|
const xRatio = left / (totalWidth - this.table.scenegraph.width);
|
|
318
|
-
this.table.scenegraph.component.updateHorizontalScrollBarPos(xRatio), this.table.
|
|
319
|
-
this.table.fireListeners(TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE.SCROLL, {
|
|
317
|
+
this.table.scenegraph.component.updateHorizontalScrollBarPos(xRatio), this.table.fireListeners(TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE.SCROLL, {
|
|
320
318
|
scrollTop: this.scroll.verticalBarPos,
|
|
321
319
|
scrollLeft: this.scroll.horizontalBarPos,
|
|
322
320
|
scrollHeight: null === (_a = this.table.theme.scrollStyle) || void 0 === _a ? void 0 : _a.width,
|
|
@@ -384,16 +382,14 @@ class StateManager {
|
|
|
384
382
|
row: row,
|
|
385
383
|
icon: icon
|
|
386
384
|
}, this.table.scenegraph.setIconHoverStyle(this.residentHoverIcon.icon, this.residentHoverIcon.col, this.residentHoverIcon.row, cellGroup),
|
|
387
|
-
|
|
388
|
-
icon.setAttribute("opacity", 1));
|
|
385
|
+
this.table.scenegraph.residentHoverIcon(col, row));
|
|
389
386
|
}
|
|
390
387
|
hideMenu() {
|
|
391
|
-
this.table.fireListeners(TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE.DROPDOWN_MENU_CLEAR, null),
|
|
388
|
+
this.menu.isShow && (this.table.fireListeners(TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE.DROPDOWN_MENU_CLEAR, null),
|
|
392
389
|
this.table.fireListeners(TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE.HIDE_MENU, null), this.menu.isShow = !1,
|
|
393
390
|
this.table.scenegraph.component.menu.detach(), this.residentHoverIcon && (this.table.scenegraph.setIconNormalStyle(this.residentHoverIcon.icon, this.residentHoverIcon.col, this.residentHoverIcon.row),
|
|
394
|
-
this.
|
|
395
|
-
this.residentHoverIcon
|
|
396
|
-
this.residentHoverIcon = null);
|
|
391
|
+
this.table.scenegraph.resetResidentHoverIcon(this.residentHoverIcon.col, this.residentHoverIcon.row),
|
|
392
|
+
this.residentHoverIcon = null));
|
|
397
393
|
}
|
|
398
394
|
setDropDownMenuHighlight(cells) {
|
|
399
395
|
this.menu.dropDownMenuHighlight = cells;
|