@visactor/vtable 0.9.2-alpha.3 → 0.9.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 +1 -2
- package/cjs/ListTable.js +13 -17
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotTable.d.ts +1 -2
- package/cjs/PivotTable.js +13 -18
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/body-helper/style/MultilineTextStyle.js +2 -2
- package/cjs/body-helper/style/MultilineTextStyle.js.map +1 -1
- package/cjs/body-helper/style/ProgressBarStyle.js +15 -15
- package/cjs/body-helper/style/ProgressBarStyle.js.map +1 -1
- package/cjs/body-helper/style/Style.d.ts +1 -0
- package/cjs/body-helper/style/Style.js +28 -25
- package/cjs/body-helper/style/Style.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +5 -18
- package/cjs/core/BaseTable.js +37 -94
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/TABLE_EVENT_TYPE.d.ts +0 -3
- package/cjs/core/TABLE_EVENT_TYPE.js +1 -4
- package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/cjs/core/style.js +1 -1
- package/cjs/core/style.js.map +1 -1
- package/cjs/core/tableHelper.js +2 -1
- package/cjs/data/CachedDataSource.js +1 -2
- package/cjs/data/DataSource.js +2 -2
- package/cjs/data/DataSource.js.map +1 -1
- package/cjs/dataset/dataset.d.ts +19 -12
- package/cjs/dataset/dataset.js +196 -168
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/event/EventHandler.js.map +1 -1
- package/cjs/event/EventTarget.d.ts +5 -5
- package/cjs/event/EventTarget.js +2 -2
- package/cjs/event/EventTarget.js.map +1 -1
- package/cjs/event/event.js +4 -7
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/table-group.js +6 -8
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/event/sparkline-event.js.map +1 -1
- package/cjs/event/util.js +1 -0
- package/cjs/header-helper/header-helper.js +1 -1
- package/cjs/header-helper/header-helper.js.map +1 -1
- package/cjs/header-helper/style/MultilineTextHeaderStyle.js +2 -2
- package/cjs/header-helper/style/MultilineTextHeaderStyle.js.map +1 -1
- package/cjs/header-helper/style/Style.d.ts +1 -0
- package/cjs/header-helper/style/Style.js +28 -25
- package/cjs/header-helper/style/Style.js.map +1 -1
- package/cjs/index.d.ts +3 -4
- package/cjs/index.js +2 -11
- package/cjs/index.js.map +1 -1
- package/cjs/layout/index.js +1 -2
- package/cjs/layout/pivot-header-layout.d.ts +5 -11
- package/cjs/layout/pivot-header-layout.js +12 -42
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/pivot-layout.d.ts +8 -53
- package/cjs/layout/pivot-layout.js +89 -393
- package/cjs/layout/pivot-layout.js.map +1 -1
- package/cjs/layout/simple-header-layout.d.ts +0 -8
- package/cjs/layout/simple-header-layout.js +0 -34
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/{es/components → cjs}/menu/dom/BaseMenu.d.ts +2 -2
- package/cjs/menu/dom/BaseMenu.js.map +1 -0
- package/cjs/menu/dom/Menu.js.map +1 -0
- package/cjs/{components/menu → menu}/dom/MenuHandler.d.ts +2 -2
- package/cjs/{components/menu → menu}/dom/MenuHandler.js +1 -1
- package/cjs/menu/dom/MenuHandler.js.map +1 -0
- package/{es/components → cjs}/menu/dom/logic/MenuContainer.d.ts +2 -2
- package/cjs/{components/menu → menu}/dom/logic/MenuContainer.js +2 -2
- package/cjs/menu/dom/logic/MenuContainer.js.map +1 -0
- package/cjs/{components/menu → menu}/dom/logic/MenuElement.d.ts +2 -2
- package/cjs/{components/menu → menu}/dom/logic/MenuElement.js +4 -4
- package/cjs/menu/dom/logic/MenuElement.js.map +1 -0
- package/cjs/menu/dom/logic/MenuElementStyle.js.map +1 -0
- package/cjs/scenegraph/component/table-component.js +3 -3
- package/cjs/scenegraph/component/table-component.js.map +1 -1
- package/cjs/scenegraph/graphic/chart.d.ts +0 -3
- package/cjs/scenegraph/graphic/chart.js +6 -21
- package/cjs/scenegraph/graphic/chart.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render.js +3 -15
- package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +3 -8
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +1 -2
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/column.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.d.ts +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.js +35 -29
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +6 -6
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/cjs/scenegraph/layout/auto-width.d.ts +2 -0
- package/cjs/scenegraph/layout/auto-width.js +85 -0
- package/cjs/scenegraph/layout/auto-width.js.map +1 -0
- package/cjs/scenegraph/layout/compute-col-width.js +15 -23
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js +9 -20
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
- package/cjs/scenegraph/layout/move-cell.js +1 -1
- package/cjs/scenegraph/layout/move-cell.js.map +1 -1
- package/cjs/scenegraph/layout/update-cell.js +2 -3
- package/cjs/scenegraph/layout/update-cell.js.map +1 -1
- package/cjs/scenegraph/layout/update-height.js +1 -1
- package/cjs/scenegraph/layout/update-height.js.map +1 -1
- package/cjs/scenegraph/layout/update-row.js +1 -1
- package/cjs/scenegraph/layout/update-row.js.map +1 -1
- package/cjs/scenegraph/layout/update-width.js +1 -1
- package/cjs/scenegraph/layout/update-width.js.map +1 -1
- package/cjs/scenegraph/refresh-node/update-chart.d.ts +0 -3
- package/cjs/scenegraph/refresh-node/update-chart.js +5 -48
- package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +0 -9
- package/cjs/scenegraph/scenegraph.js +18 -144
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/stick-text/index.js +8 -10
- package/cjs/scenegraph/stick-text/index.js.map +1 -1
- package/cjs/scenegraph/style/frame-border.js +5 -1
- package/cjs/scenegraph/style/frame-border.js.map +1 -1
- package/cjs/state/state.js +1 -1
- package/cjs/state/state.js.map +1 -1
- package/cjs/themes/DEFAULT.js +2 -1
- package/cjs/tools/LimitPromiseQueue.js +1 -2
- package/cjs/tools/calc.d.ts +0 -3
- package/cjs/tools/calc.js +3 -11
- package/cjs/tools/calc.js.map +1 -1
- package/cjs/tools/diff-cell.js +2 -2
- package/cjs/tools/dom.js +1 -1
- package/cjs/tools/env.js +1 -1
- package/{es/components → cjs}/tooltip/BaseTooltip.d.ts +3 -3
- package/cjs/tooltip/BaseTooltip.js.map +1 -0
- package/cjs/tooltip/Tooltip.js.map +1 -0
- package/{es/components → cjs}/tooltip/TooltipHandler.d.ts +4 -4
- package/cjs/{components/tooltip → tooltip}/TooltipHandler.js +1 -1
- package/cjs/tooltip/TooltipHandler.js.map +1 -0
- package/{es/components → cjs}/tooltip/logic/BubbleTooltipElement.d.ts +4 -4
- package/cjs/{components/tooltip → tooltip}/logic/BubbleTooltipElement.js +1 -1
- package/cjs/tooltip/logic/BubbleTooltipElement.js.map +1 -0
- package/cjs/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -0
- package/cjs/ts-types/base-table.d.ts +12 -29
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/column/style.d.ts +1 -0
- package/cjs/ts-types/column/style.js.map +1 -1
- package/cjs/ts-types/events.d.ts +83 -100
- package/cjs/ts-types/events.js.map +1 -1
- package/cjs/ts-types/list-table/layout-map/api.d.ts +0 -2
- package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
- package/cjs/ts-types/new-data-set.d.ts +5 -18
- package/cjs/ts-types/new-data-set.js +2 -2
- package/cjs/ts-types/new-data-set.js.map +1 -1
- package/cjs/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.d.ts +0 -4
- package/cjs/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js +1 -3
- package/cjs/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js.map +1 -1
- package/cjs/ts-types/pivot-table/corner.d.ts +3 -3
- package/cjs/ts-types/pivot-table/corner.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/index.d.ts +0 -1
- package/cjs/ts-types/pivot-table/indicator/index.js.map +1 -1
- package/cjs/ts-types/pivot-table/title.d.ts +1 -1
- package/cjs/ts-types/pivot-table/title.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +3 -27
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/dist/vtable.js +11839 -22467
- package/dist/vtable.min.js +2 -4
- package/es/ListTable.d.ts +1 -2
- package/es/ListTable.js +13 -17
- package/es/ListTable.js.map +1 -1
- package/es/PivotTable.d.ts +1 -2
- package/es/PivotTable.js +14 -19
- package/es/PivotTable.js.map +1 -1
- package/es/body-helper/style/MultilineTextStyle.js +2 -2
- package/es/body-helper/style/MultilineTextStyle.js.map +1 -1
- package/es/body-helper/style/ProgressBarStyle.js +15 -15
- package/es/body-helper/style/ProgressBarStyle.js.map +1 -1
- package/es/body-helper/style/Style.d.ts +1 -0
- package/es/body-helper/style/Style.js +28 -25
- package/es/body-helper/style/Style.js.map +1 -1
- package/es/core/BaseTable.d.ts +5 -18
- package/es/core/BaseTable.js +39 -98
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/TABLE_EVENT_TYPE.d.ts +0 -3
- package/es/core/TABLE_EVENT_TYPE.js +1 -4
- package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/es/core/style.js +1 -1
- package/es/core/style.js.map +1 -1
- package/es/core/tableHelper.js +2 -1
- package/es/data/CachedDataSource.js +1 -2
- package/es/data/DataSource.js +2 -2
- package/es/data/DataSource.js.map +1 -1
- package/es/dataset/dataset.d.ts +19 -12
- package/es/dataset/dataset.js +187 -161
- package/es/dataset/dataset.js.map +1 -1
- package/es/event/EventHandler.js.map +1 -1
- package/es/event/EventTarget.d.ts +5 -5
- package/es/event/EventTarget.js +2 -2
- package/es/event/EventTarget.js.map +1 -1
- package/es/event/event.js +3 -8
- package/es/event/event.js.map +1 -1
- package/es/event/listener/table-group.js +6 -8
- package/es/event/listener/table-group.js.map +1 -1
- package/es/event/sparkline-event.js.map +1 -1
- package/es/event/util.js +2 -1
- package/es/header-helper/header-helper.js +1 -1
- package/es/header-helper/header-helper.js.map +1 -1
- package/es/header-helper/style/MultilineTextHeaderStyle.js +2 -2
- package/es/header-helper/style/MultilineTextHeaderStyle.js.map +1 -1
- package/es/header-helper/style/Style.d.ts +1 -0
- package/es/header-helper/style/Style.js +28 -25
- package/es/header-helper/style/Style.js.map +1 -1
- package/es/index.d.ts +3 -4
- package/es/index.js +2 -4
- package/es/index.js.map +1 -1
- package/es/layout/index.js +1 -2
- package/es/layout/pivot-header-layout.d.ts +5 -11
- package/es/layout/pivot-header-layout.js +11 -41
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/pivot-layout.d.ts +8 -53
- package/es/layout/pivot-layout.js +87 -396
- package/es/layout/pivot-layout.js.map +1 -1
- package/es/layout/simple-header-layout.d.ts +0 -8
- package/es/layout/simple-header-layout.js +0 -34
- package/es/layout/simple-header-layout.js.map +1 -1
- package/{cjs/components → es}/menu/dom/BaseMenu.d.ts +2 -2
- package/es/menu/dom/BaseMenu.js.map +1 -0
- package/es/menu/dom/Menu.js.map +1 -0
- package/es/{components/menu → menu}/dom/MenuHandler.d.ts +2 -2
- package/es/{components/menu → menu}/dom/MenuHandler.js +2 -2
- package/es/menu/dom/MenuHandler.js.map +1 -0
- package/{cjs/components → es}/menu/dom/logic/MenuContainer.d.ts +2 -2
- package/es/{components/menu → menu}/dom/logic/MenuContainer.js +4 -4
- package/es/menu/dom/logic/MenuContainer.js.map +1 -0
- package/es/{components/menu → menu}/dom/logic/MenuElement.d.ts +2 -2
- package/es/{components/menu → menu}/dom/logic/MenuElement.js +9 -9
- package/es/menu/dom/logic/MenuElement.js.map +1 -0
- package/es/menu/dom/logic/MenuElementStyle.js.map +1 -0
- package/es/scenegraph/component/table-component.js +3 -3
- package/es/scenegraph/component/table-component.js.map +1 -1
- package/es/scenegraph/graphic/chart.d.ts +0 -3
- package/es/scenegraph/graphic/chart.js +5 -22
- package/es/scenegraph/graphic/chart.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render.js +3 -15
- package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +2 -9
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.js +1 -2
- package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/es/scenegraph/group-creater/column.js.map +1 -1
- package/es/scenegraph/group-creater/progress/proxy.d.ts +1 -1
- package/es/scenegraph/group-creater/progress/proxy.js +34 -27
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +6 -6
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/es/scenegraph/layout/auto-width.d.ts +2 -0
- package/es/scenegraph/layout/auto-width.js +82 -0
- package/es/scenegraph/layout/auto-width.js.map +1 -0
- package/es/scenegraph/layout/compute-col-width.js +15 -23
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.js +9 -20
- package/es/scenegraph/layout/compute-row-height.js.map +1 -1
- package/es/scenegraph/layout/move-cell.js +1 -1
- package/es/scenegraph/layout/move-cell.js.map +1 -1
- package/es/scenegraph/layout/update-cell.js +1 -3
- package/es/scenegraph/layout/update-cell.js.map +1 -1
- package/es/scenegraph/layout/update-height.js +1 -1
- package/es/scenegraph/layout/update-height.js.map +1 -1
- package/es/scenegraph/layout/update-row.js +1 -1
- package/es/scenegraph/layout/update-row.js.map +1 -1
- package/es/scenegraph/layout/update-width.js +1 -1
- package/es/scenegraph/layout/update-width.js.map +1 -1
- package/es/scenegraph/refresh-node/update-chart.d.ts +0 -3
- package/es/scenegraph/refresh-node/update-chart.js +4 -45
- package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +0 -9
- package/es/scenegraph/scenegraph.js +19 -146
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/stick-text/index.js +8 -10
- package/es/scenegraph/stick-text/index.js.map +1 -1
- package/es/scenegraph/style/frame-border.js +5 -1
- package/es/scenegraph/style/frame-border.js.map +1 -1
- package/es/state/state.js +1 -1
- package/es/state/state.js.map +1 -1
- package/es/themes/DEFAULT.js +2 -1
- package/es/tools/LimitPromiseQueue.js +1 -2
- package/es/tools/calc.d.ts +0 -3
- package/es/tools/calc.js +0 -10
- package/es/tools/calc.js.map +1 -1
- package/es/tools/diff-cell.js +1 -1
- package/es/tools/dom.js +1 -1
- package/es/tools/env.js +1 -1
- package/{cjs/components → es}/tooltip/BaseTooltip.d.ts +3 -3
- package/es/tooltip/BaseTooltip.js.map +1 -0
- package/es/tooltip/Tooltip.js.map +1 -0
- package/{cjs/components → es}/tooltip/TooltipHandler.d.ts +4 -4
- package/es/{components/tooltip → tooltip}/TooltipHandler.js +4 -4
- package/es/tooltip/TooltipHandler.js.map +1 -0
- package/{cjs/components → es}/tooltip/logic/BubbleTooltipElement.d.ts +4 -4
- package/es/{components/tooltip → tooltip}/logic/BubbleTooltipElement.js +4 -4
- package/es/tooltip/logic/BubbleTooltipElement.js.map +1 -0
- package/es/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -0
- package/es/ts-types/base-table.d.ts +12 -29
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/column/style.d.ts +1 -0
- package/es/ts-types/column/style.js.map +1 -1
- package/es/ts-types/events.d.ts +83 -100
- package/es/ts-types/events.js.map +1 -1
- package/es/ts-types/list-table/layout-map/api.d.ts +0 -2
- package/es/ts-types/list-table/layout-map/api.js.map +1 -1
- package/es/ts-types/new-data-set.d.ts +5 -18
- package/es/ts-types/new-data-set.js +2 -2
- package/es/ts-types/new-data-set.js.map +1 -1
- package/es/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.d.ts +0 -4
- package/es/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js +0 -4
- package/es/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js.map +1 -1
- package/es/ts-types/pivot-table/corner.d.ts +3 -3
- package/es/ts-types/pivot-table/corner.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/index.d.ts +0 -1
- package/es/ts-types/pivot-table/indicator/index.js.map +1 -1
- package/es/ts-types/pivot-table/title.d.ts +1 -1
- package/es/ts-types/pivot-table/title.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +3 -27
- package/es/ts-types/table-engine.js.map +1 -1
- package/package.json +8 -14
- package/cjs/PivotChart.d.ts +0 -68
- package/cjs/PivotChart.js +0 -427
- package/cjs/PivotChart.js.map +0 -1
- package/cjs/components/axis/axis.d.ts +0 -45
- package/cjs/components/axis/axis.js +0 -146
- package/cjs/components/axis/axis.js.map +0 -1
- package/cjs/components/axis/band-scale.d.ts +0 -18
- package/cjs/components/axis/band-scale.js +0 -54
- package/cjs/components/axis/band-scale.js.map +0 -1
- package/cjs/components/axis/get-axis-attributes.d.ts +0 -136
- package/cjs/components/axis/get-axis-attributes.js +0 -169
- package/cjs/components/axis/get-axis-attributes.js.map +0 -1
- package/cjs/components/axis/label-overlap.d.ts +0 -3
- package/cjs/components/axis/label-overlap.js +0 -46
- package/cjs/components/axis/label-overlap.js.map +0 -1
- package/cjs/components/axis/linear-scale.d.ts +0 -45
- package/cjs/components/axis/linear-scale.js +0 -120
- package/cjs/components/axis/linear-scale.js.map +0 -1
- package/cjs/components/legend/get-legend-attributes.d.ts +0 -5
- package/cjs/components/legend/get-legend-attributes.js +0 -90
- package/cjs/components/legend/get-legend-attributes.js.map +0 -1
- package/cjs/components/legend/legend.d.ts +0 -23
- package/cjs/components/legend/legend.js +0 -94
- package/cjs/components/legend/legend.js.map +0 -1
- package/cjs/components/menu/dom/BaseMenu.js.map +0 -1
- package/cjs/components/menu/dom/Menu.js.map +0 -1
- package/cjs/components/menu/dom/MenuHandler.js.map +0 -1
- package/cjs/components/menu/dom/logic/MenuContainer.js.map +0 -1
- package/cjs/components/menu/dom/logic/MenuElement.js.map +0 -1
- package/cjs/components/menu/dom/logic/MenuElementStyle.js.map +0 -1
- package/cjs/components/title/title.d.ts +0 -12
- package/cjs/components/title/title.js +0 -66
- package/cjs/components/title/title.js.map +0 -1
- package/cjs/components/tooltip/BaseTooltip.js.map +0 -1
- package/cjs/components/tooltip/Tooltip.js.map +0 -1
- package/cjs/components/tooltip/TooltipHandler.js.map +0 -1
- package/cjs/components/tooltip/logic/BubbleTooltipElement.js.map +0 -1
- package/cjs/components/tooltip/logic/BubbleTooltipElementStyle.js.map +0 -1
- package/cjs/components/util/orient.d.ts +0 -3
- package/cjs/components/util/orient.js +0 -14
- package/cjs/components/util/orient.js.map +0 -1
- package/cjs/components/util/register.d.ts +0 -3
- package/cjs/components/util/register.js +0 -15
- package/cjs/components/util/register.js.map +0 -1
- package/cjs/components/util/tick-data/config.d.ts +0 -1
- package/cjs/components/util/tick-data/config.js +0 -6
- package/cjs/components/util/tick-data/config.js.map +0 -1
- package/cjs/components/util/tick-data/continuous.d.ts +0 -2
- package/cjs/components/util/tick-data/continuous.js +0 -39
- package/cjs/components/util/tick-data/continuous.js.map +0 -1
- package/cjs/components/util/tick-data/discrete/linear.d.ts +0 -2
- package/cjs/components/util/tick-data/discrete/linear.js +0 -66
- package/cjs/components/util/tick-data/discrete/linear.js.map +0 -1
- package/cjs/components/util/tick-data/discrete/polar-angle.d.ts +0 -2
- package/cjs/components/util/tick-data/discrete/polar-angle.js +0 -46
- package/cjs/components/util/tick-data/discrete/polar-angle.js.map +0 -1
- package/cjs/components/util/tick-data/index.d.ts +0 -2
- package/cjs/components/util/tick-data/index.js +0 -17
- package/cjs/components/util/tick-data/index.js.map +0 -1
- package/cjs/components/util/tick-data/util.d.ts +0 -21
- package/cjs/components/util/tick-data/util.js +0 -115
- package/cjs/components/util/tick-data/util.js.map +0 -1
- package/cjs/components/util/transform.d.ts +0 -5
- package/cjs/components/util/transform.js +0 -45
- package/cjs/components/util/transform.js.map +0 -1
- package/cjs/dataset/statistics-helper.d.ts +0 -68
- package/cjs/dataset/statistics-helper.js +0 -173
- package/cjs/dataset/statistics-helper.js.map +0 -1
- package/cjs/dataset/util/zero-align.d.ts +0 -10
- package/cjs/dataset/util/zero-align.js +0 -119
- package/cjs/dataset/util/zero-align.js.map +0 -1
- package/cjs/event/VChartEventProxy.d.ts +0 -1
- package/cjs/event/VChartEventProxy.js +0 -1
- package/cjs/event/VChartEventProxy.js.map +0 -1
- package/cjs/event/pivot-chart/axis-click.d.ts +0 -2
- package/cjs/event/pivot-chart/axis-click.js +0 -42
- package/cjs/event/pivot-chart/axis-click.js.map +0 -1
- package/cjs/layout/pivot-chart/get-axis-config.d.ts +0 -2
- package/cjs/layout/pivot-chart/get-axis-config.js +0 -118
- package/cjs/layout/pivot-chart/get-axis-config.js.map +0 -1
- package/cjs/layout/pivot-chart/get-chart-spec.d.ts +0 -4
- package/cjs/layout/pivot-chart/get-chart-spec.js +0 -118
- package/cjs/layout/pivot-chart/get-chart-spec.js.map +0 -1
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.d.ts +0 -3
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +0 -71
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +0 -1
- package/cjs/ts-types/component/axis.d.ts +0 -12
- package/cjs/ts-types/component/axis.js +0 -6
- package/cjs/ts-types/component/axis.js.map +0 -1
- package/cjs/ts-types/component/legend.d.ts +0 -5
- package/cjs/ts-types/component/legend.js +0 -6
- package/cjs/ts-types/component/legend.js.map +0 -1
- package/cjs/ts-types/component/title.d.ts +0 -47
- package/cjs/ts-types/component/title.js +0 -6
- package/cjs/ts-types/component/title.js.map +0 -1
- package/cjs/ts-types/component/util.d.ts +0 -1
- package/cjs/ts-types/component/util.js +0 -6
- package/cjs/ts-types/component/util.js.map +0 -1
- package/es/PivotChart.d.ts +0 -68
- package/es/PivotChart.js +0 -437
- package/es/PivotChart.js.map +0 -1
- package/es/components/axis/axis.d.ts +0 -45
- package/es/components/axis/axis.js +0 -155
- package/es/components/axis/axis.js.map +0 -1
- package/es/components/axis/band-scale.d.ts +0 -18
- package/es/components/axis/band-scale.js +0 -46
- package/es/components/axis/band-scale.js.map +0 -1
- package/es/components/axis/get-axis-attributes.d.ts +0 -136
- package/es/components/axis/get-axis-attributes.js +0 -166
- package/es/components/axis/get-axis-attributes.js.map +0 -1
- package/es/components/axis/label-overlap.d.ts +0 -3
- package/es/components/axis/label-overlap.js +0 -39
- package/es/components/axis/label-overlap.js.map +0 -1
- package/es/components/axis/linear-scale.d.ts +0 -45
- package/es/components/axis/linear-scale.js +0 -104
- package/es/components/axis/linear-scale.js.map +0 -1
- package/es/components/legend/get-legend-attributes.d.ts +0 -5
- package/es/components/legend/get-legend-attributes.js +0 -84
- package/es/components/legend/get-legend-attributes.js.map +0 -1
- package/es/components/legend/legend.d.ts +0 -23
- package/es/components/legend/legend.js +0 -93
- package/es/components/legend/legend.js.map +0 -1
- package/es/components/menu/dom/BaseMenu.js.map +0 -1
- package/es/components/menu/dom/Menu.js.map +0 -1
- package/es/components/menu/dom/MenuHandler.js.map +0 -1
- package/es/components/menu/dom/logic/MenuContainer.js.map +0 -1
- package/es/components/menu/dom/logic/MenuElement.js.map +0 -1
- package/es/components/menu/dom/logic/MenuElementStyle.js.map +0 -1
- package/es/components/title/title.d.ts +0 -12
- package/es/components/title/title.js +0 -61
- package/es/components/title/title.js.map +0 -1
- package/es/components/tooltip/BaseTooltip.js.map +0 -1
- package/es/components/tooltip/Tooltip.js.map +0 -1
- package/es/components/tooltip/TooltipHandler.js.map +0 -1
- package/es/components/tooltip/logic/BubbleTooltipElement.js.map +0 -1
- package/es/components/tooltip/logic/BubbleTooltipElementStyle.js.map +0 -1
- package/es/components/util/orient.d.ts +0 -3
- package/es/components/util/orient.js +0 -8
- package/es/components/util/orient.js.map +0 -1
- package/es/components/util/register.d.ts +0 -3
- package/es/components/util/register.js +0 -8
- package/es/components/util/register.js.map +0 -1
- package/es/components/util/tick-data/config.d.ts +0 -1
- package/es/components/util/tick-data/config.js +0 -2
- package/es/components/util/tick-data/config.js.map +0 -1
- package/es/components/util/tick-data/continuous.d.ts +0 -2
- package/es/components/util/tick-data/continuous.js +0 -38
- package/es/components/util/tick-data/continuous.js.map +0 -1
- package/es/components/util/tick-data/discrete/linear.d.ts +0 -2
- package/es/components/util/tick-data/discrete/linear.js +0 -59
- package/es/components/util/tick-data/discrete/linear.js.map +0 -1
- package/es/components/util/tick-data/discrete/polar-angle.d.ts +0 -2
- package/es/components/util/tick-data/discrete/polar-angle.js +0 -39
- package/es/components/util/tick-data/discrete/polar-angle.js.map +0 -1
- package/es/components/util/tick-data/index.d.ts +0 -2
- package/es/components/util/tick-data/index.js +0 -19
- package/es/components/util/tick-data/index.js.map +0 -1
- package/es/components/util/tick-data/util.d.ts +0 -21
- package/es/components/util/tick-data/util.js +0 -104
- package/es/components/util/tick-data/util.js.map +0 -1
- package/es/components/util/transform.d.ts +0 -5
- package/es/components/util/transform.js +0 -34
- package/es/components/util/transform.js.map +0 -1
- package/es/dataset/statistics-helper.d.ts +0 -68
- package/es/dataset/statistics-helper.js +0 -152
- package/es/dataset/statistics-helper.js.map +0 -1
- package/es/dataset/util/zero-align.d.ts +0 -10
- package/es/dataset/util/zero-align.js +0 -111
- package/es/dataset/util/zero-align.js.map +0 -1
- package/es/event/VChartEventProxy.d.ts +0 -1
- package/es/event/VChartEventProxy.js +0 -1
- package/es/event/VChartEventProxy.js.map +0 -1
- package/es/event/pivot-chart/axis-click.d.ts +0 -2
- package/es/event/pivot-chart/axis-click.js +0 -36
- package/es/event/pivot-chart/axis-click.js.map +0 -1
- package/es/layout/pivot-chart/get-axis-config.d.ts +0 -2
- package/es/layout/pivot-chart/get-axis-config.js +0 -110
- package/es/layout/pivot-chart/get-axis-config.js.map +0 -1
- package/es/layout/pivot-chart/get-chart-spec.d.ts +0 -4
- package/es/layout/pivot-chart/get-chart-spec.js +0 -109
- package/es/layout/pivot-chart/get-chart-spec.js.map +0 -1
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.d.ts +0 -3
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +0 -65
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +0 -1
- package/es/ts-types/component/axis.d.ts +0 -12
- package/es/ts-types/component/axis.js +0 -2
- package/es/ts-types/component/axis.js.map +0 -1
- package/es/ts-types/component/legend.d.ts +0 -5
- package/es/ts-types/component/legend.js +0 -2
- package/es/ts-types/component/legend.js.map +0 -1
- package/es/ts-types/component/title.d.ts +0 -47
- package/es/ts-types/component/title.js +0 -2
- package/es/ts-types/component/title.js.map +0 -1
- package/es/ts-types/component/util.d.ts +0 -1
- package/es/ts-types/component/util.js +0 -2
- package/es/ts-types/component/util.js.map +0 -1
- /package/cjs/{components/menu → menu}/dom/BaseMenu.js +0 -0
- /package/cjs/{components/menu → menu}/dom/Menu.d.ts +0 -0
- /package/cjs/{components/menu → menu}/dom/Menu.js +0 -0
- /package/cjs/{components/menu → menu}/dom/logic/MenuElementStyle.d.ts +0 -0
- /package/cjs/{components/menu → menu}/dom/logic/MenuElementStyle.js +0 -0
- /package/cjs/{components/tooltip → tooltip}/BaseTooltip.js +0 -0
- /package/cjs/{components/tooltip → tooltip}/Tooltip.d.ts +0 -0
- /package/cjs/{components/tooltip → tooltip}/Tooltip.js +0 -0
- /package/cjs/{components/tooltip → tooltip}/logic/BubbleTooltipElementStyle.d.ts +0 -0
- /package/cjs/{components/tooltip → tooltip}/logic/BubbleTooltipElementStyle.js +0 -0
- /package/es/{components/menu → menu}/dom/BaseMenu.js +0 -0
- /package/es/{components/menu → menu}/dom/Menu.d.ts +0 -0
- /package/es/{components/menu → menu}/dom/Menu.js +0 -0
- /package/es/{components/menu → menu}/dom/logic/MenuElementStyle.d.ts +0 -0
- /package/es/{components/menu → menu}/dom/logic/MenuElementStyle.js +0 -0
- /package/es/{components/tooltip → tooltip}/BaseTooltip.js +0 -0
- /package/es/{components/tooltip → tooltip}/Tooltip.d.ts +0 -0
- /package/es/{components/tooltip → tooltip}/Tooltip.js +0 -0
- /package/es/{components/tooltip → tooltip}/logic/BubbleTooltipElementStyle.d.ts +0 -0
- /package/es/{components/tooltip → tooltip}/logic/BubbleTooltipElementStyle.js +0 -0
package/es/core/BaseTable.js
CHANGED
|
@@ -34,7 +34,7 @@ import { BodyHelper } from "../body-helper/body-helper";
|
|
|
34
34
|
|
|
35
35
|
import { HeaderHelper } from "../header-helper/header-helper";
|
|
36
36
|
|
|
37
|
-
import { TooltipHandler } from "../
|
|
37
|
+
import { TooltipHandler } from "../tooltip/TooltipHandler";
|
|
38
38
|
|
|
39
39
|
import { isBoolean } from "@visactor/vutils";
|
|
40
40
|
|
|
@@ -48,36 +48,27 @@ import { IconCache } from "../plugins/icons";
|
|
|
48
48
|
|
|
49
49
|
import { _applyColWidthLimits, _getScrollableVisibleRect, _getTargetFrozenColAt, _getTargetFrozenRowAt, _setDataSource, _setRecords, _toPxWidth, createRootElement, getStyleTheme, isAutoDefine, updateRootElementPadding } from "./tableHelper";
|
|
50
50
|
|
|
51
|
-
import { MenuHandler } from "../
|
|
51
|
+
import { MenuHandler } from "../menu/dom/MenuHandler";
|
|
52
52
|
|
|
53
53
|
import { FocusInput } from "./FouseInput";
|
|
54
54
|
|
|
55
55
|
import { defaultPixelRatio } from "../tools/pixel-ratio";
|
|
56
56
|
|
|
57
|
-
import { TableLegend } from "../components/legend/legend";
|
|
58
|
-
|
|
59
|
-
import { DataSet } from "@visactor/vdataset";
|
|
60
|
-
|
|
61
|
-
import { Title } from "../components/title/title";
|
|
62
|
-
|
|
63
57
|
const {toBoxArray: toBoxArray} = utilStyle, {isTouchEvent: isTouchEvent} = event, rangeReg = /^\$(\d+)\$(\d+)$/;
|
|
64
58
|
|
|
65
59
|
importStyle();
|
|
66
60
|
|
|
67
|
-
const EMPTY_STYLE = {};
|
|
68
|
-
|
|
69
61
|
export class BaseTable extends EventTarget {
|
|
70
62
|
static get EVENT_TYPE() {
|
|
71
63
|
return TABLE_EVENT_TYPE;
|
|
72
64
|
}
|
|
73
65
|
constructor(options = {}) {
|
|
74
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
75
|
-
super(), this.showFrozenIcon = !0, this.showSort = !0, this.
|
|
76
|
-
this.rightFrozenColCount = 0, this.version = "0.9.2-alpha.3", this.id = `VTable${Date.now()}`,
|
|
66
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
67
|
+
super(), this.showFrozenIcon = !0, this.showSort = !0, this.version = "0.9.2", this.id = `VTable${Date.now()}`,
|
|
77
68
|
this.throttleInvalidate = throttle2(this.invalidate.bind(this), 200);
|
|
78
|
-
const {frozenColCount: frozenColCount = 0, defaultRowHeight: defaultRowHeight = 40, defaultHeaderRowHeight: defaultHeaderRowHeight, defaultColWidth: defaultColWidth = 80, defaultHeaderColWidth: defaultHeaderColWidth, widthMode: widthMode = "standard",
|
|
79
|
-
this.options = options, this._widthMode = widthMode, this.
|
|
80
|
-
this.
|
|
69
|
+
const {frozenColCount: frozenColCount = 0, defaultRowHeight: defaultRowHeight = 40, defaultHeaderRowHeight: defaultHeaderRowHeight, defaultColWidth: defaultColWidth = 80, defaultHeaderColWidth: defaultHeaderColWidth, widthMode: widthMode = "standard", keyboardOptions: keyboardOptions, parentElement: parentElement, columnResizeMode: columnResizeMode, dragHeaderMode: dragHeaderMode, showFrozenIcon: showFrozenIcon, allowFrozenColCount: allowFrozenColCount, padding: padding, hover: hover, menu: menu, select: click, customRender: customRender, pixelRatio: pixelRatio = defaultPixelRatio} = options;
|
|
70
|
+
this.options = options, this._widthMode = widthMode, this.customRender = customRender,
|
|
71
|
+
this.padding = {
|
|
81
72
|
top: 0,
|
|
82
73
|
right: 0,
|
|
83
74
|
left: 0,
|
|
@@ -89,6 +80,7 @@ export class BaseTable extends EventTarget {
|
|
|
89
80
|
this.tableNoFrameHeight = 0;
|
|
90
81
|
const internalProps = this.internalProps = {};
|
|
91
82
|
void 0 !== showFrozenIcon && (this.showFrozenIcon = showFrozenIcon), "number" == typeof allowFrozenColCount && allowFrozenColCount <= 0 && (this.showFrozenIcon = !1),
|
|
83
|
+
internalProps.autoRowHeight = null !== (_a = options.autoRowHeight) && void 0 !== _a && _a,
|
|
92
84
|
internalProps.handler = new EventHandler, internalProps.element = createRootElement(this.padding),
|
|
93
85
|
internalProps.focusControl = new FocusInput(this, internalProps.element), internalProps.pixelRatio = pixelRatio,
|
|
94
86
|
internalProps.canvas = document.createElement("canvas"), internalProps.element.appendChild(internalProps.canvas),
|
|
@@ -105,29 +97,23 @@ export class BaseTable extends EventTarget {
|
|
|
105
97
|
var _a;
|
|
106
98
|
return this._.canvas.width / (null !== (_a = this._.context.pixelRatio) && void 0 !== _a ? _a : window.devicePixelRatio);
|
|
107
99
|
}
|
|
108
|
-
}, internalProps.cellTextOverflows = {}, internalProps.focusedTable = !1, internalProps.theme = themes.of(null !== (
|
|
100
|
+
}, internalProps.cellTextOverflows = {}, internalProps.focusedTable = !1, internalProps.theme = themes.of(null !== (_b = options.theme) && void 0 !== _b ? _b : themes.DEFAULT),
|
|
109
101
|
parentElement ? (parentElement.innerHTML = "", parentElement.appendChild(internalProps.element),
|
|
110
|
-
this._updateSize()) : this._updateSize(), this.
|
|
102
|
+
this._updateSize()) : this._updateSize(), this._cellToBeInvalidatedNextFrame = new Set,
|
|
103
|
+
this._willNextFrameInvalidate = !1, this.options = options, internalProps.theme = themes.of(null !== (_c = options.theme) && void 0 !== _c ? _c : themes.DEFAULT),
|
|
111
104
|
internalProps.bodyHelper = new BodyHelper(this), internalProps.headerHelper = new HeaderHelper(this),
|
|
112
|
-
internalProps.autoWrapText = options.autoWrapText, internalProps.allowFrozenColCount = null !== (
|
|
113
|
-
internalProps.limitMaxAutoWidth = null !== (
|
|
114
|
-
this.
|
|
115
|
-
this.eventManeger = new EventManeger(this),
|
|
116
|
-
this.scenegraph.tableGroup.setAttributes({
|
|
117
|
-
x: this.tableX,
|
|
118
|
-
y: this.tableY
|
|
119
|
-
})), options.title && (internalProps.title = new Title(options.title, this), this.scenegraph.tableGroup.setAttributes({
|
|
120
|
-
x: this.tableX,
|
|
121
|
-
y: this.tableY
|
|
122
|
-
})), internalProps.tooltip = Object.assign({
|
|
105
|
+
internalProps.autoWrapText = options.autoWrapText, internalProps.allowFrozenColCount = null !== (_d = options.allowFrozenColCount) && void 0 !== _d ? _d : internalProps.colCount,
|
|
106
|
+
internalProps.limitMaxAutoWidth = null !== (_e = options.limitMaxAutoWidth) && void 0 !== _e ? _e : 450,
|
|
107
|
+
this.scenegraph = new Scenegraph(this), this.stateManeger = new StateManeger(this),
|
|
108
|
+
this.eventManeger = new EventManeger(this), internalProps.tooltip = Object.assign({
|
|
123
109
|
renderMode: "html",
|
|
124
110
|
isShowOverflowTextTooltip: !1,
|
|
125
111
|
confine: !0
|
|
126
112
|
}, options.tooltip), "html" === internalProps.tooltip.renderMode && (internalProps.tooltipHandler = new TooltipHandler(this, internalProps.tooltip.confine)),
|
|
127
113
|
internalProps.menu = Object.assign({
|
|
128
114
|
renderMode: "html"
|
|
129
|
-
}, options.menu), Array.isArray(null === (
|
|
130
|
-
Array.isArray(null === (
|
|
115
|
+
}, options.menu), Array.isArray(null === (_f = options.menu) || void 0 === _f ? void 0 : _f.dropDownMenuHighlight) && this.setDropDownMenuHighlight(null === (_g = options.menu) || void 0 === _g ? void 0 : _g.dropDownMenuHighlight),
|
|
116
|
+
Array.isArray(null === (_h = options.menu) || void 0 === _h ? void 0 : _h.defaultHeaderMenuItems) && (this.globalDropDownMenu = options.menu.defaultHeaderMenuItems),
|
|
131
117
|
"html" === internalProps.menu.renderMode && (internalProps.menuHandler = new MenuHandler(this)),
|
|
132
118
|
this.headerStyleCache = new Map, this.bodyStyleCache = new Map;
|
|
133
119
|
}
|
|
@@ -256,18 +242,6 @@ export class BaseTable extends EventTarget {
|
|
|
256
242
|
set widthMode(widthMode) {
|
|
257
243
|
widthMode !== this._widthMode && (this._widthMode = widthMode);
|
|
258
244
|
}
|
|
259
|
-
get heightMode() {
|
|
260
|
-
return this._heightMode;
|
|
261
|
-
}
|
|
262
|
-
set heightMode(heightMode) {
|
|
263
|
-
heightMode !== this._heightMode && (this._heightMode = heightMode);
|
|
264
|
-
}
|
|
265
|
-
get autoFillWidth() {
|
|
266
|
-
return this._autoFillWidth;
|
|
267
|
-
}
|
|
268
|
-
set autoFillWidth(autoFillWidth) {
|
|
269
|
-
autoFillWidth !== this._autoFillWidth && (this._autoFillWidth = autoFillWidth);
|
|
270
|
-
}
|
|
271
245
|
_colWidthDefineToPxWidth(width) {
|
|
272
246
|
return isAutoDefine(width) ? _toPxWidth(this, this._calculateAutoColWidthExpr()) : _toPxWidth(this, width);
|
|
273
247
|
}
|
|
@@ -352,7 +326,7 @@ export class BaseTable extends EventTarget {
|
|
|
352
326
|
widths.forEach(((value, index) => this.setColWidth(index, value)));
|
|
353
327
|
}
|
|
354
328
|
getColsWidth(startCol, endCol) {
|
|
355
|
-
var _a
|
|
329
|
+
var _a;
|
|
356
330
|
endCol = Math.min(endCol, this.colCount - 1);
|
|
357
331
|
const cachedColWidth = this._colRangeWidthsMap.get(`$${startCol}$${endCol}`);
|
|
358
332
|
if (null != cachedColWidth) return cachedColWidth;
|
|
@@ -360,13 +334,13 @@ export class BaseTable extends EventTarget {
|
|
|
360
334
|
if (null != cachedLowerColWidth) {
|
|
361
335
|
const width = this.colWidthsMap.get(endCol);
|
|
362
336
|
let adjustW;
|
|
363
|
-
adjustW = width ? "adaptive" === this.widthMode || this.transpose ? Number(width) : this._adjustColWidth(endCol, this._colWidthDefineToPxWidth(width)) :
|
|
337
|
+
adjustW = width ? "adaptive" === this.widthMode || this.transpose ? Number(width) : this._adjustColWidth(endCol, this._colWidthDefineToPxWidth(width)) : 0;
|
|
364
338
|
const addWidth = cachedLowerColWidth + adjustW;
|
|
365
339
|
return startCol >= 0 && endCol >= 0 && !Number.isNaN(addWidth) && this._colRangeWidthsMap.set(`$${startCol}$${endCol}`, Math.round(addWidth)),
|
|
366
340
|
Math.round(addWidth);
|
|
367
341
|
}
|
|
368
342
|
let w = 0;
|
|
369
|
-
for (let col = startCol; col <= endCol; col++) w += this.isRowHeader(col, 0) || this.isCornerHeader(col, 0) ? Array.isArray(this.defaultHeaderColWidth) ? null !== (
|
|
343
|
+
for (let col = startCol; col <= endCol; col++) w += this.isRowHeader(col, 0) || this.isCornerHeader(col, 0) ? Array.isArray(this.defaultHeaderColWidth) ? null !== (_a = this.defaultHeaderColWidth[col]) && void 0 !== _a ? _a : this.internalProps.defaultColWidth : this.defaultHeaderColWidth : this.internalProps.defaultColWidth;
|
|
370
344
|
this.colWidthsMap.each(startCol, endCol, ((width, col) => {
|
|
371
345
|
var _a;
|
|
372
346
|
w += ("adaptive" === this.widthMode || this.transpose ? Number(width) : this._adjustColWidth(col, this._colWidthDefineToPxWidth(width))) - (this.isRowHeader(col, 0) || this.isCornerHeader(col, 0) ? Array.isArray(this.defaultHeaderColWidth) ? null !== (_a = this.defaultHeaderColWidth[col]) && void 0 !== _a ? _a : this.internalProps.defaultColWidth : this.defaultHeaderColWidth : this.internalProps.defaultColWidth);
|
|
@@ -380,8 +354,8 @@ export class BaseTable extends EventTarget {
|
|
|
380
354
|
Math.round(w);
|
|
381
355
|
}
|
|
382
356
|
getRowHeight(row) {
|
|
383
|
-
var _a
|
|
384
|
-
return this.rowHeightsMap.get(row)
|
|
357
|
+
var _a;
|
|
358
|
+
return this.rowHeightsMap.get(row) || (this.isColumnHeader(0, row) || this.isCornerHeader(0, row) ? Array.isArray(this.defaultHeaderRowHeight) ? null !== (_a = this.defaultHeaderRowHeight[row]) && void 0 !== _a ? _a : this.internalProps.defaultRowHeight : this.defaultHeaderRowHeight : this.internalProps.defaultRowHeight);
|
|
385
359
|
}
|
|
386
360
|
setRowHeight(row, height, clearCache) {
|
|
387
361
|
this.rowHeightsMap.put(row, Math.round(height)), clearCache && this._clearRowRangeHeightsMap(row);
|
|
@@ -402,7 +376,7 @@ export class BaseTable extends EventTarget {
|
|
|
402
376
|
height;
|
|
403
377
|
}
|
|
404
378
|
let h = 0;
|
|
405
|
-
if (
|
|
379
|
+
if (!this.internalProps.autoRowHeight && this.internalProps.layoutMap && endRow >= this.columnHeaderLevelCount) {
|
|
406
380
|
for (let i = startRow; i < this.columnHeaderLevelCount; i++) h += this.getRowHeight(i);
|
|
407
381
|
h += this.defaultRowHeight * (endRow - Math.max(this.columnHeaderLevelCount, startRow) + 1);
|
|
408
382
|
} else for (let i = startRow; i <= endRow; i++) h += this.getRowHeight(i);
|
|
@@ -410,9 +384,9 @@ export class BaseTable extends EventTarget {
|
|
|
410
384
|
Math.round(h);
|
|
411
385
|
}
|
|
412
386
|
getColWidthDefine(col) {
|
|
413
|
-
var _a
|
|
387
|
+
var _a;
|
|
414
388
|
const width = this.colWidthsMap.get(col);
|
|
415
|
-
return "number" == typeof width && width <= 0 ? 0 : width || (this.isRowHeader(col, 0) || this.isCornerHeader(col, 0) ? Array.isArray(this.defaultHeaderColWidth) ? null !== (_a = this.defaultHeaderColWidth[col]) && void 0 !== _a ? _a : this.defaultColWidth : this.defaultHeaderColWidth : this.
|
|
389
|
+
return "number" == typeof width && width <= 0 ? 0 : width || (this.isRowHeader(col, 0) || this.isCornerHeader(col, 0) ? Array.isArray(this.defaultHeaderColWidth) ? null !== (_a = this.defaultHeaderColWidth[col]) && void 0 !== _a ? _a : this.defaultColWidth : this.defaultHeaderColWidth : this.defaultColWidth);
|
|
416
390
|
}
|
|
417
391
|
getColWidth(col) {
|
|
418
392
|
const width = this.getColWidthDefine(col);
|
|
@@ -546,7 +520,7 @@ export class BaseTable extends EventTarget {
|
|
|
546
520
|
return this.getCellsRectWidth(cellRange.start.col, cellRange.start.row, cellRange.end.col, cellRange.end.row);
|
|
547
521
|
}
|
|
548
522
|
isFrozenCell(col, row) {
|
|
549
|
-
const {frozenRowCount: frozenRowCount, frozenColCount: frozenColCount} = this.internalProps, isFrozenRow = frozenRowCount > 0 && row < frozenRowCount
|
|
523
|
+
const {frozenRowCount: frozenRowCount, frozenColCount: frozenColCount} = this.internalProps, isFrozenRow = frozenRowCount > 0 && row < frozenRowCount, isFrozenCol = frozenColCount > 0 && col < frozenColCount;
|
|
550
524
|
return isFrozenRow || isFrozenCol ? {
|
|
551
525
|
row: isFrozenRow,
|
|
552
526
|
col: isFrozenCol
|
|
@@ -685,21 +659,20 @@ export class BaseTable extends EventTarget {
|
|
|
685
659
|
const {parentElement: parentElement} = internalProps.element;
|
|
686
660
|
parentElement && parentElement.removeChild(internalProps.element);
|
|
687
661
|
}
|
|
688
|
-
fireListeners(type, event) {
|
|
689
|
-
return super.fireListeners(type, event);
|
|
662
|
+
fireListeners(type, ...event) {
|
|
663
|
+
return super.fireListeners(type, ...event);
|
|
690
664
|
}
|
|
691
665
|
updateOption(options) {
|
|
692
|
-
var _a, _b, _c;
|
|
666
|
+
var _a, _b, _c, _d;
|
|
693
667
|
this.options = options;
|
|
694
|
-
const {frozenColCount: frozenColCount = 0, defaultRowHeight: defaultRowHeight = 40, defaultHeaderRowHeight: defaultHeaderRowHeight, defaultColWidth: defaultColWidth = 80, defaultHeaderColWidth: defaultHeaderColWidth = 80, keyboardOptions: keyboardOptions, columnResizeMode: columnResizeMode, dragHeaderMode: dragHeaderMode, showFrozenIcon: showFrozenIcon, allowFrozenColCount: allowFrozenColCount, padding: padding, hover: hover, menu: menu, select: click, pixelRatio: pixelRatio, widthMode: widthMode
|
|
668
|
+
const {frozenColCount: frozenColCount = 0, defaultRowHeight: defaultRowHeight = 40, defaultHeaderRowHeight: defaultHeaderRowHeight, defaultColWidth: defaultColWidth = 80, defaultHeaderColWidth: defaultHeaderColWidth = 80, keyboardOptions: keyboardOptions, columnResizeMode: columnResizeMode, dragHeaderMode: dragHeaderMode, showFrozenIcon: showFrozenIcon, allowFrozenColCount: allowFrozenColCount, padding: padding, hover: hover, menu: menu, select: click, pixelRatio: pixelRatio, widthMode: widthMode} = options;
|
|
695
669
|
pixelRatio && pixelRatio !== this.internalProps.pixelRatio && (this.internalProps.pixelRatio = pixelRatio),
|
|
696
670
|
padding && ("number" == typeof padding ? (this.padding.top = padding, this.padding.left = padding,
|
|
697
671
|
this.padding.bottom = padding, this.padding.right = padding) : (padding.top && (this.padding.top = padding.top),
|
|
698
672
|
padding.bottom && (this.padding.bottom = padding.bottom), padding.left && (this.padding.left = padding.left),
|
|
699
673
|
padding.right && (this.padding.right = padding.right))), this.showFrozenIcon = "boolean" != typeof showFrozenIcon || showFrozenIcon,
|
|
700
674
|
"number" == typeof allowFrozenColCount && allowFrozenColCount <= 0 && (this.showFrozenIcon = !1),
|
|
701
|
-
this.widthMode = null != widthMode ? widthMode : "standard"
|
|
702
|
-
this.autoFillWidth = null != autoFillWidth && autoFillWidth, this.customRender = customRender;
|
|
675
|
+
this.widthMode = null != widthMode ? widthMode : "standard";
|
|
703
676
|
const internalProps = this.internalProps;
|
|
704
677
|
"node" !== Env.mode && updateRootElementPadding(internalProps.element, this.padding),
|
|
705
678
|
internalProps.frozenColCount = frozenColCount, internalProps.defaultRowHeight = defaultRowHeight,
|
|
@@ -707,28 +680,18 @@ export class BaseTable extends EventTarget {
|
|
|
707
680
|
internalProps.defaultColWidth = defaultColWidth, internalProps.defaultHeaderColWidth = null != defaultHeaderColWidth ? defaultHeaderColWidth : defaultColWidth,
|
|
708
681
|
internalProps.keyboardOptions = keyboardOptions, internalProps.columnResizeMode = columnResizeMode,
|
|
709
682
|
internalProps.dragHeaderMode = dragHeaderMode, internalProps.cellTextOverflows = {},
|
|
710
|
-
internalProps.
|
|
711
|
-
internalProps.
|
|
712
|
-
|
|
713
|
-
internalProps.
|
|
714
|
-
internalProps.
|
|
715
|
-
this.dataSet = new DataSet, this.scenegraph.clearCells(), this.stateManeger.initState(),
|
|
716
|
-
options.legends && (internalProps.legends = new TableLegend(options.legends, this),
|
|
717
|
-
this.scenegraph.tableGroup.setAttributes({
|
|
718
|
-
x: this.tableX,
|
|
719
|
-
y: this.tableY
|
|
720
|
-
})), options.title && (internalProps.title = new Title(options.title, this), this.scenegraph.tableGroup.setAttributes({
|
|
721
|
-
x: this.tableX,
|
|
722
|
-
y: this.tableY
|
|
723
|
-
})), internalProps.tooltip = Object.assign({
|
|
683
|
+
internalProps.theme = themes.of(null !== (_a = options.theme) && void 0 !== _a ? _a : themes.DEFAULT),
|
|
684
|
+
internalProps.autoRowHeight = null !== (_b = options.autoRowHeight) && void 0 !== _b && _b,
|
|
685
|
+
internalProps.autoWrapText = options.autoWrapText, internalProps.allowFrozenColCount = null !== (_c = options.allowFrozenColCount) && void 0 !== _c ? _c : internalProps.colCount,
|
|
686
|
+
internalProps.limitMaxAutoWidth = null !== (_d = options.limitMaxAutoWidth) && void 0 !== _d ? _d : 450,
|
|
687
|
+
internalProps.tooltip = Object.assign({
|
|
724
688
|
renderMode: "html",
|
|
725
689
|
isShowOverflowTextTooltip: !1,
|
|
726
690
|
confine: !0
|
|
727
691
|
}, options.tooltip), "html" !== internalProps.tooltip.renderMode || internalProps.tooltipHandler || (internalProps.tooltipHandler = new TooltipHandler(this, internalProps.tooltip.confine)),
|
|
728
692
|
internalProps.menu = Object.assign({
|
|
729
693
|
renderMode: "html"
|
|
730
|
-
}, options.menu), "html" !== internalProps.menu.renderMode || internalProps.menuHandler || (internalProps.menuHandler = new MenuHandler(this))
|
|
731
|
-
this.headerStyleCache = new Map, this.bodyStyleCache = new Map;
|
|
694
|
+
}, options.menu), "html" !== internalProps.menu.renderMode || internalProps.menuHandler || (internalProps.menuHandler = new MenuHandler(this));
|
|
732
695
|
}
|
|
733
696
|
getFrozenRowsHeight() {
|
|
734
697
|
return this.getRowsHeight(0, this.frozenRowCount - 1);
|
|
@@ -736,18 +699,6 @@ export class BaseTable extends EventTarget {
|
|
|
736
699
|
getFrozenColsWidth() {
|
|
737
700
|
return this.getColsWidth(0, this.frozenColCount - 1);
|
|
738
701
|
}
|
|
739
|
-
getBottomFrozenRowsHeight() {
|
|
740
|
-
if (this.bottomFrozenRowCount > 0) {
|
|
741
|
-
return this.getRowsHeight(this.rowCount - this.bottomFrozenRowCount, this.rowCount - 1);
|
|
742
|
-
}
|
|
743
|
-
return 0;
|
|
744
|
-
}
|
|
745
|
-
getRightFrozenColsWidth() {
|
|
746
|
-
if (this.rightFrozenColCount > 0) {
|
|
747
|
-
return this.getColsWidth(this.colCount - this.rightFrozenColCount, this.colCount - 1);
|
|
748
|
-
}
|
|
749
|
-
return 0;
|
|
750
|
-
}
|
|
751
702
|
getDrawRange() {
|
|
752
703
|
const width = Math.min(this.tableNoFrameWidth, this.getAllColsWidth()), height = Math.min(this.tableNoFrameHeight, this.getAllRowsHeight());
|
|
753
704
|
return new Rect(this.tableX, this.tableY, width, height);
|
|
@@ -1025,7 +976,7 @@ export class BaseTable extends EventTarget {
|
|
|
1025
976
|
let order, field, fieldKey;
|
|
1026
977
|
if (Array.isArray(this.sortState) ? 0 !== this.sortState.length && ({order: order, field: field, fieldKey: fieldKey} = null === (_a = this.sortState) || void 0 === _a ? void 0 : _a[0]) : ({order: order, field: field, fieldKey: fieldKey} = this.sortState),
|
|
1027
978
|
order && field && "normal" !== order) {
|
|
1028
|
-
const sortFunc = this.
|
|
979
|
+
const sortFunc = this.getSortFuncFromHeaderOption(void 0, field, fieldKey);
|
|
1029
980
|
let hd;
|
|
1030
981
|
hd = fieldKey ? this.internalProps.layoutMap.headerObjects.find((col => col && col.fieldKey === fieldKey)) : this.internalProps.layoutMap.headerObjects.find((col => col && col.field === field)),
|
|
1031
982
|
(null === (_b = null == hd ? void 0 : hd.define) || void 0 === _b ? void 0 : _b.sort) && this.dataSource.sort(hd.field, order, null != sortFunc ? sortFunc : defaultOrderFn);
|
|
@@ -1060,14 +1011,6 @@ export class BaseTable extends EventTarget {
|
|
|
1060
1011
|
var _a;
|
|
1061
1012
|
return null === (_a = this.internalProps.layoutMap) || void 0 === _a ? void 0 : _a.isCornerHeader(col, row);
|
|
1062
1013
|
}
|
|
1063
|
-
isRightFrozenColumn(col, row) {
|
|
1064
|
-
var _a;
|
|
1065
|
-
return null === (_a = this.internalProps.layoutMap) || void 0 === _a ? void 0 : _a.isRightFrozenColumn(col, row);
|
|
1066
|
-
}
|
|
1067
|
-
isBottomFrozenRow(col, row) {
|
|
1068
|
-
var _a;
|
|
1069
|
-
return null === (_a = this.internalProps.layoutMap) || void 0 === _a ? void 0 : _a.isBottomFrozenRow(col, row);
|
|
1070
|
-
}
|
|
1071
1014
|
getCellInfo(col, row) {
|
|
1072
1015
|
const colDef = this.isHeader(col, row) ? this.getHeaderDefine(col, row) : this.getBodyColumnDefine(col, row);
|
|
1073
1016
|
return {
|
|
@@ -1099,9 +1042,7 @@ export class BaseTable extends EventTarget {
|
|
|
1099
1042
|
if (layoutMap.isHeader(col, row)) {
|
|
1100
1043
|
let cacheStyle = this.headerStyleCache.get(`${col}-${row}`);
|
|
1101
1044
|
if (cacheStyle) return cacheStyle;
|
|
1102
|
-
const hd = layoutMap.getHeader(col, row);
|
|
1103
|
-
if (!hd || hd.isEmpty) return EMPTY_STYLE;
|
|
1104
|
-
const styleClass = this.internalProps.headerHelper.getStyleClass(hd.headerType), {style: style} = hd;
|
|
1045
|
+
const hd = layoutMap.getHeader(col, row), styleClass = this.internalProps.headerHelper.getStyleClass(hd.headerType), {style: style} = hd;
|
|
1105
1046
|
return cacheStyle = headerStyleContents.of(style, layoutMap.isColumnHeader(col, row) ? this.theme.headerStyle : layoutMap.isRowHeader(col, row) ? this.theme.rowHeaderStyle : this.theme.cornerHeaderStyle, {
|
|
1106
1047
|
col: col,
|
|
1107
1048
|
row: row,
|