@visactor/vtable 0.9.1-alpha.4 → 0.9.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.js +15 -4
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotTable.d.ts +2 -1
- package/cjs/PivotTable.js +15 -3
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/body-helper/body-helper.d.ts +1 -0
- package/cjs/body-helper/body-helper.js +6 -3
- package/cjs/body-helper/body-helper.js.map +1 -1
- package/cjs/body-helper/style/ProgressBarStyle.js +14 -8
- package/cjs/body-helper/style/ProgressBarStyle.js.map +1 -1
- package/cjs/body-helper/style/Style.d.ts +3 -0
- package/cjs/body-helper/style/Style.js +21 -14
- package/cjs/body-helper/style/Style.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +4 -1
- package/cjs/core/BaseTable.js +31 -20
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/tableHelper.js +11 -6
- package/cjs/core/tableHelper.js.map +1 -1
- package/cjs/data/DataSource.d.ts +4 -1
- package/cjs/data/DataSource.js +3 -3
- package/cjs/data/DataSource.js.map +1 -1
- package/cjs/event/event.d.ts +14 -19
- package/cjs/event/event.js +12 -329
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/container-dom.d.ts +2 -0
- package/cjs/event/listener/container-dom.js +42 -0
- package/cjs/event/listener/container-dom.js.map +1 -0
- package/cjs/event/listener/scroll-bar.d.ts +2 -0
- package/cjs/event/listener/scroll-bar.js +44 -0
- package/cjs/event/listener/scroll-bar.js.map +1 -0
- package/cjs/event/listener/table-group.d.ts +2 -0
- package/cjs/event/listener/table-group.js +262 -0
- package/cjs/event/listener/table-group.js.map +1 -0
- package/cjs/event/listener/touch.d.ts +2 -0
- package/cjs/event/listener/touch.js +76 -0
- package/cjs/event/listener/touch.js.map +1 -0
- package/cjs/event/scroll.d.ts +2 -0
- package/cjs/event/scroll.js +32 -4
- package/cjs/event/scroll.js.map +1 -1
- package/cjs/event/util.d.ts +16 -0
- package/cjs/event/util.js +30 -0
- package/cjs/event/util.js.map +1 -0
- package/cjs/header-helper/header-helper.d.ts +5 -6
- package/cjs/header-helper/header-helper.js +19 -22
- package/cjs/header-helper/header-helper.js.map +1 -1
- package/cjs/icons.js +11 -11
- package/cjs/icons.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/layout/index.js +1 -2
- package/cjs/layout/pivot-header-layout.d.ts +4 -1
- package/cjs/layout/pivot-header-layout.js +15 -14
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/simple-header-layout.d.ts +13 -1
- package/cjs/layout/simple-header-layout.js +12 -1
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/cjs/render/layout/container.js +1 -1
- package/cjs/render/layout/container.js.map +1 -1
- package/cjs/render/layout/element.d.ts +1 -1
- package/cjs/render/layout/element.js.map +1 -1
- package/cjs/render/layout/rect.d.ts +2 -2
- package/cjs/render/layout/rect.js +2 -2
- package/cjs/render/layout/rect.js.map +1 -1
- package/cjs/scenegraph/component/custom.js +18 -7
- package/cjs/scenegraph/component/custom.js.map +1 -1
- package/cjs/scenegraph/component/menu.js +2 -2
- package/cjs/scenegraph/component/menu.js.map +1 -1
- package/cjs/scenegraph/component/table-component.d.ts +3 -3
- package/cjs/scenegraph/component/table-component.js +36 -26
- package/cjs/scenegraph/component/table-component.js.map +1 -1
- package/cjs/scenegraph/graphic/chart.d.ts +1 -0
- package/cjs/scenegraph/graphic/chart.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render.js +7 -2
- package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/cjs/scenegraph/graphic/group.d.ts +4 -0
- package/cjs/scenegraph/graphic/group.js +6 -0
- package/cjs/scenegraph/graphic/group.js.map +1 -1
- package/cjs/scenegraph/graphic/text.js +7 -7
- package/cjs/scenegraph/graphic/text.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.d.ts +3 -4
- package/cjs/scenegraph/group-creater/cell-helper.js +25 -18
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +6 -4
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js +11 -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 +12 -9
- package/cjs/scenegraph/group-creater/cell-type/progress-bar-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 +7 -4
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/video-cell.js +1 -1
- package/cjs/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/column-helper.d.ts +3 -3
- package/cjs/scenegraph/group-creater/column-helper.js +22 -11
- package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/column.d.ts +0 -6
- package/cjs/scenegraph/group-creater/column.js +3 -12
- package/cjs/scenegraph/group-creater/column.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.d.ts +0 -2
- package/cjs/scenegraph/group-creater/progress/proxy.js +23 -19
- package/cjs/scenegraph/group-creater/progress/proxy.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/auto-width.js +1 -1
- package/cjs/scenegraph/layout/auto-width.js.map +1 -1
- package/cjs/scenegraph/layout/compute-col-width.d.ts +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js +28 -8
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/layout/frozen.d.ts +3 -0
- package/cjs/scenegraph/layout/frozen.js +66 -0
- package/cjs/scenegraph/layout/frozen.js.map +1 -0
- package/cjs/scenegraph/layout/move-cell.js +5 -1
- package/cjs/scenegraph/layout/move-cell.js.map +1 -1
- package/cjs/scenegraph/layout/update-cell.js +3 -3
- package/cjs/scenegraph/layout/update-cell.js.map +1 -1
- package/cjs/scenegraph/layout/update-height.js +4 -4
- package/cjs/scenegraph/layout/update-height.js.map +1 -1
- package/cjs/scenegraph/layout/update-row.d.ts +3 -0
- package/cjs/scenegraph/layout/update-row.js +81 -0
- package/cjs/scenegraph/layout/update-row.js.map +1 -0
- package/cjs/scenegraph/layout/update-width.js +5 -5
- package/cjs/scenegraph/layout/update-width.js.map +1 -1
- package/cjs/scenegraph/refresh-node/update-chart.d.ts +2 -0
- package/cjs/scenegraph/refresh-node/update-chart.js +26 -0
- package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -0
- package/cjs/scenegraph/scenegraph.d.ts +15 -3
- package/cjs/scenegraph/scenegraph.js +86 -95
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/select/create-select-border.js +1 -0
- package/cjs/scenegraph/select/create-select-border.js.map +1 -1
- package/cjs/scenegraph/stick-text/index.js +52 -40
- package/cjs/scenegraph/stick-text/index.js.map +1 -1
- package/cjs/scenegraph/style/frame-border.d.ts +1 -1
- package/cjs/scenegraph/style/frame-border.js +7 -7
- package/cjs/scenegraph/style/frame-border.js.map +1 -1
- package/cjs/scenegraph/utils/deal-promise-data.d.ts +2 -0
- package/cjs/scenegraph/utils/deal-promise-data.js +14 -0
- package/cjs/scenegraph/utils/deal-promise-data.js.map +1 -0
- package/cjs/scenegraph/utils/empty-group.d.ts +2 -0
- package/cjs/scenegraph/utils/empty-group.js +10 -0
- package/cjs/scenegraph/utils/empty-group.js.map +1 -0
- package/cjs/scenegraph/utils/get-hierarchy-offset.d.ts +2 -0
- package/cjs/scenegraph/utils/get-hierarchy-offset.js +27 -0
- package/cjs/scenegraph/utils/get-hierarchy-offset.js.map +1 -0
- package/cjs/scenegraph/utils/padding.d.ts +1 -1
- package/cjs/scenegraph/utils/padding.js +3 -3
- package/cjs/scenegraph/utils/padding.js.map +1 -1
- package/cjs/scenegraph/utils/text-icon-layout.d.ts +3 -2
- package/cjs/scenegraph/utils/text-icon-layout.js +24 -19
- package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/cjs/scenegraph/utils/text-pos.js +1 -1
- package/cjs/scenegraph/utils/text-pos.js.map +1 -1
- package/cjs/state/cell-move/adjust-header.js +9 -2
- package/cjs/state/cell-move/adjust-header.js.map +1 -1
- package/cjs/state/cell-move/index.js +9 -3
- package/cjs/state/cell-move/index.js.map +1 -1
- package/cjs/state/frozen/index.d.ts +2 -0
- package/cjs/state/{pin → frozen}/index.js +2 -2
- package/cjs/state/frozen/index.js.map +1 -0
- package/cjs/state/state.d.ts +1 -1
- package/cjs/state/state.js +16 -12
- package/cjs/state/state.js.map +1 -1
- package/cjs/themes/ARCO.js +1 -1
- package/cjs/themes/ARCO.js.map +1 -1
- package/cjs/themes/BRIGHT.js +1 -1
- package/cjs/themes/BRIGHT.js.map +1 -1
- package/cjs/themes/DARK.js +1 -1
- package/cjs/themes/DARK.js.map +1 -1
- package/cjs/themes/DEFAULT.js +1 -1
- package/cjs/themes/DEFAULT.js.map +1 -1
- package/cjs/themes/theme.d.ts +1 -1
- package/cjs/themes/theme.js +6 -6
- package/cjs/themes/theme.js.map +1 -1
- package/cjs/tools/LimitPromiseQueue.js +1 -2
- package/cjs/tools/NumberMap.js +1 -1
- package/cjs/tools/Rect.js +1 -1
- package/cjs/tools/calc.js +1 -1
- package/cjs/tools/debounce.js +1 -1
- package/cjs/tools/diff-cell.d.ts +10 -0
- package/cjs/tools/diff-cell.js +49 -0
- package/cjs/tools/diff-cell.js.map +1 -0
- package/cjs/tools/dom.js +1 -1
- package/cjs/tools/env.js +1 -1
- package/cjs/tools/helper.d.ts +11 -0
- package/cjs/tools/helper.js +7 -2
- package/cjs/tools/helper.js.map +1 -1
- package/cjs/tooltip/BaseTooltip.js +1 -1
- package/cjs/tooltip/Tooltip.js +2 -1
- package/cjs/tooltip/TooltipHandler.js +1 -1
- package/cjs/ts-types/base-table.d.ts +8 -2
- package/cjs/ts-types/base-table.js +1 -1
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/common.js +1 -1
- package/cjs/ts-types/customElement.d.ts +11 -2
- package/cjs/ts-types/customElement.js +1 -1
- package/cjs/ts-types/customElement.js.map +1 -1
- package/cjs/ts-types/customLayout.js +1 -1
- package/cjs/ts-types/events.js +1 -1
- package/cjs/ts-types/icon.d.ts +4 -5
- package/cjs/ts-types/icon.js +6 -6
- package/cjs/ts-types/icon.js.map +1 -1
- package/cjs/ts-types/list-table/define/basic-define.d.ts +4 -1
- package/cjs/ts-types/list-table/define/basic-define.js.map +1 -1
- package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
- package/cjs/ts-types/theme.d.ts +1 -1
- package/cjs/ts-types/theme.js.map +1 -1
- package/dist/vtable.es5.js +53155 -0
- package/dist/vtable.es5.min.js +3 -0
- package/dist/vtable.js +17155 -21633
- package/dist/vtable.min.js +15 -3
- package/es/ListTable.js +16 -3
- package/es/ListTable.js.map +1 -1
- package/es/PivotTable.d.ts +2 -1
- package/es/PivotTable.js +16 -2
- package/es/PivotTable.js.map +1 -1
- package/es/body-helper/body-helper.d.ts +1 -0
- package/es/body-helper/body-helper.js +6 -3
- package/es/body-helper/body-helper.js.map +1 -1
- package/es/body-helper/style/ProgressBarStyle.js +14 -8
- package/es/body-helper/style/ProgressBarStyle.js.map +1 -1
- package/es/body-helper/style/Style.d.ts +3 -0
- package/es/body-helper/style/Style.js +21 -14
- package/es/body-helper/style/Style.js.map +1 -1
- package/es/core/BaseTable.d.ts +4 -1
- package/es/core/BaseTable.js +31 -21
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/tableHelper.js +11 -7
- package/es/core/tableHelper.js.map +1 -1
- package/es/data/DataSource.d.ts +4 -1
- package/es/data/DataSource.js +4 -2
- package/es/data/DataSource.js.map +1 -1
- package/es/event/event.d.ts +14 -19
- package/es/event/event.js +16 -333
- package/es/event/event.js.map +1 -1
- package/es/event/listener/container-dom.d.ts +2 -0
- package/es/event/listener/container-dom.js +40 -0
- package/es/event/listener/container-dom.js.map +1 -0
- package/es/event/listener/scroll-bar.d.ts +2 -0
- package/es/event/listener/scroll-bar.js +37 -0
- package/es/event/listener/scroll-bar.js.map +1 -0
- package/es/event/listener/table-group.d.ts +2 -0
- package/es/event/listener/table-group.js +265 -0
- package/es/event/listener/table-group.js.map +1 -0
- package/es/event/listener/touch.d.ts +2 -0
- package/es/event/listener/touch.js +67 -0
- package/es/event/listener/touch.js.map +1 -0
- package/es/event/scroll.d.ts +2 -0
- package/es/event/scroll.js +29 -3
- package/es/event/scroll.js.map +1 -1
- package/es/event/util.d.ts +16 -0
- package/es/event/util.js +24 -0
- package/es/event/util.js.map +1 -0
- package/es/header-helper/header-helper.d.ts +5 -6
- package/es/header-helper/header-helper.js +22 -24
- package/es/header-helper/header-helper.js.map +1 -1
- package/es/icons.js +11 -11
- package/es/icons.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/layout/index.js +1 -2
- package/es/layout/pivot-header-layout.d.ts +4 -1
- package/es/layout/pivot-header-layout.js +17 -13
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/simple-header-layout.d.ts +13 -1
- package/es/layout/simple-header-layout.js +12 -1
- package/es/layout/simple-header-layout.js.map +1 -1
- package/es/render/layout/container.js +1 -1
- package/es/render/layout/container.js.map +1 -1
- package/es/render/layout/element.d.ts +1 -1
- package/es/render/layout/element.js.map +1 -1
- package/es/render/layout/rect.d.ts +2 -2
- package/es/render/layout/rect.js +2 -2
- package/es/render/layout/rect.js.map +1 -1
- package/es/scenegraph/component/custom.js +20 -9
- package/es/scenegraph/component/custom.js.map +1 -1
- package/es/scenegraph/component/menu.js +2 -2
- package/es/scenegraph/component/menu.js.map +1 -1
- package/es/scenegraph/component/table-component.d.ts +3 -3
- package/es/scenegraph/component/table-component.js +36 -26
- package/es/scenegraph/component/table-component.js.map +1 -1
- package/es/scenegraph/graphic/chart.d.ts +1 -0
- package/es/scenegraph/graphic/chart.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render.js +7 -2
- package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/es/scenegraph/graphic/group.d.ts +4 -0
- package/es/scenegraph/graphic/group.js +6 -0
- package/es/scenegraph/graphic/group.js.map +1 -1
- package/es/scenegraph/graphic/text.js +7 -7
- package/es/scenegraph/graphic/text.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.d.ts +3 -4
- package/es/scenegraph/group-creater/cell-helper.js +28 -17
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.js +6 -4
- package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/image-cell.js +12 -2
- package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/progress-bar-cell.js +13 -10
- package/es/scenegraph/group-creater/cell-type/progress-bar-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 +7 -4
- package/es/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/video-cell.js +1 -1
- package/es/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
- package/es/scenegraph/group-creater/column-helper.d.ts +3 -3
- package/es/scenegraph/group-creater/column-helper.js +25 -10
- package/es/scenegraph/group-creater/column-helper.js.map +1 -1
- package/es/scenegraph/group-creater/column.d.ts +0 -6
- package/es/scenegraph/group-creater/column.js +3 -12
- package/es/scenegraph/group-creater/column.js.map +1 -1
- package/es/scenegraph/group-creater/progress/proxy.d.ts +0 -2
- package/es/scenegraph/group-creater/progress/proxy.js +22 -21
- package/es/scenegraph/group-creater/progress/proxy.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/auto-width.js +2 -2
- package/es/scenegraph/layout/auto-width.js.map +1 -1
- package/es/scenegraph/layout/compute-col-width.d.ts +1 -1
- package/es/scenegraph/layout/compute-col-width.js +30 -10
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/layout/frozen.d.ts +3 -0
- package/es/scenegraph/layout/frozen.js +58 -0
- package/es/scenegraph/layout/frozen.js.map +1 -0
- package/es/scenegraph/layout/move-cell.js +5 -1
- package/es/scenegraph/layout/move-cell.js.map +1 -1
- package/es/scenegraph/layout/update-cell.js +4 -4
- package/es/scenegraph/layout/update-cell.js.map +1 -1
- package/es/scenegraph/layout/update-height.js +5 -5
- package/es/scenegraph/layout/update-height.js.map +1 -1
- package/es/scenegraph/layout/update-row.d.ts +3 -0
- package/es/scenegraph/layout/update-row.js +73 -0
- package/es/scenegraph/layout/update-row.js.map +1 -0
- package/es/scenegraph/layout/update-width.js +6 -6
- package/es/scenegraph/layout/update-width.js.map +1 -1
- package/es/scenegraph/refresh-node/update-chart.d.ts +2 -0
- package/es/scenegraph/refresh-node/update-chart.js +20 -0
- package/es/scenegraph/refresh-node/update-chart.js.map +1 -0
- package/es/scenegraph/scenegraph.d.ts +15 -3
- package/es/scenegraph/scenegraph.js +92 -94
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/select/create-select-border.js +1 -0
- package/es/scenegraph/select/create-select-border.js.map +1 -1
- package/es/scenegraph/stick-text/index.js +52 -40
- package/es/scenegraph/stick-text/index.js.map +1 -1
- package/es/scenegraph/style/frame-border.d.ts +1 -1
- package/es/scenegraph/style/frame-border.js +9 -9
- package/es/scenegraph/style/frame-border.js.map +1 -1
- package/es/scenegraph/utils/deal-promise-data.d.ts +2 -0
- package/es/scenegraph/utils/deal-promise-data.js +8 -0
- package/es/scenegraph/utils/deal-promise-data.js.map +1 -0
- package/es/scenegraph/utils/empty-group.d.ts +2 -0
- package/es/scenegraph/utils/empty-group.js +6 -0
- package/es/scenegraph/utils/empty-group.js.map +1 -0
- package/es/scenegraph/utils/get-hierarchy-offset.d.ts +2 -0
- package/es/scenegraph/utils/get-hierarchy-offset.js +19 -0
- package/es/scenegraph/utils/get-hierarchy-offset.js.map +1 -0
- package/es/scenegraph/utils/padding.d.ts +1 -1
- package/es/scenegraph/utils/padding.js +1 -1
- package/es/scenegraph/utils/padding.js.map +1 -1
- package/es/scenegraph/utils/text-icon-layout.d.ts +3 -2
- package/es/scenegraph/utils/text-icon-layout.js +27 -19
- package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/es/scenegraph/utils/text-pos.js +2 -2
- package/es/scenegraph/utils/text-pos.js.map +1 -1
- package/es/state/cell-move/adjust-header.js +9 -2
- package/es/state/cell-move/adjust-header.js.map +1 -1
- package/es/state/cell-move/index.js +9 -3
- package/es/state/cell-move/index.js.map +1 -1
- package/es/state/frozen/index.d.ts +2 -0
- package/es/state/{pin → frozen}/index.js +1 -1
- package/es/state/frozen/index.js.map +1 -0
- package/es/state/state.d.ts +1 -1
- package/es/state/state.js +16 -12
- package/es/state/state.js.map +1 -1
- package/es/themes/ARCO.js +1 -1
- package/es/themes/ARCO.js.map +1 -1
- package/es/themes/BRIGHT.js +1 -1
- package/es/themes/BRIGHT.js.map +1 -1
- package/es/themes/DARK.js +1 -1
- package/es/themes/DARK.js.map +1 -1
- package/es/themes/DEFAULT.js +1 -1
- package/es/themes/DEFAULT.js.map +1 -1
- package/es/themes/theme.d.ts +1 -1
- package/es/themes/theme.js +6 -6
- package/es/themes/theme.js.map +1 -1
- package/es/tools/LimitPromiseQueue.js +1 -2
- package/es/tools/NumberMap.js +1 -1
- package/es/tools/Rect.js +1 -1
- package/es/tools/calc.js +1 -1
- package/es/tools/debounce.js +1 -1
- package/es/tools/diff-cell.d.ts +10 -0
- package/es/tools/diff-cell.js +42 -0
- package/es/tools/diff-cell.js.map +1 -0
- package/es/tools/dom.js +1 -1
- package/es/tools/env.js +1 -1
- package/es/tools/helper.d.ts +11 -0
- package/es/tools/helper.js +4 -0
- package/es/tools/helper.js.map +1 -1
- package/es/tooltip/BaseTooltip.js +1 -1
- package/es/tooltip/Tooltip.js +2 -1
- package/es/tooltip/TooltipHandler.js +1 -1
- package/es/ts-types/base-table.d.ts +8 -2
- package/es/ts-types/base-table.js +1 -1
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/common.js +1 -1
- package/es/ts-types/customElement.d.ts +11 -2
- package/es/ts-types/customElement.js +1 -1
- package/es/ts-types/customElement.js.map +1 -1
- package/es/ts-types/customLayout.js +1 -1
- package/es/ts-types/events.js +1 -1
- package/es/ts-types/icon.d.ts +4 -5
- package/es/ts-types/icon.js +6 -6
- package/es/ts-types/icon.js.map +1 -1
- package/es/ts-types/list-table/define/basic-define.d.ts +4 -1
- package/es/ts-types/list-table/define/basic-define.js.map +1 -1
- package/es/ts-types/list-table/layout-map/api.js.map +1 -1
- package/es/ts-types/theme.d.ts +1 -1
- package/es/ts-types/theme.js.map +1 -1
- package/package.json +9 -9
- package/cjs/scenegraph/component/menu.d.ts +0 -41
- package/cjs/scenegraph/graphic/text.d.ts +0 -16
- package/cjs/state/pin/index.d.ts +0 -2
- package/cjs/state/pin/index.js.map +0 -1
- package/es/scenegraph/component/menu.d.ts +0 -41
- package/es/scenegraph/graphic/text.d.ts +0 -16
- package/es/state/pin/index.d.ts +0 -2
- package/es/state/pin/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["scenegraph/layout/update-width.ts"],"names":[],"mappings":";;;AAIA,sEAA0F;AAC1F,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,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,OAAiB,CAAC,CAAC;IAC5F,OAAO,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAC7C,CAAC","file":"update-width.js","sourcesContent":["import type { ProgressBarStyle } from '../../body-helper/style/ProgressBarStyle';\nimport type { IProgressbarColumnBodyDefine } from '../../ts-types/list-table/define/progressbar-define';\nimport type { Group } from '../graphic/group';\nimport type { Icon } from '../graphic/icon';\nimport { updateImageCellContentWhileResize } from '../group-creater/cell-type/image-cell';\nimport { createProgressBarCell } from '../group-creater/cell-type/progress-bar-cell';\nimport { createSparkLineCellGroup } from '../group-creater/cell-type/spark-line-cell';\nimport type { Scenegraph } from '../scenegraph';\nimport { getCellMergeInfo } from '../utils/get-cell-merge';\nimport { getProp } from '../utils/get-prop';\nimport { getPadding } from '../utils/padding';\nimport { updateCellContentWidth } from '../utils/text-icon-layout';\nimport { updateCellHeightForRow } from './update-height';\n// import { updateAutoRowHeight } from './auto-height';\n\n/**\n * @description: 更新指定列列宽,在拖拽调整列宽中使用\n * @param {Scenegraph} scene\n * @param {number} col\n * @param {number} detaX\n * @return {*}\n */\nexport function updateColWidth(scene: Scenegraph, col: number, detaX: number) {\n // getColWidth会进行Math.round,所以先从colWidthsMap获取:\n // 如果是数值,直接使用;如果不是,则通过getColWidth获取像素值\n // const widthCache = (scene.table as any).colWidthsMap.get(col);\n // let width = 0;\n // if (typeof widthCache === 'number') {\n // width = widthCache;\n // } else {\n // width = scene.table.getColWidth(col);\n // }\n\n const { autoRowHeight } = scene.table.internalProps;\n let needRerangeRow = false;\n const colOrCornerHeaderColumn = scene.getColGroup(col, true) as Group;\n const oldColOrCornerHeaderColumnWidth = colOrCornerHeaderColumn.attribute.width;\n colOrCornerHeaderColumn?.setAttribute('width', oldColOrCornerHeaderColumnWidth + detaX);\n // 更新单元格宽度\n colOrCornerHeaderColumn?.forEachChildren((cell: Group, index: number) => {\n const isHeightChange = updateCellWidth(\n scene,\n cell,\n col,\n // index,\n cell.row,\n oldColOrCornerHeaderColumnWidth,\n detaX,\n // true\n index < scene.table.columnHeaderLevelCount,\n autoRowHeight\n );\n if (isHeightChange) {\n const mergeInfo = getCellMergeInfo(scene.table, cell.col, cell.row);\n if (mergeInfo && mergeInfo.end.row - mergeInfo.start.row) {\n for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {\n resetRowHeight(scene, row);\n }\n } else {\n resetRowHeight(scene, cell.row);\n }\n needRerangeRow = true;\n }\n });\n\n if (needRerangeRow) {\n let newTotalHeight = 0;\n for (let col = 0; col < scene.table.colCount; col++) {\n const colGroup = scene.getColGroup(col, true);\n let y = 0;\n colGroup.forEachChildren((cellGroup: Group) => {\n if (cellGroup.role !== 'cell') {\n return;\n }\n cellGroup.setAttribute('y', y);\n y += cellGroup.attribute.height;\n });\n newTotalHeight = y;\n }\n scene.updateContainerHeight(0, newTotalHeight - scene.colHeaderGroup.attribute.height);\n }\n\n needRerangeRow = false;\n const rowHeaderOrBodyColumn = scene.getColGroup(col) as Group;\n const oldRowHeaderOrBodyColumn = rowHeaderOrBodyColumn.attribute.width;\n rowHeaderOrBodyColumn?.setAttribute('width', oldRowHeaderOrBodyColumn + detaX);\n rowHeaderOrBodyColumn?.forEachChildren((cell: Group, index: number) => {\n const isHeightChange = updateCellWidth(\n scene,\n cell,\n // col + (!isRowHeader ? scene.table.frozenColCount : 0),\n cell.col,\n // index + scene.table.frozenRowCount,\n cell.row,\n oldRowHeaderOrBodyColumn,\n detaX,\n // isRowHeader\n col < scene.table.rowHeaderLevelCount,\n autoRowHeight\n );\n if (isHeightChange) {\n const mergeInfo = getCellMergeInfo(scene.table, cell.col, cell.row);\n if (mergeInfo && mergeInfo.end.row - mergeInfo.start.row) {\n for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {\n resetRowHeight(scene, row);\n }\n } else {\n resetRowHeight(scene, cell.row);\n }\n needRerangeRow = true;\n }\n });\n\n if (needRerangeRow) {\n let newTotalHeight = 0;\n for (let col = 0; col < scene.table.colCount; col++) {\n const colGroup = scene.getColGroup(col, false);\n let y = 0;\n colGroup.forEachChildren((cellGroup: Group) => {\n if (cellGroup.role !== 'cell') {\n return;\n }\n cellGroup.setAttribute('y', y);\n y += cellGroup.attribute.height;\n });\n newTotalHeight = y;\n }\n scene.updateContainerHeight(scene.table.frozenRowCount, newTotalHeight - scene.bodyGroup.attribute.height);\n }\n\n // 更新剩余列位置\n if (col < scene.frozenColCount) {\n scene.cornerHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n scene.rowHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n } else {\n scene.colHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n scene.bodyGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n\n scene.table.setColWidth(col, rowHeaderOrBodyColumn.attribute.width, true);\n}\n\n/**\n * @description: 更新单个单元格宽度\n * @return {*}\n */\nfunction updateCellWidth(\n scene: Scenegraph,\n cell: Group,\n col: number,\n row: number,\n width: number, // old width, not dist\n detaX: number,\n isHeader: boolean,\n // autoColWidth: boolean,\n autoRowHeight: boolean\n): boolean {\n let cellGroup;\n let distWidth;\n const mergeInfo = getCellMergeInfo(scene.table, col, row);\n // TO BE FIXED 这里使用横向和纵向来判断单元格merge情况,目前没有横纵都merge的情况,\n // 如果有这里的逻辑要修改\n if (mergeInfo && mergeInfo.end.col - mergeInfo.start.col) {\n // 更新横向merge cell width\n const mergeCell = scene.getCell(mergeInfo.start.col, mergeInfo.start.row);\n const mergeCellWidth = mergeCell.attribute.width;\n mergeCell.setAttribute('width', mergeCellWidth + detaX);\n\n cellGroup = mergeCell;\n distWidth = mergeCell.attribute.width;\n col = cellGroup.col;\n row = cellGroup.row;\n } else if (mergeInfo && mergeInfo.start.row === row) {\n // 更新纵向merge cell width,只更新一次\n cell.setAttribute('width', width + detaX);\n\n cellGroup = cell;\n distWidth = width + detaX;\n col = cellGroup.col;\n row = cellGroup.row;\n } else if (!mergeInfo) {\n cell.setAttribute('width', width + detaX);\n cellGroup = cell;\n distWidth = width + detaX;\n }\n\n if (!cellGroup) {\n // 合并单元格非主单元格,不处理\n return false;\n }\n\n // 更新单元格布局\n const type = scene.table.isHeader(col, row)\n ? scene.table._getHeaderLayoutMap(col, row).headerType\n : scene.table.getBodyColumnType(col, row);\n let isHeightChange = false;\n if (type === 'progressbar') {\n // 目前先采用重新生成节点的方案\n const columnDefine = scene.table.getBodyColumnDefine(col, row) as IProgressbarColumnBodyDefine;\n const style = scene.table._getCellStyle(col, row) as ProgressBarStyle;\n const value = scene.table.getCellValue(col, row);\n const dataValue = scene.table.getCellOriginValue(col, row);\n const padding = getPadding(getProp('padding', style, col, row, scene.table));\n\n const newBarCell = createProgressBarCell(\n columnDefine,\n style,\n cellGroup.attribute.width,\n // cellGroup.attribute.height,\n value,\n dataValue,\n col,\n row,\n padding,\n scene.table\n );\n\n const oldBarCell = cellGroup.getChildByName('progress-bar') as Group;\n // cell.replaceChild(newBarCell, oldBarCell);\n cellGroup.insertBefore(newBarCell, oldBarCell);\n cellGroup.removeChild(oldBarCell);\n oldBarCell.removeAllChild();\n oldBarCell.release();\n } else if (type === 'sparkline') {\n // 目前先采用重新生成节点的方案\n cellGroup.removeAllChild();\n const headerStyle = scene.table._getCellStyle(col, row);\n const padding = getPadding(getProp('padding', headerStyle, col, row, scene.table));\n createSparkLineCellGroup(\n cellGroup,\n cellGroup.parent,\n cellGroup.attribute.x,\n cellGroup.attribute.y,\n col,\n row,\n cellGroup.attribute.width,\n cellGroup.attribute.height,\n padding,\n scene.table\n );\n } else if (type === 'image' || type === 'video') {\n // // 只更新背景边框\n // const rect = cell.firstChild as Rect;\n // rect.setAttribute('width', cell.attribute.width);\n updateImageCellContentWhileResize(cellGroup, col, row, scene.table);\n } else {\n // 处理文字\n const style = scene.table._getCellStyle(col, row);\n isHeightChange = updateCellContentWidth(\n cellGroup,\n distWidth,\n detaX,\n autoRowHeight,\n getPadding(style.padding as number),\n style.textAlign,\n style.textBaseline,\n scene\n );\n }\n\n return isHeightChange;\n}\n\n/**\n * @description: 重置指定行行高\n * @param {Scenegraph} scene\n * @param {number} row\n * @return {*}\n */\nfunction resetRowHeight(scene: Scenegraph, row: number) {\n let maxHeight = 0;\n // 获取高度\n for (let col = 0; col < scene.table.colCount; col++) {\n const cell = scene.highPerformanceGetCell(col, row);\n let cellHeight = getCleanCellHeight(cell, scene);\n const mergeInfo = getCellMergeInfo(scene.table, col, row);\n if (mergeInfo && mergeInfo.end.row - mergeInfo.start.row) {\n cellHeight = cellHeight / (mergeInfo.end.row - mergeInfo.start.row + 1);\n }\n maxHeight = Math.max(maxHeight, cellHeight);\n }\n\n // 更新高度\n for (let col = 0; col < scene.table.colCount; col++) {\n let distHeight = maxHeight;\n const cell = scene.highPerformanceGetCell(col, row);\n const mergeInfo = getCellMergeInfo(scene.table, col, row);\n if (mergeInfo && mergeInfo.end.row - mergeInfo.start.row) {\n for (let rowIndex = mergeInfo.start.row; rowIndex <= mergeInfo.end.row; rowIndex++) {\n if (rowIndex !== row) {\n distHeight += scene.table.getRowHeight(rowIndex);\n }\n }\n }\n updateCellHeightForRow(scene, cell, col, row, distHeight, 0, scene.table.isHeader(col, row));\n }\n\n // 更新table行高存储\n scene.table.setRowHeight(row, maxHeight, true);\n}\n\nfunction getCleanCellHeight(cell: Group, scene: Scenegraph) {\n let maxHeight = 0;\n cell.forEachChildren((child: Icon) => {\n if (\n child.role === 'icon-left' ||\n child.role === 'icon-right' ||\n child.name === 'text' ||\n child.name === 'content'\n ) {\n maxHeight = Math.max(maxHeight, child.AABBBounds.height());\n }\n });\n\n const padding = getPadding(scene.table._getCellStyle(cell.col, cell.row).padding as number);\n return maxHeight + padding[0] + padding[2];\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["scenegraph/layout/update-width.ts"],"names":[],"mappings":";;;AAIA,sEAA0F;AAC1F,oFAAqF;AACrF,gFAAsF;AAEtF,4DAA2D;AAC3D,gDAA4C;AAC5C,8CAAgD;AAChD,gEAAmE;AACnE,mDAAyD;AAUzD,SAAgB,cAAc,CAAC,KAAiB,EAAE,GAAW,EAAE,KAAa;IAW1E,MAAM,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC;IACpD,IAAI,cAAc,GAAG,KAAK,CAAC;IAC3B,MAAM,uBAAuB,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE,IAAI,CAAU,CAAC;IACtE,MAAM,+BAA+B,GAAG,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,SAAS,CAAC,KAAK,CAAC;IACjF,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,YAAY,CAAC,OAAO,EAAE,+BAA+B,GAAG,KAAK,CAAC,CAAC;IAExF,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,eAAe,CAAC,CAAC,IAAW,EAAE,KAAa,EAAE,EAAE;QACtE,MAAM,cAAc,GAAG,eAAe,CACpC,KAAK,EACL,IAAI,EACJ,GAAG,EAEH,IAAI,CAAC,GAAG,EACR,+BAA+B,EAC/B,KAAK,EAEL,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,sBAAsB,EAC1C,aAAa,CACd,CAAC;QACF,IAAI,cAAc,EAAE;YAClB,MAAM,SAAS,GAAG,IAAA,iCAAgB,EAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;YACpE,IAAI,SAAS,IAAI,SAAS,CAAC,GAAG,CAAC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rB,KAAK,CAAC,IAAI,KAAK,SAAS,EACxB;YACA,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,KAAK,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;SAC5D;IACH,CAAC,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,IAAA,sBAAY,EAAC,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,OAAiB,CAAC,CAAC;IAC9F,OAAO,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAC7C,CAAC","file":"update-width.js","sourcesContent":["import type { ProgressBarStyle } from '../../body-helper/style/ProgressBarStyle';\nimport type { IProgressbarColumnBodyDefine } from '../../ts-types/list-table/define/progressbar-define';\nimport type { Group } from '../graphic/group';\nimport type { Icon } from '../graphic/icon';\nimport { updateImageCellContentWhileResize } from '../group-creater/cell-type/image-cell';\nimport { createProgressBarCell } from '../group-creater/cell-type/progress-bar-cell';\nimport { createSparkLineCellGroup } from '../group-creater/cell-type/spark-line-cell';\nimport type { Scenegraph } from '../scenegraph';\nimport { getCellMergeInfo } from '../utils/get-cell-merge';\nimport { getProp } from '../utils/get-prop';\nimport { getQuadProps } from '../utils/padding';\nimport { updateCellContentWidth } from '../utils/text-icon-layout';\nimport { updateCellHeightForRow } from './update-height';\n// import { updateAutoRowHeight } from './auto-height';\n\n/**\n * @description: 更新指定列列宽,在拖拽调整列宽中使用\n * @param {Scenegraph} scene\n * @param {number} col\n * @param {number} detaX\n * @return {*}\n */\nexport function updateColWidth(scene: Scenegraph, col: number, detaX: number) {\n // getColWidth会进行Math.round,所以先从colWidthsMap获取:\n // 如果是数值,直接使用;如果不是,则通过getColWidth获取像素值\n // const widthCache = (scene.table as any).colWidthsMap.get(col);\n // let width = 0;\n // if (typeof widthCache === 'number') {\n // width = widthCache;\n // } else {\n // width = scene.table.getColWidth(col);\n // }\n\n const { autoRowHeight } = scene.table.internalProps;\n let needRerangeRow = false;\n const colOrCornerHeaderColumn = scene.getColGroup(col, true) as Group;\n const oldColOrCornerHeaderColumnWidth = colOrCornerHeaderColumn?.attribute.width;\n colOrCornerHeaderColumn?.setAttribute('width', oldColOrCornerHeaderColumnWidth + detaX);\n // 更新单元格宽度\n colOrCornerHeaderColumn?.forEachChildren((cell: Group, index: number) => {\n const isHeightChange = updateCellWidth(\n scene,\n cell,\n col,\n // index,\n cell.row,\n oldColOrCornerHeaderColumnWidth,\n detaX,\n // true\n index < scene.table.columnHeaderLevelCount,\n autoRowHeight\n );\n if (isHeightChange) {\n const mergeInfo = getCellMergeInfo(scene.table, cell.col, cell.row);\n if (mergeInfo && mergeInfo.end.row - mergeInfo.start.row) {\n for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {\n resetRowHeight(scene, row);\n }\n } else {\n resetRowHeight(scene, cell.row);\n }\n needRerangeRow = true;\n }\n });\n\n if (needRerangeRow) {\n let newTotalHeight = 0;\n for (let col = 0; col < scene.table.colCount; col++) {\n const colGroup = scene.getColGroup(col, true);\n let y = 0;\n colGroup.forEachChildren((cellGroup: Group) => {\n if (cellGroup.role !== 'cell') {\n return;\n }\n cellGroup.setAttribute('y', y);\n y += cellGroup.attribute.height;\n });\n newTotalHeight = y;\n }\n scene.updateContainerHeight(0, newTotalHeight - scene.colHeaderGroup.attribute.height);\n }\n\n needRerangeRow = false;\n const rowHeaderOrBodyColumn = scene.getColGroup(col) as Group;\n const oldRowHeaderOrBodyColumn = rowHeaderOrBodyColumn.attribute.width;\n rowHeaderOrBodyColumn?.setAttribute('width', oldRowHeaderOrBodyColumn + detaX);\n rowHeaderOrBodyColumn?.forEachChildren((cell: Group, index: number) => {\n const isHeightChange = updateCellWidth(\n scene,\n cell,\n // col + (!isRowHeader ? scene.table.frozenColCount : 0),\n cell.col,\n // index + scene.table.frozenRowCount,\n cell.row,\n oldRowHeaderOrBodyColumn,\n detaX,\n // isRowHeader\n col < scene.table.rowHeaderLevelCount,\n autoRowHeight\n );\n if (isHeightChange) {\n const mergeInfo = getCellMergeInfo(scene.table, cell.col, cell.row);\n if (mergeInfo && mergeInfo.end.row - mergeInfo.start.row) {\n for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {\n resetRowHeight(scene, row);\n }\n } else {\n resetRowHeight(scene, cell.row);\n }\n needRerangeRow = true;\n }\n });\n\n if (needRerangeRow) {\n let newTotalHeight = 0;\n for (let col = 0; col < scene.table.colCount; col++) {\n const colGroup = scene.getColGroup(col, false);\n let y = 0;\n colGroup.forEachChildren((cellGroup: Group) => {\n if (cellGroup.role !== 'cell') {\n return;\n }\n cellGroup.setAttribute('y', y);\n y += cellGroup.attribute.height;\n });\n newTotalHeight = y;\n }\n scene.updateContainerHeight(scene.table.frozenRowCount, newTotalHeight - scene.bodyGroup.attribute.height);\n }\n\n // 更新剩余列位置\n if (col < scene.frozenColCount) {\n scene.cornerHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n scene.rowHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n } else {\n scene.colHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n scene.bodyGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n\n scene.table.setColWidth(col, rowHeaderOrBodyColumn.attribute.width, true);\n}\n\n/**\n * @description: 更新单个单元格宽度\n * @return {*}\n */\nfunction updateCellWidth(\n scene: Scenegraph,\n cell: Group,\n col: number,\n row: number,\n width: number, // old width, not dist\n detaX: number,\n isHeader: boolean,\n // autoColWidth: boolean,\n autoRowHeight: boolean\n): boolean {\n let cellGroup;\n let distWidth;\n const mergeInfo = getCellMergeInfo(scene.table, col, row);\n // TO BE FIXED 这里使用横向和纵向来判断单元格merge情况,目前没有横纵都merge的情况,\n // 如果有这里的逻辑要修改\n if (mergeInfo && mergeInfo.end.col - mergeInfo.start.col) {\n // 更新横向merge cell width\n const mergeCell = scene.getCell(mergeInfo.start.col, mergeInfo.start.row);\n const mergeCellWidth = mergeCell.attribute.width;\n mergeCell.setAttribute('width', mergeCellWidth + detaX);\n\n cellGroup = mergeCell;\n distWidth = mergeCell.attribute.width;\n col = cellGroup.col;\n row = cellGroup.row;\n } else if (mergeInfo && mergeInfo.start.row === row) {\n // 更新纵向merge cell width,只更新一次\n cell.setAttribute('width', width + detaX);\n\n cellGroup = cell;\n distWidth = width + detaX;\n col = cellGroup.col;\n row = cellGroup.row;\n } else if (!mergeInfo) {\n cell.setAttribute('width', width + detaX);\n cellGroup = cell;\n distWidth = width + detaX;\n }\n\n if (!cellGroup) {\n // 合并单元格非主单元格,不处理\n return false;\n }\n\n // 更新单元格布局\n const type = scene.table.isHeader(col, row)\n ? scene.table._getHeaderLayoutMap(col, row).headerType\n : scene.table.getBodyColumnType(col, row);\n let isHeightChange = false;\n if (type === 'progressbar') {\n // 目前先采用重新生成节点的方案\n const columnDefine = scene.table.getBodyColumnDefine(col, row) as IProgressbarColumnBodyDefine;\n const style = scene.table._getCellStyle(col, row) as ProgressBarStyle;\n const value = scene.table.getCellValue(col, row);\n const dataValue = scene.table.getCellOriginValue(col, row);\n const padding = getQuadProps(getProp('padding', style, col, row, scene.table));\n\n const newBarCell = createProgressBarCell(\n columnDefine,\n style,\n cellGroup.attribute.width,\n // cellGroup.attribute.height,\n value,\n dataValue,\n col,\n row,\n padding,\n scene.table\n );\n\n const oldBarCell = cellGroup.getChildByName('progress-bar') as Group;\n // cell.replaceChild(newBarCell, oldBarCell);\n cellGroup.insertBefore(newBarCell, oldBarCell);\n cellGroup.removeChild(oldBarCell);\n oldBarCell.removeAllChild();\n oldBarCell.release();\n } else if (type === 'sparkline') {\n // 目前先采用重新生成节点的方案\n cellGroup.removeAllChild();\n const headerStyle = scene.table._getCellStyle(col, row);\n const padding = getQuadProps(getProp('padding', headerStyle, col, row, scene.table));\n createSparkLineCellGroup(\n cellGroup,\n cellGroup.parent,\n cellGroup.attribute.x,\n cellGroup.attribute.y,\n col,\n row,\n cellGroup.attribute.width,\n cellGroup.attribute.height,\n padding,\n scene.table\n );\n } else if (type === 'image' || type === 'video') {\n // // 只更新背景边框\n // const rect = cell.firstChild as Rect;\n // rect.setAttribute('width', cell.attribute.width);\n updateImageCellContentWhileResize(cellGroup, col, row, scene.table);\n } else {\n // 处理文字\n const style = scene.table._getCellStyle(col, row);\n isHeightChange = updateCellContentWidth(\n cellGroup,\n distWidth,\n detaX,\n autoRowHeight,\n getQuadProps(style.padding as number),\n style.textAlign,\n style.textBaseline,\n scene\n );\n }\n\n return isHeightChange;\n}\n\n/**\n * @description: 重置指定行行高\n * @param {Scenegraph} scene\n * @param {number} row\n * @return {*}\n */\nfunction resetRowHeight(scene: Scenegraph, row: number) {\n let maxHeight = 0;\n // 获取高度\n for (let col = 0; col < scene.table.colCount; col++) {\n const cell = scene.highPerformanceGetCell(col, row);\n let cellHeight = getCleanCellHeight(cell, scene);\n const mergeInfo = getCellMergeInfo(scene.table, col, row);\n if (mergeInfo && mergeInfo.end.row - mergeInfo.start.row) {\n cellHeight = cellHeight / (mergeInfo.end.row - mergeInfo.start.row + 1);\n }\n maxHeight = Math.max(maxHeight, cellHeight);\n }\n\n // 更新高度\n for (let col = 0; col < scene.table.colCount; col++) {\n let distHeight = maxHeight;\n const cell = scene.highPerformanceGetCell(col, row);\n const mergeInfo = getCellMergeInfo(scene.table, col, row);\n if (mergeInfo && mergeInfo.end.row - mergeInfo.start.row) {\n for (let rowIndex = mergeInfo.start.row; rowIndex <= mergeInfo.end.row; rowIndex++) {\n if (rowIndex !== row) {\n distHeight += scene.table.getRowHeight(rowIndex);\n }\n }\n }\n updateCellHeightForRow(scene, cell, col, row, distHeight, 0, scene.table.isHeader(col, row));\n }\n\n // 更新table行高存储\n scene.table.setRowHeight(row, maxHeight, true);\n}\n\nfunction getCleanCellHeight(cell: Group, scene: Scenegraph) {\n let maxHeight = 0;\n cell.forEachChildren((child: Icon) => {\n if (\n child.role === 'icon-left' ||\n child.role === 'icon-right' ||\n child.name === 'text' ||\n child.name === 'content'\n ) {\n maxHeight = Math.max(maxHeight, child.AABBBounds.height());\n }\n });\n\n const padding = getQuadProps(scene.table._getCellStyle(cell.col, cell.row).padding as number);\n return maxHeight + padding[0] + padding[2];\n}\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function updateChartSize(scenegraph, col) {
|
|
4
|
+
var _a;
|
|
5
|
+
for (let c = col; c < scenegraph.table.colCount; c++) {
|
|
6
|
+
const columnGroup = scenegraph.getColGroup(c);
|
|
7
|
+
(null === (_a = columnGroup.attribute) || void 0 === _a ? void 0 : _a.chartInstance) && columnGroup.getChildren().forEach((cellNode => {
|
|
8
|
+
const width = scenegraph.table.getColWidth(cellNode.col), height = scenegraph.table.getRowHeight(cellNode.row);
|
|
9
|
+
cellNode.children.forEach((node => {
|
|
10
|
+
"chart" === node.type && (node.cacheCanvas = null, node.setAttribute("width", Math.ceil(width - node.attribute.cellPadding[3] - node.attribute.cellPadding[1])),
|
|
11
|
+
node.setAttribute("height", Math.ceil(height - node.attribute.cellPadding[0] - node.attribute.cellPadding[2])),
|
|
12
|
+
node.setAttribute("viewBox", {
|
|
13
|
+
x1: Math.ceil(cellNode.globalAABBBounds.x1 + node.attribute.cellPadding[3] + scenegraph.table.scrollLeft),
|
|
14
|
+
x2: Math.ceil(cellNode.globalAABBBounds.x1 + width - node.attribute.cellPadding[1] + scenegraph.table.scrollLeft),
|
|
15
|
+
y1: Math.ceil(cellNode.globalAABBBounds.y1 + node.attribute.cellPadding[0] + scenegraph.table.scrollTop),
|
|
16
|
+
y2: Math.ceil(cellNode.globalAABBBounds.y1 + height - node.attribute.cellPadding[2] + scenegraph.table.scrollTop)
|
|
17
|
+
}));
|
|
18
|
+
}));
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
Object.defineProperty(exports, "__esModule", {
|
|
24
|
+
value: !0
|
|
25
|
+
}), exports.updateChartSize = void 0, exports.updateChartSize = updateChartSize;
|
|
26
|
+
//# sourceMappingURL=update-chart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["scenegraph/refresh-node/update-chart.ts"],"names":[],"mappings":";;;AAKA,SAAgB,eAAe,CAAC,UAAsB,EAAE,GAAW;;IAEjE,KAAK,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE;QACpD,MAAM,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;QAC9C,MAAM,aAAa,GAAG,MAAC,WAAW,CAAC,SAAiB,0CAAE,aAAa,CAAC;QACpE,IAAI,aAAa,EAAE;YAEjB,WAAW,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,CAAC,QAAe,EAAE,EAAE;gBACpD,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;gBACzD,MAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;gBAE3D,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,IAAW,EAAE,EAAE;oBACxC,IAAK,IAAY,CAAC,IAAI,KAAK,OAAO,EAAE;wBAoBlC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;wBACxB,IAAI,CAAC,YAAY,CACf,OAAO,EACP,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CACjF,CAAC;wBACF,IAAI,CAAC,YAAY,CACf,QAAQ,EACR,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAClF,CAAC;wBAEF,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE;4BAC3B,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC;4BACzG,EAAE,EAAE,IAAI,CAAC,IAAI,CACX,QAAQ,CAAC,gBAAgB,CAAC,EAAE,GAAG,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,UAAU,CACnG;4BACD,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC;4BACxG,EAAE,EAAE,IAAI,CAAC,IAAI,CACX,QAAQ,CAAC,gBAAgB,CAAC,EAAE,GAAG,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,SAAS,CACnG;yBACF,CAAC,CAAC;qBACJ;gBACH,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;SACJ;KACF;AACH,CAAC;AAzDD,0CAyDC","file":"update-chart.js","sourcesContent":["import type { Chart } from '../graphic/chart';\nimport type { Group } from '../graphic/group';\nimport type { Scenegraph } from '../scenegraph';\n\n/** 供调整列宽后更新chart使用 */\nexport function updateChartSize(scenegraph: Scenegraph, col: number) {\n // 将调整列宽的后面的面也都一起需要调整viewbox。 TODO:columnResizeType支持后需要根据变化的列去调整,范围可能变多或者变少\n for (let c = col; c < scenegraph.table.colCount; c++) {\n const columnGroup = scenegraph.getColGroup(c);\n const chartInstance = (columnGroup.attribute as any)?.chartInstance;\n if (chartInstance) {\n // chartInstance.updateViewBox();\n columnGroup.getChildren().forEach((cellNode: Group) => {\n const width = scenegraph.table.getColWidth(cellNode.col);\n const height = scenegraph.table.getRowHeight(cellNode.row);\n\n cellNode.children.forEach((node: Chart) => {\n if ((node as any).type === 'chart') {\n // 调试问题使用\n // if (columnGroup.col === 2) {\n // columnGroup.AABBBounds.width();\n // node.AABBBounds.width();\n // console.log(\n // 'set viewbox y1',\n // Math.ceil(cellNode.globalAABBBounds.y1 + node.attribute.cellPadding[0] + scenegraph.table.scrollTop),\n // node.globalAABBBounds.height()\n // );\n\n // console.log(\n // 'updateChartSize',\n // columnGroup,\n // columnGroup.globalAABBBounds.y1,\n // cellNode.globalAABBBounds.y1,\n // node.globalAABBBounds.y1\n // );\n // }\n\n node.cacheCanvas = null;\n node.setAttribute(\n 'width',\n Math.ceil(width - node.attribute.cellPadding[3] - node.attribute.cellPadding[1])\n );\n node.setAttribute(\n 'height',\n Math.ceil(height - node.attribute.cellPadding[0] - node.attribute.cellPadding[2])\n );\n\n node.setAttribute('viewBox', {\n x1: Math.ceil(cellNode.globalAABBBounds.x1 + node.attribute.cellPadding[3] + scenegraph.table.scrollLeft),\n x2: Math.ceil(\n cellNode.globalAABBBounds.x1 + width - node.attribute.cellPadding[1] + scenegraph.table.scrollLeft\n ),\n y1: Math.ceil(cellNode.globalAABBBounds.y1 + node.attribute.cellPadding[0] + scenegraph.table.scrollTop),\n y2: Math.ceil(\n cellNode.globalAABBBounds.y1 + height - node.attribute.cellPadding[2] + scenegraph.table.scrollTop\n )\n });\n }\n });\n });\n }\n }\n}\n"]}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import type { IStage, IRect } from '@visactor/vrender';
|
|
2
|
-
import type
|
|
2
|
+
import { type CellAddress, type CellType, type ColumnIconOption, type SortOrder, IconFuncTypeEnum } from '../ts-types';
|
|
3
3
|
import { Group } from './graphic/group';
|
|
4
4
|
import type { Icon } from './graphic/icon';
|
|
5
5
|
import { TableComponent } from './component/table-component';
|
|
6
6
|
import { SceneProxy } from './group-creater/progress/proxy';
|
|
7
7
|
import type { BaseTableAPI } from '../ts-types/base-table';
|
|
8
|
-
export
|
|
8
|
+
export type MergeMap = Map<string, {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
cellWidth: number;
|
|
12
|
+
cellHeight: number;
|
|
13
|
+
}>;
|
|
9
14
|
export declare class Scenegraph {
|
|
10
15
|
proxy: SceneProxy;
|
|
11
16
|
tableGroup: Group;
|
|
@@ -32,6 +37,7 @@ export declare class Scenegraph {
|
|
|
32
37
|
frozenColCount: number;
|
|
33
38
|
frozenRowCount: number;
|
|
34
39
|
clear: boolean;
|
|
40
|
+
mergeMap: MergeMap;
|
|
35
41
|
constructor(table: BaseTableAPI);
|
|
36
42
|
get width(): number;
|
|
37
43
|
get height(): number;
|
|
@@ -40,6 +46,7 @@ export declare class Scenegraph {
|
|
|
40
46
|
get bodyRowStart(): number;
|
|
41
47
|
get bodyRowEnd(): number;
|
|
42
48
|
initSceneGraph(): void;
|
|
49
|
+
clearCells(): void;
|
|
43
50
|
createComponent(): void;
|
|
44
51
|
createSceneGraph(): void;
|
|
45
52
|
createHeaderSceneGraph(): void;
|
|
@@ -73,7 +80,10 @@ export declare class Scenegraph {
|
|
|
73
80
|
setIconHoverStyle(icon: Icon, col: number, row: number, cellGroup: Group): void;
|
|
74
81
|
setIconNormalStyle(icon: Icon, col: number, row: number): void;
|
|
75
82
|
updateColWidth(col: number, detaX: number): void;
|
|
83
|
+
updateChartSize(col: number): void;
|
|
76
84
|
updateAutoColWidth(col: number): void;
|
|
85
|
+
recalculateColWidths(): void;
|
|
86
|
+
resize(): void;
|
|
77
87
|
updateTableSize(): void;
|
|
78
88
|
updateRowHeight(row: number, detaY: number): void;
|
|
79
89
|
updateContainerWidth(col: number, detaX: number): void;
|
|
@@ -90,7 +100,6 @@ export declare class Scenegraph {
|
|
|
90
100
|
updateCellLayoutWidthCertainWidth(columnGroup: Group, detaRow: number, col: number): boolean;
|
|
91
101
|
updateHeaderPosition(colSource: number, rowSource: number, colTarget: number, rowTarget: number): void;
|
|
92
102
|
updateContainer(): void;
|
|
93
|
-
clearCells(): void;
|
|
94
103
|
updateCellContentWhileResize(col: number, row: number): void;
|
|
95
104
|
createFrameBorder(): void;
|
|
96
105
|
getResizeColAt(abstractX: number, abstractY: number, cellGroup?: Group, offset?: number): {
|
|
@@ -108,4 +117,7 @@ export declare class Scenegraph {
|
|
|
108
117
|
updateDrill(visible: boolean, x: number, y: number, drillDown: boolean, drillUp: boolean): void;
|
|
109
118
|
updateCellContent(col: number, row: number): void;
|
|
110
119
|
setPixelRatio(pixelRatio: number): void;
|
|
120
|
+
updateHierarchyIcon(col: number, row: number): void;
|
|
121
|
+
updateRow(removeCells: CellAddress[], addCells: CellAddress[]): void;
|
|
122
|
+
findAndUpdateIcon(group: Group, funcTypeArr: IconFuncTypeEnum[], iconConfig: ColumnIconOption): void;
|
|
111
123
|
}
|
|
@@ -8,16 +8,16 @@ var __importDefault = this && this.__importDefault || function(mod) {
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", {
|
|
10
10
|
value: !0
|
|
11
|
-
}), exports.Scenegraph =
|
|
11
|
+
}), exports.Scenegraph = void 0;
|
|
12
12
|
|
|
13
|
-
const vrender_1 = require("@visactor/vrender"), group_1 = require("./graphic/group"), column_1 = require("./group-creater/column"), auto_height_1 = require("./layout/auto-height"), get_cell_merge_1 = require("./utils/get-cell-merge"), update_width_1 = require("./layout/update-width"), table_component_1 = require("./component/table-component"), update_height_1 = require("./layout/update-height"), image_cell_1 = require("./group-creater/cell-type/image-cell"), padding_1 = require("./utils/padding"), frame_border_1 = require("./style/frame-border"), global_1 = require("../tools/global"), contributions_1 = __importDefault(require("./graphic/contributions")), get_prop_1 = require("./utils/get-prop"), text_icon_layout_1 = require("./utils/text-icon-layout"), proxy_1 = require("./group-creater/progress/proxy"), compute_col_width_1 = require("./layout/compute-col-width"), move_cell_1 = require("./layout/move-cell"), cell_helper_1 = require("./group-creater/cell-helper"), update_select_border_1 = require("./select/update-select-border"), create_select_border_1 = require("./select/create-select-border"), move_select_border_1 = require("./select/move-select-border"), delete_select_border_1 = require("./select/delete-select-border"), stick_text_1 = require("./stick-text");
|
|
13
|
+
const vrender_1 = require("@visactor/vrender"), ts_types_1 = require("../ts-types"), vutils_1 = require("@visactor/vutils"), group_1 = require("./graphic/group"), column_1 = require("./group-creater/column"), auto_height_1 = require("./layout/auto-height"), get_cell_merge_1 = require("./utils/get-cell-merge"), update_width_1 = require("./layout/update-width"), table_component_1 = require("./component/table-component"), update_height_1 = require("./layout/update-height"), image_cell_1 = require("./group-creater/cell-type/image-cell"), padding_1 = require("./utils/padding"), frame_border_1 = require("./style/frame-border"), global_1 = require("../tools/global"), contributions_1 = __importDefault(require("./graphic/contributions")), get_prop_1 = require("./utils/get-prop"), text_icon_layout_1 = require("./utils/text-icon-layout"), proxy_1 = require("./group-creater/progress/proxy"), compute_col_width_1 = require("./layout/compute-col-width"), move_cell_1 = require("./layout/move-cell"), cell_helper_1 = require("./group-creater/cell-helper"), update_select_border_1 = require("./select/update-select-border"), create_select_border_1 = require("./select/create-select-border"), move_select_border_1 = require("./select/move-select-border"), delete_select_border_1 = require("./select/delete-select-border"), update_row_1 = require("./layout/update-row"), stick_text_1 = require("./stick-text"), empty_group_1 = require("./utils/empty-group"), update_chart_1 = require("./refresh-node/update-chart"), frozen_1 = require("./layout/frozen");
|
|
14
14
|
|
|
15
|
-
vrender_1.container.load(contributions_1.default)
|
|
16
|
-
exports.emptyGroup.role = "empty";
|
|
15
|
+
vrender_1.container.load(contributions_1.default);
|
|
17
16
|
|
|
18
17
|
class Scenegraph {
|
|
19
18
|
constructor(table) {
|
|
20
|
-
this.table = table, this.hasFrozen = !1, this.clear = !0, this.
|
|
19
|
+
this.table = table, this.hasFrozen = !1, this.clear = !0, this.mergeMap = new Map,
|
|
20
|
+
this.stage = (0, vrender_1.createStage)({
|
|
21
21
|
canvas: table.canvas,
|
|
22
22
|
width: table.canvas.width,
|
|
23
23
|
height: table.canvas.height,
|
|
@@ -117,6 +117,37 @@ class Scenegraph {
|
|
|
117
117
|
this.tableGroup.addChild(rowHeaderGroup), this.tableGroup.addChild(colHeaderGroup),
|
|
118
118
|
this.tableGroup.addChild(cornerHeaderGroup), this.tableGroup.addChild(componentGroup);
|
|
119
119
|
}
|
|
120
|
+
clearCells() {
|
|
121
|
+
this.clear = !0, this.hasFrozen = !1, this.mergeMap.clear(), this.colHeaderGroup.clear(),
|
|
122
|
+
this.rowHeaderGroup.clear(), this.cornerHeaderGroup.clear(), this.bodyGroup.clear(),
|
|
123
|
+
this.colHeaderGroup.setAttributes({
|
|
124
|
+
x: 0,
|
|
125
|
+
y: 0,
|
|
126
|
+
width: 0,
|
|
127
|
+
height: 0
|
|
128
|
+
}), this.rowHeaderGroup.setAttributes({
|
|
129
|
+
x: 0,
|
|
130
|
+
y: 0,
|
|
131
|
+
width: 0,
|
|
132
|
+
height: 0
|
|
133
|
+
}), this.cornerHeaderGroup.setAttributes({
|
|
134
|
+
x: 0,
|
|
135
|
+
y: 0,
|
|
136
|
+
width: 0,
|
|
137
|
+
height: 0
|
|
138
|
+
}), this.bodyGroup.setAttributes({
|
|
139
|
+
x: 0,
|
|
140
|
+
y: 0,
|
|
141
|
+
width: 0,
|
|
142
|
+
height: 0
|
|
143
|
+
}), this.tableGroup.setAttributes({
|
|
144
|
+
x: 0,
|
|
145
|
+
y: 0,
|
|
146
|
+
width: 0,
|
|
147
|
+
height: 0
|
|
148
|
+
}), this.tableGroup.border && (this.tableGroup.parent.removeChild(this.tableGroup.border),
|
|
149
|
+
delete this.tableGroup.border);
|
|
150
|
+
}
|
|
120
151
|
createComponent() {
|
|
121
152
|
this.component = new table_component_1.TableComponent(this.table), this.component.addToGroup(this.componentGroup),
|
|
122
153
|
this.selectedRangeComponents = new Map, this.selectingRangeComponents = new Map;
|
|
@@ -124,8 +155,8 @@ class Scenegraph {
|
|
|
124
155
|
createSceneGraph() {
|
|
125
156
|
this.clear = !1, (0, compute_col_width_1.computeColsWidth)(this.table), this.frozenColCount = this.table.rowHeaderLevelCount,
|
|
126
157
|
this.frozenRowCount = this.table.columnHeaderLevelCount, this.proxy = new proxy_1.SceneProxy(this.table),
|
|
127
|
-
|
|
128
|
-
(
|
|
158
|
+
(0, frame_border_1.createFrameBorder)(this.tableGroup, this.table.theme.frameStyle, this.tableGroup.role, void 0, !0),
|
|
159
|
+
this.createHeaderSceneGraph(), this.transpose || this.isPivot ? this.createBodySceneGraph() : this.createBodySceneGraphForFirstScreen();
|
|
129
160
|
}
|
|
130
161
|
createHeaderSceneGraph() {
|
|
131
162
|
(0, column_1.createCornerHeaderColGroup)(this.cornerHeaderGroup, 0, 0, this.table),
|
|
@@ -171,10 +202,10 @@ class Scenegraph {
|
|
|
171
202
|
const range = this.table.getCellRange(col, row);
|
|
172
203
|
cell = this.getCell(range.start.col, range.start.row);
|
|
173
204
|
}
|
|
174
|
-
return cell ||
|
|
205
|
+
return cell || empty_group_1.emptyGroup;
|
|
175
206
|
}
|
|
176
207
|
highPerformanceGetCell(col, row) {
|
|
177
|
-
return this.isPivot || this.transpose || this.table.isHeader(col, row) ? this.getCell(col, row) : this.proxy.highPerformanceGetCell(col, row);
|
|
208
|
+
return this.isPivot || this.transpose || this.table.isHeader(col, row) ? this.getCell(col, row) : this.proxy.highPerformanceGetCell(col, row, 0, this.table.rowCount - 1);
|
|
178
209
|
}
|
|
179
210
|
getColGroup(col, isCornerOrColHeader = !1) {
|
|
180
211
|
let element;
|
|
@@ -260,7 +291,7 @@ class Scenegraph {
|
|
|
260
291
|
width: icon.backgroundWidth,
|
|
261
292
|
height: icon.backgroundHeight,
|
|
262
293
|
fill: icon.attribute.backgroundColor,
|
|
263
|
-
|
|
294
|
+
cornerRadius: 5,
|
|
264
295
|
visible: !0
|
|
265
296
|
}) : (iconBack = (0, vrender_1.createRect)({
|
|
266
297
|
x: (null !== (_d = icon.attribute.x) && void 0 !== _d ? _d : 0) + (null !== (_e = icon.attribute.dx) && void 0 !== _e ? _e : 0) + (icon.AABBBounds.width() - icon.backgroundWidth) / 2,
|
|
@@ -268,7 +299,7 @@ class Scenegraph {
|
|
|
268
299
|
width: icon.backgroundWidth,
|
|
269
300
|
height: icon.backgroundHeight,
|
|
270
301
|
fill: icon.attribute.backgroundColor,
|
|
271
|
-
|
|
302
|
+
cornerRadius: 5,
|
|
272
303
|
pickable: !1,
|
|
273
304
|
visible: !0
|
|
274
305
|
}), iconBack.name = "icon-back"), icon.parent.insertBefore(iconBack, icon);
|
|
@@ -298,12 +329,23 @@ class Scenegraph {
|
|
|
298
329
|
iconBack && iconBack.setAttribute("visible", !1), icon.attribute.hoverImage && icon.attribute.image !== icon.attribute.originImage && (icon.image = icon.attribute.originImage);
|
|
299
330
|
}
|
|
300
331
|
updateColWidth(col, detaX) {
|
|
301
|
-
(0, update_width_1.updateColWidth)(this, col, detaX), this.
|
|
332
|
+
(0, update_width_1.updateColWidth)(this, col, detaX), this.updateContainer();
|
|
333
|
+
}
|
|
334
|
+
updateChartSize(col) {
|
|
335
|
+
(0, update_chart_1.updateChartSize)(this, col);
|
|
302
336
|
}
|
|
303
337
|
updateAutoColWidth(col) {
|
|
304
338
|
const oldWidth = this.table.getColWidth(col), newWidth = (0, compute_col_width_1.computeColWidth)(col, 0, this.table.rowCount - 1, this.table, !0);
|
|
305
339
|
newWidth !== oldWidth && this.updateColWidth(col, newWidth - oldWidth);
|
|
306
340
|
}
|
|
341
|
+
recalculateColWidths() {
|
|
342
|
+
(0, compute_col_width_1.computeColsWidth)(this.table, !0);
|
|
343
|
+
}
|
|
344
|
+
resize() {
|
|
345
|
+
this.recalculateColWidths(), this.table.internalProps.autoRowHeight && (0, auto_height_1.updateAutoRowHeight)(this, !0),
|
|
346
|
+
this.dealWidthMode(), this.dealFrozen(), this.updateTableSize(), this.updateBorderSizeAndPosition(),
|
|
347
|
+
this.component.updateScrollBar(), this.updateNextFrame();
|
|
348
|
+
}
|
|
307
349
|
updateTableSize() {
|
|
308
350
|
var _a, _b;
|
|
309
351
|
this.tableGroup.setAttributes({
|
|
@@ -357,7 +399,9 @@ class Scenegraph {
|
|
|
357
399
|
afterScenegraphCreated() {
|
|
358
400
|
const {autoRowHeight: autoRowHeight} = this.table.internalProps;
|
|
359
401
|
autoRowHeight && (0, auto_height_1.updateAutoRowHeight)(this), this.dealWidthMode(),
|
|
360
|
-
this.dealFrozen(), this.createFrameBorder(), this.
|
|
402
|
+
this.dealFrozen(), this.createFrameBorder(), this.updateBorderSizeAndPosition(),
|
|
403
|
+
this.component.updateScrollBar(), (0, stick_text_1.handleTextStick)(this.table),
|
|
404
|
+
this.updateNextFrame();
|
|
361
405
|
}
|
|
362
406
|
dealWidthMode() {
|
|
363
407
|
const table = this.table;
|
|
@@ -405,51 +449,10 @@ class Scenegraph {
|
|
|
405
449
|
});
|
|
406
450
|
}
|
|
407
451
|
dealFrozen() {
|
|
408
|
-
|
|
409
|
-
if (this.table.frozenColCount > this.table.rowHeaderLevelCount) {
|
|
410
|
-
this.rowHeaderGroup.setAttribute("height", this.bodyGroup.attribute.height), this.rowHeaderGroup.setAttribute("y", this.bodyGroup.attribute.y),
|
|
411
|
-
this.cornerHeaderGroup.setAttribute("height", this.colHeaderGroup.attribute.height);
|
|
412
|
-
for (let i = 0; i < this.table.frozenColCount - this.table.rowHeaderLevelCount; i++) {
|
|
413
|
-
const column = this.bodyGroup.firstChild;
|
|
414
|
-
column && (this.rowHeaderGroup.appendChild(column), this.rowHeaderGroup.setAttribute("width", this.rowHeaderGroup.attribute.width + column.attribute.width),
|
|
415
|
-
this.bodyGroup.setAttribute("width", this.bodyGroup.attribute.width - column.attribute.width));
|
|
416
|
-
const headerColumn = this.colHeaderGroup.firstChild;
|
|
417
|
-
headerColumn && (this.cornerHeaderGroup.appendChild(headerColumn), this.cornerHeaderGroup.setAttribute("width", this.cornerHeaderGroup.attribute.width + headerColumn.attribute.width),
|
|
418
|
-
this.colHeaderGroup.setAttribute("width", this.colHeaderGroup.attribute.width - headerColumn.attribute.width));
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
this.bodyGroup.setAttribute("x", this.rowHeaderGroup.attribute.width), this.colHeaderGroup.setAttribute("x", this.cornerHeaderGroup.attribute.width);
|
|
422
|
-
const bodyDeltaX = null !== (_b = null === (_a = this.bodyGroup.firstChild) || void 0 === _a ? void 0 : _a.attribute.x) && void 0 !== _b ? _b : 0;
|
|
423
|
-
this.bodyGroup.forEachChildrenSkipChild((column => {
|
|
424
|
-
column.setAttribute("x", column.attribute.x - bodyDeltaX);
|
|
425
|
-
}));
|
|
426
|
-
const colDeltaX = null !== (_d = null === (_c = this.colHeaderGroup.firstChild) || void 0 === _c ? void 0 : _c.attribute.x) && void 0 !== _d ? _d : 0;
|
|
427
|
-
this.colHeaderGroup.forEachChildrenSkipChild((column => {
|
|
428
|
-
column.setAttribute("x", column.attribute.x - colDeltaX);
|
|
429
|
-
})), this.updateBorderSizeAndPosition(), this.isPivot || this.transpose || this.component.setFrozenColumnShadow(this.table.frozenColCount - 1),
|
|
430
|
-
this.hasFrozen = !0, this.frozenColCount = this.table.frozenColCount, this.frozenRowCount = null !== (_f = null === (_e = this.colHeaderGroup.firstChild) || void 0 === _e ? void 0 : _e.childrenCount) && void 0 !== _f ? _f : 0;
|
|
452
|
+
(0, frozen_1.dealFrozen)(this);
|
|
431
453
|
}
|
|
432
454
|
resetFrozen() {
|
|
433
|
-
|
|
434
|
-
if (this.frozenColCount > this.table.rowHeaderLevelCount) for (let i = 0; i < this.frozenColCount - this.table.rowHeaderLevelCount; i++) {
|
|
435
|
-
const column = this.rowHeaderGroup.lastChild instanceof group_1.Group ? this.rowHeaderGroup.lastChild : this.rowHeaderGroup.lastChild._prev;
|
|
436
|
-
column && (this.bodyGroup.insertBefore(column, this.bodyGroup.firstChild), this.bodyGroup.setAttribute("width", this.bodyGroup.attribute.width + column.attribute.width),
|
|
437
|
-
this.rowHeaderGroup.setAttribute("width", this.rowHeaderGroup.attribute.width - column.attribute.width));
|
|
438
|
-
const headerColumn = this.cornerHeaderGroup.lastChild instanceof group_1.Group ? this.cornerHeaderGroup.lastChild : this.cornerHeaderGroup.lastChild._prev;
|
|
439
|
-
headerColumn && (this.colHeaderGroup.insertBefore(headerColumn, this.colHeaderGroup.firstChild),
|
|
440
|
-
this.colHeaderGroup.setAttribute("width", this.colHeaderGroup.attribute.width + headerColumn.attribute.width),
|
|
441
|
-
this.cornerHeaderGroup.setAttribute("width", this.cornerHeaderGroup.attribute.width - headerColumn.attribute.width));
|
|
442
|
-
}
|
|
443
|
-
this.bodyGroup.setAttribute("x", this.rowHeaderGroup.attribute.width), this.colHeaderGroup.setAttribute("x", this.cornerHeaderGroup.attribute.width);
|
|
444
|
-
let bodyX = 0;
|
|
445
|
-
this.bodyGroup.forEachChildrenSkipChild((column => {
|
|
446
|
-
column.setAttribute("x", bodyX), bodyX += column.attribute.width;
|
|
447
|
-
}));
|
|
448
|
-
let colX = 0;
|
|
449
|
-
this.colHeaderGroup.forEachChildrenSkipChild((column => {
|
|
450
|
-
column.setAttribute("x", colX), colX += column.attribute.width;
|
|
451
|
-
})), this.updateBorderSizeAndPosition(), this.isPivot || this.transpose || this.component.setFrozenColumnShadow(this.table.frozenColCount - 1),
|
|
452
|
-
this.hasFrozen = !0, this.frozenColCount = this.table.rowHeaderLevelCount, this.frozenRowCount = null !== (_b = null === (_a = this.colHeaderGroup.firstChild) || void 0 === _a ? void 0 : _a.childrenCount) && void 0 !== _b ? _b : 0;
|
|
455
|
+
(0, frozen_1.resetFrozen)(this);
|
|
453
456
|
}
|
|
454
457
|
updateCellLayoutWidthCertainWidth(columnGroup, detaRow, col) {
|
|
455
458
|
const width = columnGroup.attribute.width;
|
|
@@ -458,7 +461,7 @@ class Scenegraph {
|
|
|
458
461
|
row += detaRow;
|
|
459
462
|
const mergeInfo = (0, get_cell_merge_1.getCellMergeInfo)(this.table, col, row);
|
|
460
463
|
mergeInfo ? cellGroup = this.getCell(mergeInfo.start.col, mergeInfo.start.row) : cellGroup.setAttribute("width", width);
|
|
461
|
-
const headerStyle = this.table._getCellStyle(col, row), padding = (0, padding_1.
|
|
464
|
+
const headerStyle = this.table._getCellStyle(col, row), padding = (0, padding_1.getQuadProps)((0,
|
|
462
465
|
get_prop_1.getProp)("padding", headerStyle, col, row, this.table)), text = cellGroup.getChildByName("text");
|
|
463
466
|
let oldCellHeight = 0, newCellHeight = 0;
|
|
464
467
|
if (text) oldCellHeight = text.AABBBounds.height() + (padding[0] + padding[2]),
|
|
@@ -495,41 +498,11 @@ class Scenegraph {
|
|
|
495
498
|
this.colHeaderGroup.setDeltaWidth(colHeaderX - this.colHeaderGroup.attribute.width),
|
|
496
499
|
this.rowHeaderGroup.setDeltaWidth(rowHeaderX - this.rowHeaderGroup.attribute.width),
|
|
497
500
|
this.bodyGroup.setDeltaWidth(bodyX - this.bodyGroup.attribute.width), this.colHeaderGroup.setAttribute("x", this.cornerHeaderGroup.attribute.width),
|
|
498
|
-
this.bodyGroup.setAttribute("x", this.rowHeaderGroup.attribute.width);
|
|
501
|
+
this.bodyGroup.setAttribute("x", this.rowHeaderGroup.attribute.width), this.updateTableSize();
|
|
499
502
|
const oldHorizontalBarPos = this.table.stateManeger.scroll.horizontalBarPos, oldVerticalBarPos = this.table.stateManeger.scroll.verticalBarPos;
|
|
500
503
|
this.component.updateScrollBar(), this.table.stateManeger.setScrollLeft(oldHorizontalBarPos),
|
|
501
504
|
this.table.stateManeger.setScrollTop(oldVerticalBarPos), this.updateNextFrame();
|
|
502
505
|
}
|
|
503
|
-
clearCells() {
|
|
504
|
-
this.clear = !0, this.hasFrozen = !1, this.colHeaderGroup.clear(), this.rowHeaderGroup.clear(),
|
|
505
|
-
this.cornerHeaderGroup.clear(), this.bodyGroup.clear(), this.colHeaderGroup.setAttributes({
|
|
506
|
-
x: 0,
|
|
507
|
-
y: 0,
|
|
508
|
-
width: 0,
|
|
509
|
-
height: 0
|
|
510
|
-
}), this.rowHeaderGroup.setAttributes({
|
|
511
|
-
x: 0,
|
|
512
|
-
y: 0,
|
|
513
|
-
width: 0,
|
|
514
|
-
height: 0
|
|
515
|
-
}), this.cornerHeaderGroup.setAttributes({
|
|
516
|
-
x: 0,
|
|
517
|
-
y: 0,
|
|
518
|
-
width: 0,
|
|
519
|
-
height: 0
|
|
520
|
-
}), this.bodyGroup.setAttributes({
|
|
521
|
-
x: 0,
|
|
522
|
-
y: 0,
|
|
523
|
-
width: 0,
|
|
524
|
-
height: 0
|
|
525
|
-
}), this.tableGroup.setAttributes({
|
|
526
|
-
x: 0,
|
|
527
|
-
y: 0,
|
|
528
|
-
width: 0,
|
|
529
|
-
height: 0
|
|
530
|
-
}), this.tableGroup.border && (this.tableGroup.parent.removeChild(this.tableGroup.border),
|
|
531
|
-
delete this.tableGroup.border);
|
|
532
|
-
}
|
|
533
506
|
updateCellContentWhileResize(col, row) {
|
|
534
507
|
const type = this.table.getBodyColumnType(col, row), cellGroup = this.getCell(col, row);
|
|
535
508
|
"image" !== type && "video" !== type || (0, image_cell_1.updateImageCellContentWhileResize)(cellGroup, col, row, this.table);
|
|
@@ -541,7 +514,7 @@ class Scenegraph {
|
|
|
541
514
|
(0, frame_border_1.createFrameBorder)(this.rowHeaderGroup, this.isPivot ? this.table.theme.rowHeaderStyle.frameStyle : this.table.theme.bodyStyle.frameStyle, this.rowHeaderGroup.role, isListTableWithFrozen ? [ !0, !1, !0, !0 ] : void 0),
|
|
542
515
|
(0, frame_border_1.createFrameBorder)(this.colHeaderGroup, this.table.theme.headerStyle.frameStyle, this.colHeaderGroup.role, isListTableWithFrozen ? [ !0, !0, !0, !1 ] : void 0),
|
|
543
516
|
(0, frame_border_1.createFrameBorder)(this.cornerHeaderGroup, this.isPivot ? this.table.theme.cornerHeaderStyle.frameStyle : this.table.theme.headerStyle.frameStyle, this.cornerHeaderGroup.role, isListTableWithFrozen ? [ !0, !1, !0, !0 ] : void 0),
|
|
544
|
-
(0, frame_border_1.createFrameBorder)(this.tableGroup, this.table.theme.frameStyle, this.tableGroup.role);
|
|
517
|
+
(0, frame_border_1.createFrameBorder)(this.tableGroup, this.table.theme.frameStyle, this.tableGroup.role, void 0);
|
|
545
518
|
}
|
|
546
519
|
getResizeColAt(abstractX, abstractY, cellGroup, offset = global_1.ResizeColumnHotSpotSize / 2) {
|
|
547
520
|
if (cellGroup) {
|
|
@@ -596,16 +569,16 @@ class Scenegraph {
|
|
|
596
569
|
const updateCol = Math.max(col, oldFrozenCol);
|
|
597
570
|
this.colHeaderGroup.forEachChildrenSkipChild((colGroup => !(colGroup.col <= updateCol) || (colGroup.forEachChildren((cellGroup => {
|
|
598
571
|
cellGroup.forEachChildren((icon => {
|
|
599
|
-
if ("
|
|
600
|
-
const iconConfig = this.table.internalProps.headerHelper.
|
|
572
|
+
if ("frozen" === icon.attribute.funcType) {
|
|
573
|
+
const iconConfig = this.table.internalProps.headerHelper.getFrozenIcon(cellGroup.col, cellGroup.row);
|
|
601
574
|
return this.updateIcon(icon, iconConfig), !0;
|
|
602
575
|
}
|
|
603
576
|
return !1;
|
|
604
577
|
}));
|
|
605
578
|
})), !1))), this.cornerHeaderGroup.forEachChildrenSkipChild((colGroup => !(colGroup.col <= updateCol) || (colGroup.forEachChildren((cellGroup => {
|
|
606
579
|
cellGroup.forEachChildren((icon => {
|
|
607
|
-
if ("
|
|
608
|
-
const iconConfig = this.table.internalProps.headerHelper.
|
|
580
|
+
if ("frozen" === icon.attribute.funcType) {
|
|
581
|
+
const iconConfig = this.table.internalProps.headerHelper.getFrozenIcon(cellGroup.col, cellGroup.row);
|
|
609
582
|
return this.updateIcon(icon, iconConfig), !0;
|
|
610
583
|
}
|
|
611
584
|
return !1;
|
|
@@ -620,9 +593,9 @@ class Scenegraph {
|
|
|
620
593
|
getCellOverflowText(col, row) {
|
|
621
594
|
const text = this.getCell(col, row).getChildByName("text", !0);
|
|
622
595
|
if (text) {
|
|
623
|
-
const textAttributeStr = text.attribute.text.join("");
|
|
596
|
+
const textAttributeStr = (0, vutils_1.isArray)(text.attribute.text) ? text.attribute.text.join("") : text.attribute.text;
|
|
624
597
|
let cacheStr = "";
|
|
625
|
-
if (text.cache.layoutData.lines.forEach((line => {
|
|
598
|
+
if ((0, vutils_1.isString)(text.cache.clipedText) ? cacheStr = text.cache.clipedText : text.cache.layoutData.lines.forEach((line => {
|
|
626
599
|
cacheStr += line.str;
|
|
627
600
|
})), cacheStr !== textAttributeStr) return textAttributeStr;
|
|
628
601
|
}
|
|
@@ -638,6 +611,24 @@ class Scenegraph {
|
|
|
638
611
|
this.stage.disableDirtyBounds(), this.stage.window.setDpr(pixelRatio), this.stage.render(),
|
|
639
612
|
this.stage.enableDirtyBounds();
|
|
640
613
|
}
|
|
614
|
+
updateHierarchyIcon(col, row) {
|
|
615
|
+
const cellGroup = this.getCell(col, row);
|
|
616
|
+
let iconConfig;
|
|
617
|
+
iconConfig = this.table.isHeader(col, row) ? this.table.internalProps.headerHelper.getHierarchyIcon(cellGroup.col, cellGroup.row) : this.table.internalProps.bodyHelper.getHierarchyIcon(cellGroup.col, cellGroup.row),
|
|
618
|
+
this.findAndUpdateIcon(cellGroup, [ ts_types_1.IconFuncTypeEnum.collapse, ts_types_1.IconFuncTypeEnum.expand ], iconConfig);
|
|
619
|
+
}
|
|
620
|
+
updateRow(removeCells, addCells) {
|
|
621
|
+
(0, update_row_1.updateRow)(removeCells, addCells, this.table), this.recalculateColWidths(),
|
|
622
|
+
this.table.internalProps.autoRowHeight && (0, auto_height_1.updateAutoRowHeight)(this, !0),
|
|
623
|
+
this.table.stateManeger.checkFrozen(), this.updateNextFrame();
|
|
624
|
+
}
|
|
625
|
+
findAndUpdateIcon(group, funcTypeArr, iconConfig) {
|
|
626
|
+
group.forEachChildren((icon => {
|
|
627
|
+
if ("group" === icon.type) this.findAndUpdateIcon(icon, funcTypeArr, iconConfig); else if (-1 !== funcTypeArr.indexOf(icon.attribute.funcType)) return this.updateIcon(icon, iconConfig),
|
|
628
|
+
!0;
|
|
629
|
+
return !1;
|
|
630
|
+
}));
|
|
631
|
+
}
|
|
641
632
|
}
|
|
642
633
|
|
|
643
634
|
function showIcon(scene, cellGroup, visibleTime) {
|