@visactor/vtable 0.9.2-alpha.2 → 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 +11796 -22646
- 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 +5 -11
- 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
|
@@ -1,146 +1,32 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { transpose } from "../tools/util";
|
|
2
2
|
|
|
3
3
|
import { IndicatorDimensionKeyPlaceholder } from "../tools/global";
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { getChartAxes, getChartSpec, getRawChartSpec } from "./pivot-chart/get-chart-spec";
|
|
8
|
-
|
|
9
|
-
const EMPTY_HEADER = {
|
|
10
|
-
isEmpty: !0,
|
|
11
|
-
id: void 0,
|
|
12
|
-
field: void 0,
|
|
13
|
-
headerType: void 0,
|
|
14
|
-
define: void 0
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export class PivotLayoutMap {
|
|
5
|
+
export class PivoLayoutMap {
|
|
18
6
|
constructor(table, dataset) {
|
|
19
|
-
var _a, _b, _c, _d, _e, _f
|
|
7
|
+
var _a, _b, _c, _d, _e, _f;
|
|
20
8
|
this._headerObjects = [], this._headerObjectMap = {}, this._indicatorObjects = [],
|
|
21
|
-
this.
|
|
22
|
-
this.
|
|
23
|
-
this.indicatorDimensionKey = IndicatorDimensionKeyPlaceholder, this._table = table,
|
|
24
|
-
this.rowTree = table.options.rowTree, this.columnTree = table.options.columnTree,
|
|
25
|
-
this.rowsDefine = null !== (_a = table.options.rows) && void 0 !== _a ? _a : [],
|
|
9
|
+
this._showRowHeader = !0, this._showColumnHeader = !0, this._indicatorShowType = "column",
|
|
10
|
+
this.indicatorsAsCol = !0, this.hideIndicatorName = !1, this._table = table, this.rowsDefine = null !== (_a = table.options.rows) && void 0 !== _a ? _a : [],
|
|
26
11
|
this.columnsDefine = null !== (_b = table.options.columns) && void 0 !== _b ? _b : [],
|
|
27
12
|
this.indicatorsDefine = null !== (_c = table.options.indicators) && void 0 !== _c ? _c : [],
|
|
28
13
|
this.indicatorTitle = table.options.indicatorTitle, this.dataset = dataset, this.dataConfig = dataset.dataConfig,
|
|
29
|
-
this.
|
|
14
|
+
this.indicators = dataset.indicators, this.indicatorsAsCol = null === (_d = table.options.indicatorsAsCol) || void 0 === _d || _d,
|
|
30
15
|
this.hideIndicatorName = null !== (_e = table.options.hideIndicatorName) && void 0 !== _e && _e,
|
|
31
|
-
this.
|
|
32
|
-
this.showColumnHeader = null === (_g = table.options.showColumnHeader) || void 0 === _g || _g,
|
|
33
|
-
this.rowHeaderTitle = table.options.rowHeaderTitle, this.columnHeaderTitle = table.options.columnHeaderTitle,
|
|
34
|
-
this.cornerSetting = null !== (_h = table.options.corner) && void 0 !== _h ? _h : {
|
|
16
|
+
this.indicatorDimensionKey = IndicatorDimensionKeyPlaceholder, this.cornerSetting = null !== (_f = table.options.corner) && void 0 !== _f ? _f : {
|
|
35
17
|
titleOnDimension: "column"
|
|
36
18
|
}, this.columns = dataset.columns, this.rows = dataset.rows, this.rowKeysPath = dataset.rowKeysPath,
|
|
37
|
-
this.colKeysPath = dataset.colKeysPath, this.
|
|
38
|
-
this.
|
|
19
|
+
this.colKeysPath = dataset.colKeysPath, this.convertColKeys = transpose(this.colKeysPath),
|
|
20
|
+
this.tree = dataset.tree, this.initState();
|
|
39
21
|
}
|
|
40
22
|
initState() {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
this.
|
|
44
|
-
this.
|
|
45
|
-
this.
|
|
46
|
-
this.
|
|
47
|
-
|
|
48
|
-
this._headerObjectMap[caption] = {
|
|
49
|
-
id: caption,
|
|
50
|
-
caption: caption,
|
|
51
|
-
field: cell_id,
|
|
52
|
-
headerType: null !== (_a = this.rowHeaderTitle.headerType) && void 0 !== _a ? _a : "text",
|
|
53
|
-
style: this.rowHeaderTitle.headerStyle,
|
|
54
|
-
define: {}
|
|
55
|
-
}, this._headerObjectMap[cell_id] = {
|
|
56
|
-
id: cell_id,
|
|
57
|
-
caption: "",
|
|
58
|
-
field: cell_id,
|
|
59
|
-
headerType: null !== (_b = this.cornerSetting.headerType) && void 0 !== _b ? _b : "text",
|
|
60
|
-
style: this.cornerSetting.headerStyle,
|
|
61
|
-
define: {}
|
|
62
|
-
}, this._headerObjects.push(this._headerObjectMap[caption]), this._headerObjects.push(this._headerObjectMap[cell_id]),
|
|
63
|
-
this.rowShowAttrs.unshift(cell_id), this.rowKeysPath.forEach(((rowKey, index) => {
|
|
64
|
-
rowKey.unshift(caption);
|
|
65
|
-
}));
|
|
66
|
-
}
|
|
67
|
-
if (this.columnHeaderTitle) {
|
|
68
|
-
const cell_id = "columnHeaderTitleCell", caption = "string" == typeof this.columnHeaderTitle.title ? this.columnHeaderTitle.title : this.columnsDefine.reduce(((title, value) => "string" == typeof value ? title : title + (title ? `/${value.dimensionTitle}` : `${value.dimensionTitle}`)), "");
|
|
69
|
-
this._headerObjectMap[caption] = {
|
|
70
|
-
id: caption,
|
|
71
|
-
caption: caption,
|
|
72
|
-
field: cell_id,
|
|
73
|
-
headerType: null !== (_c = this.columnHeaderTitle.headerType) && void 0 !== _c ? _c : "text",
|
|
74
|
-
style: this.columnHeaderTitle.headerStyle,
|
|
75
|
-
define: {}
|
|
76
|
-
}, this._headerObjectMap[cell_id] = {
|
|
77
|
-
id: cell_id,
|
|
78
|
-
caption: "",
|
|
79
|
-
field: cell_id,
|
|
80
|
-
headerType: null !== (_d = this.cornerSetting.headerType) && void 0 !== _d ? _d : "text",
|
|
81
|
-
style: this.cornerSetting.headerStyle,
|
|
82
|
-
define: {}
|
|
83
|
-
}, this._headerObjects.push(this._headerObjectMap[caption]), this._headerObjects.push(this._headerObjectMap[cell_id]),
|
|
84
|
-
this.colShowAttrs.unshift(cell_id), this.colKeysPath.forEach(((columnKey, index) => {
|
|
85
|
-
columnKey.unshift(caption);
|
|
86
|
-
}));
|
|
87
|
-
}
|
|
88
|
-
if (this._table.isPivotChart()) if (this.hasTwoIndicatorAxes = this._indicatorObjects.some((indicatorObject => !!(indicatorObject.chartSpec && indicatorObject.chartSpec.series && indicatorObject.chartSpec.series.length > 1))),
|
|
89
|
-
this.indicatorsAsCol) {
|
|
90
|
-
const cell_id = "rowHeaderEmpty";
|
|
91
|
-
this._headerObjectMap[cell_id] = {
|
|
92
|
-
id: cell_id,
|
|
93
|
-
caption: "",
|
|
94
|
-
field: cell_id,
|
|
95
|
-
headerType: null !== (_e = this.cornerSetting.headerType) && void 0 !== _e ? _e : "text",
|
|
96
|
-
style: this.cornerSetting.headerStyle,
|
|
97
|
-
define: {}
|
|
98
|
-
}, this._headerObjects.push(this._headerObjectMap[cell_id]), this.rowShowAttrs.push(cell_id),
|
|
99
|
-
this.hasTwoIndicatorAxes || this.colShowAttrs.pop();
|
|
100
|
-
} else {
|
|
101
|
-
const axisOption = this._table.pivotChartAxes.find((axisOption => "left" === axisOption.orient));
|
|
102
|
-
!1 === (null == axisOption ? void 0 : axisOption.visible) && this.rowShowAttrs.pop();
|
|
103
|
-
}
|
|
104
|
-
this._colCount = (0 === this.colKeysPath.length ? 1 : this.colKeysPath.length) * (this.indicatorsAsCol ? this.indicatorKeys.length : 1) + this.rowHeaderLevelCount + this.rightFrozenColCount,
|
|
105
|
-
this._rowCount = (0 === this.rowKeysPath.length ? 1 : this.rowKeysPath.length) * (this.indicatorsAsCol ? 1 : this.indicatorKeys.length) + this.columnHeaderLevelCount + this.bottomFrozenRowCount,
|
|
106
|
-
this.setColumnWidths();
|
|
107
|
-
}
|
|
108
|
-
setColumnWidths() {
|
|
109
|
-
const returnWidths = new Array(this.colCount).fill(void 0);
|
|
110
|
-
if (this.showRowHeader && (this.rowHeaderTitle && (returnWidths[0] = {}), this.rowShowAttrs.forEach(((objKey, index) => {
|
|
111
|
-
var _a;
|
|
112
|
-
const dimension = null === (_a = this.rowsDefine) || void 0 === _a ? void 0 : _a.find((dimension => "string" != typeof dimension && dimension.dimensionKey === objKey));
|
|
113
|
-
dimension && (returnWidths[index + (this.rowHeaderTitle ? 1 : 0)] = {
|
|
114
|
-
width: dimension.width,
|
|
115
|
-
minWidth: dimension.minWidth,
|
|
116
|
-
maxWidth: dimension.maxWidth
|
|
117
|
-
});
|
|
118
|
-
}))), this.indicatorsAsCol) for (let i = this.rowHeaderLevelCount; i < this.colCount; i++) {
|
|
119
|
-
const cellDefine = this.getBody(i, this.columnHeaderLevelCount);
|
|
120
|
-
returnWidths[i] = {
|
|
121
|
-
width: null == cellDefine ? void 0 : cellDefine.width,
|
|
122
|
-
minWidth: null == cellDefine ? void 0 : cellDefine.minWidth,
|
|
123
|
-
maxWidth: null == cellDefine ? void 0 : cellDefine.maxWidth
|
|
124
|
-
};
|
|
125
|
-
} else {
|
|
126
|
-
let maxWidth, minWidth, isAuto, width = 0;
|
|
127
|
-
this._indicatorObjects.forEach(((obj, index) => {
|
|
128
|
-
"number" == typeof obj.width ? width = Math.max(obj.width, width) : "auto" === obj.width && (isAuto = !0),
|
|
129
|
-
"number" == typeof obj.minWidth && (minWidth = Math.max(obj.minWidth, minWidth)),
|
|
130
|
-
"number" == typeof obj.maxWidth && (maxWidth = Math.max(obj.maxWidth, maxWidth));
|
|
131
|
-
})), width = width > 0 ? width : isAuto ? "auto" : void 0, returnWidths.fill({
|
|
132
|
-
width: width,
|
|
133
|
-
minWidth: minWidth,
|
|
134
|
-
maxWidth: maxWidth
|
|
135
|
-
}, this.rowHeaderLevelCount, this.colCount);
|
|
136
|
-
}
|
|
137
|
-
this._columnWidths = returnWidths;
|
|
138
|
-
}
|
|
139
|
-
get columnWidths() {
|
|
140
|
-
return this._columnWidths;
|
|
141
|
-
}
|
|
142
|
-
getColumnWidthDefined(col) {
|
|
143
|
-
return this._columnWidths[col];
|
|
23
|
+
this.indicatorsAsCol && !this.hideIndicatorName ? this._indicatorShowType = "column" : this.indicatorsAsCol || this.hideIndicatorName ? this._indicatorShowType = "none" : this._indicatorShowType = "row",
|
|
24
|
+
this.colShowAttrs = "column" === this._indicatorShowType ? this.columns.concat(this.indicatorDimensionKey) : this.columns,
|
|
25
|
+
this.rowShowAttrs = "row" === this._indicatorShowType ? this.rows.concat(this.indicatorDimensionKey) : this.rows,
|
|
26
|
+
this._colCount = (0 === this.colKeysPath.length ? 1 : this.colKeysPath.length) * (this.indicatorsAsCol ? this.indicators.length : 1) + this.rowHeaderLevelCount,
|
|
27
|
+
this._rowCount = (0 === this.rowKeysPath.length ? 1 : this.rowKeysPath.length) * (this.indicatorsAsCol ? 1 : this.indicators.length) + this.columnHeaderLevelCount,
|
|
28
|
+
this._bodyRowCount = this.rowKeysPath.length * (this.indicatorsAsCol ? 1 : this.indicators.length),
|
|
29
|
+
this.initHeaderObjects(), this.initIndicatorObjects();
|
|
144
30
|
}
|
|
145
31
|
getDimensionInfo(dimensionKey) {
|
|
146
32
|
var _a, _b, _c;
|
|
@@ -150,12 +36,6 @@ export class PivotLayoutMap {
|
|
|
150
36
|
var _a;
|
|
151
37
|
return null === (_a = this.indicatorsDefine) || void 0 === _a ? void 0 : _a.find((indicator => "string" != typeof indicator && (indicatorKey ? indicator.indicatorKey === indicatorKey : !!indicatorValue && indicator.caption === indicatorValue)));
|
|
152
38
|
}
|
|
153
|
-
getColKeysPath() {
|
|
154
|
-
return this.colKeysPath;
|
|
155
|
-
}
|
|
156
|
-
getRowKeysPath() {
|
|
157
|
-
return this.rowKeysPath;
|
|
158
|
-
}
|
|
159
39
|
initHeaderObjects() {
|
|
160
40
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
161
41
|
for (let i = 0, len = this.rowKeysPath.length; i <= len - 1; i++) {
|
|
@@ -202,20 +82,20 @@ export class PivotLayoutMap {
|
|
|
202
82
|
}
|
|
203
83
|
let cornerAttrs;
|
|
204
84
|
this.indicatorsDefine.forEach((indicator => {
|
|
205
|
-
var _a, _b
|
|
85
|
+
var _a, _b;
|
|
206
86
|
const indicatorKey = "string" == typeof indicator ? indicator : indicator.indicatorKey, indicatorInfo = "string" == typeof indicator ? void 0 : indicator;
|
|
207
87
|
this._headerObjectMap[indicatorKey] || (this._headerObjectMap[indicatorKey] = {
|
|
208
88
|
id: indicatorKey,
|
|
209
89
|
field: this.indicatorDimensionKey,
|
|
210
|
-
caption:
|
|
90
|
+
caption: indicatorKey,
|
|
211
91
|
style: null == indicatorInfo ? void 0 : indicatorInfo.headerStyle,
|
|
212
92
|
define: {
|
|
213
93
|
field: this.indicatorDimensionKey,
|
|
214
|
-
headerType: null !== (
|
|
94
|
+
headerType: null !== (_a = null == indicatorInfo ? void 0 : indicatorInfo.headerType) && void 0 !== _a ? _a : "text",
|
|
215
95
|
columnType: "text"
|
|
216
96
|
},
|
|
217
97
|
dropDownMenu: null == indicatorInfo ? void 0 : indicatorInfo.dropDownMenu,
|
|
218
|
-
headerType: null !== (
|
|
98
|
+
headerType: null !== (_b = null == indicatorInfo ? void 0 : indicatorInfo.headerType) && void 0 !== _b ? _b : "text",
|
|
219
99
|
width: null == indicatorInfo ? void 0 : indicatorInfo.width
|
|
220
100
|
}, this._headerObjects.push(this._headerObjectMap[indicatorKey]));
|
|
221
101
|
})), "column" === this.cornerSetting.titleOnDimension ? cornerAttrs = this.colShowAttrs : "row" === this.cornerSetting.titleOnDimension && (cornerAttrs = this.rowShowAttrs),
|
|
@@ -241,32 +121,41 @@ export class PivotLayoutMap {
|
|
|
241
121
|
}));
|
|
242
122
|
}
|
|
243
123
|
initIndicatorObjects() {
|
|
244
|
-
this.
|
|
124
|
+
this.indicators.forEach((indicatorStr => {
|
|
245
125
|
var _a, _b, _c;
|
|
246
|
-
const indicatorInfo = null === (_a = this.indicatorsDefine) || void 0 === _a ? void 0 : _a.find((indicator => "string" != typeof indicator && indicator.
|
|
126
|
+
const indicatorInfo = null === (_a = this.indicatorsDefine) || void 0 === _a ? void 0 : _a.find((indicator => "string" != typeof indicator && indicator.caption === indicatorStr));
|
|
247
127
|
this._indicatorObjects.push({
|
|
248
|
-
id:
|
|
249
|
-
indicatorKey:
|
|
250
|
-
field:
|
|
251
|
-
define:
|
|
252
|
-
field:
|
|
128
|
+
id: indicatorStr,
|
|
129
|
+
indicatorKey: indicatorStr,
|
|
130
|
+
field: indicatorStr,
|
|
131
|
+
define: {
|
|
132
|
+
field: indicatorStr,
|
|
253
133
|
headerType: "text",
|
|
254
134
|
columnType: null !== (_b = null == indicatorInfo ? void 0 : indicatorInfo.columnType) && void 0 !== _b ? _b : "text"
|
|
255
|
-
},
|
|
135
|
+
},
|
|
256
136
|
fieldFormat: null == indicatorInfo ? void 0 : indicatorInfo.format,
|
|
257
137
|
columnType: null !== (_c = null == indicatorInfo ? void 0 : indicatorInfo.columnType) && void 0 !== _c ? _c : "text",
|
|
258
|
-
|
|
259
|
-
chartSpec: indicatorInfo && ("chartSpec" in indicatorInfo ? indicatorInfo.chartSpec : null),
|
|
260
|
-
sparklineSpec: "sparklineSpec" in indicatorInfo ? indicatorInfo.sparklineSpec : null,
|
|
261
|
-
style: null == indicatorInfo ? void 0 : indicatorInfo.style,
|
|
262
|
-
icon: null == indicatorInfo ? void 0 : indicatorInfo.icon,
|
|
263
|
-
width: null == indicatorInfo ? void 0 : indicatorInfo.width,
|
|
264
|
-
minWidth: null == indicatorInfo ? void 0 : indicatorInfo.minWidth,
|
|
265
|
-
maxWidth: null == indicatorInfo ? void 0 : indicatorInfo.maxWidth,
|
|
266
|
-
disableColumnResize: null == indicatorInfo ? void 0 : indicatorInfo.disableColumnResize
|
|
138
|
+
style: null == indicatorInfo ? void 0 : indicatorInfo.style
|
|
267
139
|
});
|
|
268
140
|
}));
|
|
269
141
|
}
|
|
142
|
+
get columnWidths() {
|
|
143
|
+
var _a;
|
|
144
|
+
const returnWidths = [];
|
|
145
|
+
for (let i = 0; i < this.rowHeaderLevelCount; i++) {
|
|
146
|
+
const dimension = null !== (_a = this.getDimensionInfo(this.rowShowAttrs[i])) && void 0 !== _a ? _a : this.getIndicatorInfo(this.rowShowAttrs[i]);
|
|
147
|
+
returnWidths.push({
|
|
148
|
+
width: null == dimension ? void 0 : dimension.width
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
for (let j = 0; j < this.colCount - this.rowHeaderLevelCount; j++) {
|
|
152
|
+
const indicator = this._indicatorObjects[j % this._indicatorObjects.length];
|
|
153
|
+
returnWidths.push({
|
|
154
|
+
width: null == indicator ? void 0 : indicator.width
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
return returnWidths;
|
|
158
|
+
}
|
|
270
159
|
get showColumnHeader() {
|
|
271
160
|
return this._showColumnHeader;
|
|
272
161
|
}
|
|
@@ -279,23 +168,11 @@ export class PivotLayoutMap {
|
|
|
279
168
|
set showRowHeader(_showRowHeader) {
|
|
280
169
|
this._showRowHeader = _showRowHeader;
|
|
281
170
|
}
|
|
282
|
-
get columnHeaderTitle() {
|
|
283
|
-
return this._columnHeaderTitle;
|
|
284
|
-
}
|
|
285
|
-
set columnHeaderTitle(_columnHeaderTitle) {
|
|
286
|
-
this._columnHeaderTitle = _columnHeaderTitle;
|
|
287
|
-
}
|
|
288
|
-
get rowHeaderTitle() {
|
|
289
|
-
return this._rowHeaderTitle;
|
|
290
|
-
}
|
|
291
|
-
set rowHeaderTitle(_rowHeaderTitle) {
|
|
292
|
-
this._rowHeaderTitle = _rowHeaderTitle;
|
|
293
|
-
}
|
|
294
171
|
getCellType(col, row) {
|
|
295
172
|
return this.isCornerHeader(col, row) ? "cornerHeader" : this.isColumnHeader(col, row) ? "columnHeader" : this.isRowHeader(col, row) ? "rowHeader" : "body";
|
|
296
173
|
}
|
|
297
174
|
isHeader(col, row) {
|
|
298
|
-
return col < this.rowHeaderLevelCount ||
|
|
175
|
+
return col < this.rowHeaderLevelCount || row < this.columnHeaderLevelCount;
|
|
299
176
|
}
|
|
300
177
|
isCornerHeader(col, row) {
|
|
301
178
|
return col < this.rowHeaderLevelCount && row < this.columnHeaderLevelCount;
|
|
@@ -303,12 +180,6 @@ export class PivotLayoutMap {
|
|
|
303
180
|
isColumnHeader(col, row) {
|
|
304
181
|
return col >= this.rowHeaderLevelCount && row < this.columnHeaderLevelCount;
|
|
305
182
|
}
|
|
306
|
-
isRightFrozenColumn(col, row) {
|
|
307
|
-
return col >= this.colCount - this.rightFrozenColCount && row >= this.columnHeaderLevelCount && row < this.rowCount - this.bottomFrozenRowCount;
|
|
308
|
-
}
|
|
309
|
-
isBottomFrozenRow(col, row) {
|
|
310
|
-
return col >= this.rowHeaderLevelCount && row >= this.rowCount - this.bottomFrozenRowCount && col < this.colCount - this.rightFrozenColCount;
|
|
311
|
-
}
|
|
312
183
|
isRowHeader(col, row) {
|
|
313
184
|
return col < this.rowHeaderLevelCount && row >= this.columnHeaderLevelCount;
|
|
314
185
|
}
|
|
@@ -375,17 +246,11 @@ export class PivotLayoutMap {
|
|
|
375
246
|
}
|
|
376
247
|
get columnHeaderLevelCount() {
|
|
377
248
|
const colLevelCount = this.colShowAttrs.length;
|
|
378
|
-
|
|
379
|
-
return this.indicatorsAsCol && this.hideIndicatorName && this.colShowAttrs[this.colShowAttrs.length - 1] === this.indicatorDimensionKey ? colLevelCount - 1 : colLevelCount;
|
|
380
|
-
}
|
|
381
|
-
return 0;
|
|
249
|
+
return this.showColumnHeader ? colLevelCount : 0;
|
|
382
250
|
}
|
|
383
251
|
get rowHeaderLevelCount() {
|
|
384
252
|
const rowLevelCount = this.rowShowAttrs.length;
|
|
385
|
-
|
|
386
|
-
return this.indicatorsAsCol ? rowLevelCount : this.hideIndicatorName && this.rowShowAttrs[this.rowShowAttrs.length - 1] === this.indicatorDimensionKey ? rowLevelCount - 1 : rowLevelCount;
|
|
387
|
-
}
|
|
388
|
-
return 0;
|
|
253
|
+
return this.showRowHeader ? rowLevelCount : 0;
|
|
389
254
|
}
|
|
390
255
|
get colCount() {
|
|
391
256
|
return this._colCount;
|
|
@@ -396,34 +261,6 @@ export class PivotLayoutMap {
|
|
|
396
261
|
get bodyRowCount() {
|
|
397
262
|
return this._bodyRowCount;
|
|
398
263
|
}
|
|
399
|
-
get bottomFrozenRowCount() {
|
|
400
|
-
if (!this._table.isPivotChart()) return 0;
|
|
401
|
-
const axisOption = this._table.pivotChartAxes.find((axisOption => "bottom" === axisOption.orient));
|
|
402
|
-
return !1 === (null == axisOption ? void 0 : axisOption.visible) ? 0 : (this.indicatorsAsCol,
|
|
403
|
-
1);
|
|
404
|
-
}
|
|
405
|
-
get rightFrozenColCount() {
|
|
406
|
-
if (!this._table.isPivotChart()) return 0;
|
|
407
|
-
const axisOption = this._table.pivotChartAxes.find((axisOption => "right" === axisOption.orient));
|
|
408
|
-
return !1 === (null == axisOption ? void 0 : axisOption.visible) || this.indicatorsAsCol ? 0 : this.hasTwoIndicatorAxes ? 1 : 0;
|
|
409
|
-
}
|
|
410
|
-
get leftAxesCount() {
|
|
411
|
-
if (!this._table.isPivotChart()) return 0;
|
|
412
|
-
const axisOption = this._table.pivotChartAxes.find((axisOption => "left" === axisOption.orient));
|
|
413
|
-
return !1 === (null == axisOption ? void 0 : axisOption.visible) ? 0 : (this.indicatorsAsCol,
|
|
414
|
-
1);
|
|
415
|
-
}
|
|
416
|
-
get topAxesCount() {
|
|
417
|
-
if (!this._table.isPivotChart()) return 0;
|
|
418
|
-
const axisOption = this._table.pivotChartAxes.find((axisOption => "top" === axisOption.orient));
|
|
419
|
-
return !1 === (null == axisOption ? void 0 : axisOption.visible) ? 0 : this.indicatorsAsCol && this.hasTwoIndicatorAxes ? 1 : 0;
|
|
420
|
-
}
|
|
421
|
-
get rightAxesCount() {
|
|
422
|
-
return this.rightFrozenColCount;
|
|
423
|
-
}
|
|
424
|
-
get bottomAxesCount() {
|
|
425
|
-
return this.bottomFrozenRowCount;
|
|
426
|
-
}
|
|
427
264
|
get headerObjects() {
|
|
428
265
|
return this._headerObjects;
|
|
429
266
|
}
|
|
@@ -431,31 +268,27 @@ export class PivotLayoutMap {
|
|
|
431
268
|
return this._indicatorObjects;
|
|
432
269
|
}
|
|
433
270
|
getCellId(col, row) {
|
|
434
|
-
if (col < this.rowHeaderLevelCount && row >= this.rowCount - this.bottomFrozenRowCount || row < this.columnHeaderLevelCount && col >= this.colCount - this.rightFrozenColCount) return 0;
|
|
435
271
|
if (row >= 0 && col >= 0) if (this.isCornerHeader(col, row)) {
|
|
436
272
|
if ("column" === this.cornerSetting.titleOnDimension) return this.colShowAttrs[row];
|
|
437
273
|
if ("row" === this.cornerSetting.titleOnDimension) return this.rowShowAttrs[col];
|
|
438
274
|
} else {
|
|
439
|
-
if (this.isColumnHeader(col, row)) return row < this.columns.length
|
|
440
|
-
if (this.isRowHeader(col, row)) return col < this.rows.length
|
|
441
|
-
if (this.isRightFrozenColumn(col, row)) return this.indicatorsAsCol ? this.rowKeysPath[row - this.columnHeaderLevelCount][this.rowHeaderLevelCount - 1] : this.indicatorKeys[(row - this.columnHeaderLevelCount) % this.indicatorKeys.length];
|
|
442
|
-
if (this.isBottomFrozenRow(col, row)) return this.indicatorsAsCol ? this.indicatorKeys[(col - this.rowHeaderLevelCount) % this.indicatorKeys.length] : this.convertColKeys[this.columnHeaderLevelCount - 1][Math.floor((col - this.rowHeaderLevelCount) / this.indicatorKeys.length)];
|
|
275
|
+
if (this.isColumnHeader(col, row)) return row < this.columns.length ? this.convertColKeys[row][this.indicatorsAsCol ? Math.floor((col - this.rowHeaderLevelCount) / this.indicators.length) : col - this.rowHeaderLevelCount] : this.indicators[(col - this.rowHeaderLevelCount) % this.indicators.length];
|
|
276
|
+
if (this.isRowHeader(col, row)) return col < this.rows.length ? this.rowKeysPath[this.indicatorsAsCol ? row - this.columnHeaderLevelCount : Math.floor((row - this.columnHeaderLevelCount) / this.indicators.length)][col] : this.indicators[(row - this.columnHeaderLevelCount) % this.indicators.length];
|
|
443
277
|
}
|
|
444
278
|
return 0;
|
|
445
279
|
}
|
|
446
|
-
|
|
280
|
+
getIndicatorName(col, row) {
|
|
447
281
|
if (this.isHeader(col, row)) return "";
|
|
448
282
|
if (this.indicatorsAsCol) {
|
|
449
283
|
const bodyCol = col - this.rowHeaderLevelCount;
|
|
450
|
-
return this.
|
|
284
|
+
return this.indicators[bodyCol % this.indicators.length];
|
|
451
285
|
}
|
|
452
286
|
const bodyRow = row - this.columnHeaderLevelCount;
|
|
453
|
-
return this.
|
|
287
|
+
return this.indicators[bodyRow % this.indicators.length];
|
|
454
288
|
}
|
|
455
289
|
getHeader(col, row) {
|
|
456
|
-
var _a;
|
|
457
290
|
const id = this.getCellId(col, row);
|
|
458
|
-
return
|
|
291
|
+
return this._headerObjectMap[id];
|
|
459
292
|
}
|
|
460
293
|
getHeaderField(col, row) {
|
|
461
294
|
var _a, _b;
|
|
@@ -468,25 +301,20 @@ export class PivotLayoutMap {
|
|
|
468
301
|
throw new Error(`Method not implemented.${field}`);
|
|
469
302
|
}
|
|
470
303
|
getBody(_col, _row) {
|
|
471
|
-
var _a, _b, _c, _d, _e, _f;
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
id: "",
|
|
486
|
-
field: void 0,
|
|
487
|
-
indicatorKey: void 0,
|
|
488
|
-
columnType: void 0,
|
|
489
|
-
define: void 0
|
|
304
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
305
|
+
let indicatorInfo;
|
|
306
|
+
return indicatorInfo = this.indicatorsAsCol ? this.getIndicatorInfo(null === (_a = null == this ? void 0 : this.indicators) || void 0 === _a ? void 0 : _a[(_col - this.rowHeaderLevelCount) % (null !== (_c = null === (_b = this.indicators) || void 0 === _b ? void 0 : _b.length) && void 0 !== _c ? _c : 0)]) : this.getIndicatorInfo(null === (_d = null == this ? void 0 : this.indicators) || void 0 === _d ? void 0 : _d[(_row - this.columnHeaderLevelCount) % (null !== (_f = null === (_e = this.indicators) || void 0 === _e ? void 0 : _e.length) && void 0 !== _f ? _f : 0)]),
|
|
307
|
+
{
|
|
308
|
+
id: 0,
|
|
309
|
+
indicatorKey: this.indicators[(_col - this.rowHeaderLevelCount) % (null !== (_h = null === (_g = this.indicators) || void 0 === _g ? void 0 : _g.length) && void 0 !== _h ? _h : 0)],
|
|
310
|
+
field: this.indicators[(_col - this.rowHeaderLevelCount) % (null !== (_k = null === (_j = this.indicators) || void 0 === _j ? void 0 : _j.length) && void 0 !== _k ? _k : 0)],
|
|
311
|
+
columnType: null !== (_l = null == indicatorInfo ? void 0 : indicatorInfo.columnType) && void 0 !== _l ? _l : "text",
|
|
312
|
+
style: null == indicatorInfo ? void 0 : indicatorInfo.style,
|
|
313
|
+
define: {
|
|
314
|
+
field: this.indicators[(_col - this.rowHeaderLevelCount) % (null !== (_o = null === (_m = this.indicators) || void 0 === _m ? void 0 : _m.length) && void 0 !== _o ? _o : 0)],
|
|
315
|
+
headerType: "text",
|
|
316
|
+
columnType: null !== (_p = null == indicatorInfo ? void 0 : indicatorInfo.columnType) && void 0 !== _p ? _p : "text"
|
|
317
|
+
}
|
|
490
318
|
};
|
|
491
319
|
}
|
|
492
320
|
getBodyLayoutRangeById(id) {
|
|
@@ -528,10 +356,10 @@ export class PivotLayoutMap {
|
|
|
528
356
|
return range1.start.col === range2.start.col && range1.end.col === range2.end.col && range1.start.row === range2.start.row && range1.end.row === range2.end.row;
|
|
529
357
|
}
|
|
530
358
|
getRecordIndexByRow(row) {
|
|
531
|
-
return row < this.columnHeaderLevelCount ? -1 : this.indicatorsAsCol ? row - this.columnHeaderLevelCount : Math.floor((row - this.columnHeaderLevelCount) / this.
|
|
359
|
+
return row < this.columnHeaderLevelCount ? -1 : this.indicatorsAsCol ? row - this.columnHeaderLevelCount : Math.floor((row - this.columnHeaderLevelCount) / this.indicators.length);
|
|
532
360
|
}
|
|
533
361
|
getRecordIndexByCol(col) {
|
|
534
|
-
return col < this.rowHeaderLevelCount ? -1 : this.indicatorsAsCol ? Math.floor((col - this.rowHeaderLevelCount) / this.
|
|
362
|
+
return col < this.rowHeaderLevelCount ? -1 : this.indicatorsAsCol ? Math.floor((col - this.rowHeaderLevelCount) / this.indicators.length) : col - this.rowHeaderLevelCount;
|
|
535
363
|
}
|
|
536
364
|
getRecordStartRowByRecordIndex(index) {
|
|
537
365
|
return this.columnHeaderLevelCount + index;
|
|
@@ -544,82 +372,29 @@ export class PivotLayoutMap {
|
|
|
544
372
|
row < this.columns.length - 1 && (colHeaderPaths = colHeaderPaths.slice(0, row + 1))),
|
|
545
373
|
recordRow >= 0 && (rowPath = this.rowKeysPath[recordRow], rowHeaderPaths = null === (_b = null == rowPath ? void 0 : rowPath[rowPath.length - 1]) || void 0 === _b ? void 0 : _b.split(this.dataset.stringJoinChar),
|
|
546
374
|
col < this.rows.length - 1 && (rowHeaderPaths = rowHeaderPaths.slice(0, col + 1))),
|
|
547
|
-
colHeaderPaths && this.indicatorsAsCol && col >= this.rowHeaderLevelCount ? colHeaderPaths.push(this.indicatorKeys[(col - this.rowHeaderLevelCount) % this.indicatorKeys.length]) : rowHeaderPaths && row >= this.columnHeaderLevelCount && rowHeaderPaths.push(this.indicatorKeys[(row - this.columnHeaderLevelCount) % this.indicatorKeys.length]),
|
|
548
375
|
{
|
|
549
|
-
colHeaderPaths: null !== (_c =
|
|
550
|
-
const
|
|
376
|
+
colHeaderPaths: null !== (_c = colHeaderPaths.map((key => {
|
|
377
|
+
const isIndicatorKey = this._indicatorObjects.find((indicator => {
|
|
378
|
+
indicator.indicatorKey;
|
|
379
|
+
}));
|
|
551
380
|
return {
|
|
552
|
-
dimensionKey:
|
|
553
|
-
indicatorKey:
|
|
554
|
-
value:
|
|
381
|
+
dimensionKey: isIndicatorKey ? void 0 : key,
|
|
382
|
+
indicatorKey: isIndicatorKey ? key : void 0,
|
|
383
|
+
value: key
|
|
555
384
|
};
|
|
556
385
|
}))) && void 0 !== _c ? _c : [],
|
|
557
|
-
rowHeaderPaths: null !== (_d =
|
|
558
|
-
const
|
|
386
|
+
rowHeaderPaths: null !== (_d = rowHeaderPaths.map((key => {
|
|
387
|
+
const isIndicatorKey = this._indicatorObjects.find((indicator => {
|
|
388
|
+
indicator.indicatorKey;
|
|
389
|
+
}));
|
|
559
390
|
return {
|
|
560
|
-
dimensionKey:
|
|
561
|
-
indicatorKey:
|
|
562
|
-
value:
|
|
391
|
+
dimensionKey: isIndicatorKey ? void 0 : key,
|
|
392
|
+
indicatorKey: isIndicatorKey ? key : void 0,
|
|
393
|
+
value: key
|
|
563
394
|
};
|
|
564
395
|
}))) && void 0 !== _d ? _d : []
|
|
565
396
|
};
|
|
566
397
|
}
|
|
567
|
-
getCellAdressByHeaderPath(dimensionPaths) {
|
|
568
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
569
|
-
let colHeaderPaths, rowHeaderPaths;
|
|
570
|
-
if (Array.isArray(dimensionPaths)) {
|
|
571
|
-
if (dimensionPaths.length > this.rowShowAttrs.length + this.colShowAttrs.length) return;
|
|
572
|
-
colHeaderPaths = dimensionPaths.filter((path => this.colShowAttrs.indexOf(path.dimensionKey) >= 0)),
|
|
573
|
-
rowHeaderPaths = dimensionPaths.filter((path => this.rowShowAttrs.indexOf(path.dimensionKey) >= 0));
|
|
574
|
-
} else colHeaderPaths = dimensionPaths.colHeaderPaths, rowHeaderPaths = dimensionPaths.rowHeaderPaths;
|
|
575
|
-
if (!Array.isArray(colHeaderPaths) && !Array.isArray(rowHeaderPaths)) return;
|
|
576
|
-
null == colHeaderPaths || colHeaderPaths.sort(((a, b) => {
|
|
577
|
-
var _a, _b;
|
|
578
|
-
return this.colShowAttrs.indexOf(null !== (_a = a.dimensionKey) && void 0 !== _a ? _a : this.indicatorDimensionKey) - this.colShowAttrs.indexOf(null !== (_b = b.dimensionKey) && void 0 !== _b ? _b : this.indicatorDimensionKey);
|
|
579
|
-
})), null == rowHeaderPaths || rowHeaderPaths.sort(((a, b) => {
|
|
580
|
-
var _a, _b;
|
|
581
|
-
return this.rowShowAttrs.indexOf(null !== (_a = a.dimensionKey) && void 0 !== _a ? _a : this.indicatorDimensionKey) - this.rowShowAttrs.indexOf(null !== (_b = b.dimensionKey) && void 0 !== _b ? _b : this.indicatorDimensionKey);
|
|
582
|
-
}));
|
|
583
|
-
let needLowestLevel = !1;
|
|
584
|
-
(null == colHeaderPaths ? void 0 : colHeaderPaths.length) >= 1 && (null == rowHeaderPaths ? void 0 : rowHeaderPaths.length) >= 1 && (needLowestLevel = !0);
|
|
585
|
-
let toFindIndicator, col = 0, row = 0, rowTree = this.rowTree, columnTree = this.columnTree;
|
|
586
|
-
if (colHeaderPaths) for (let i = 0; i < colHeaderPaths.length; i++) {
|
|
587
|
-
const colDimension = colHeaderPaths[i];
|
|
588
|
-
if (colDimension.indicatorKey) {
|
|
589
|
-
toFindIndicator = colDimension.indicatorKey;
|
|
590
|
-
break;
|
|
591
|
-
}
|
|
592
|
-
for (let j = 0; j < columnTree.length; j++) {
|
|
593
|
-
const dimension = columnTree[j];
|
|
594
|
-
if (!isValid(colDimension.indicatorKey) && dimension.dimensionKey === colDimension.dimensionKey && dimension.value === colDimension.value) {
|
|
595
|
-
columnTree = dimension.children, columnTree && 0 !== columnTree.length && !(null === (_a = null == columnTree ? void 0 : columnTree[0]) || void 0 === _a ? void 0 : _a.indicatorKey) || (col += j);
|
|
596
|
-
break;
|
|
597
|
-
}
|
|
598
|
-
col += (null === (_c = null === (_b = dimension.children) || void 0 === _b ? void 0 : _b[0]) || void 0 === _c ? void 0 : _c.indicatorKey) ? 0 : null !== (_e = null === (_d = dimension.children) || void 0 === _d ? void 0 : _d.length) && void 0 !== _e ? _e : 0;
|
|
599
|
-
}
|
|
600
|
-
}
|
|
601
|
-
if (rowHeaderPaths) for (let i = 0; i < rowHeaderPaths.length; i++) {
|
|
602
|
-
const rowDimension = rowHeaderPaths[i];
|
|
603
|
-
if (rowDimension.indicatorKey) {
|
|
604
|
-
toFindIndicator = rowDimension.indicatorKey;
|
|
605
|
-
break;
|
|
606
|
-
}
|
|
607
|
-
for (let j = 0; j < rowTree.length; j++) {
|
|
608
|
-
const dimension = rowTree[j];
|
|
609
|
-
if (!isValid(rowDimension.indicatorKey) && dimension.dimensionKey === rowDimension.dimensionKey && dimension.value === rowDimension.value) {
|
|
610
|
-
rowTree = dimension.children, rowTree && 0 !== rowTree.length && !(null === (_f = null == rowTree ? void 0 : rowTree[0]) || void 0 === _f ? void 0 : _f.indicatorKey) || (row += j);
|
|
611
|
-
break;
|
|
612
|
-
}
|
|
613
|
-
row += (null === (_h = null === (_g = dimension.children) || void 0 === _g ? void 0 : _g[0]) || void 0 === _h ? void 0 : _h.indicatorKey) ? 0 : null !== (_k = null === (_j = dimension.children) || void 0 === _j ? void 0 : _j.length) && void 0 !== _k ? _k : 0;
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
return col = (this.indicatorsAsCol ? col * this.indicatorKeys.length + this.indicatorKeys.indexOf(toFindIndicator) : col) + this.rowHeaderLevelCount,
|
|
617
|
-
row = (this.indicatorsAsCol ? row : row * this.indicatorKeys.length + this.indicatorKeys.indexOf(toFindIndicator)) + this.columnHeaderLevelCount,
|
|
618
|
-
isValid(col) || isValid(row) ? {
|
|
619
|
-
col: null != col ? col : undefined,
|
|
620
|
-
row: null != row ? row : undefined
|
|
621
|
-
} : void 0;
|
|
622
|
-
}
|
|
623
398
|
getHeaderDimension(col, row) {
|
|
624
399
|
var _a, _b, _c;
|
|
625
400
|
if (this.isHeader(col, row)) {
|
|
@@ -629,8 +404,8 @@ export class PivotLayoutMap {
|
|
|
629
404
|
}
|
|
630
405
|
updateDataset(dataset) {
|
|
631
406
|
this.dataset = dataset, this.dataConfig = dataset.dataConfig, this.rowKeysPath = dataset.rowKeysPath,
|
|
632
|
-
this.colKeysPath = dataset.colKeysPath, this.
|
|
633
|
-
this.
|
|
407
|
+
this.colKeysPath = dataset.colKeysPath, this.convertColKeys = transpose(this.colKeysPath),
|
|
408
|
+
this.tree = dataset.tree, this.initState();
|
|
634
409
|
}
|
|
635
410
|
isHeaderForColWidth(col, row) {
|
|
636
411
|
return this.isHeader(col, row);
|
|
@@ -664,89 +439,5 @@ export class PivotLayoutMap {
|
|
|
664
439
|
}
|
|
665
440
|
return null == indicatorObj ? void 0 : indicatorObj.chartInstance;
|
|
666
441
|
}
|
|
667
|
-
_generateChartState() {
|
|
668
|
-
return {
|
|
669
|
-
vtable_selected: {
|
|
670
|
-
filter: datum => {
|
|
671
|
-
if (this._table._selectedDataItemsInChart.length >= 1) {
|
|
672
|
-
return !!this._table._selectedDataItemsInChart.find((item => {
|
|
673
|
-
for (const itemKey in item) if (item[itemKey] !== datum[itemKey]) return !1;
|
|
674
|
-
return !0;
|
|
675
|
-
}));
|
|
676
|
-
}
|
|
677
|
-
if (this._table._selectedDimensionInChart.length) {
|
|
678
|
-
return !!this._table._selectedDimensionInChart.every((item => datum[item.key] === item.value));
|
|
679
|
-
}
|
|
680
|
-
return !1;
|
|
681
|
-
}
|
|
682
|
-
},
|
|
683
|
-
vtable_selected_reverse: {
|
|
684
|
-
filter: datum => {
|
|
685
|
-
if (this._table._selectedDataItemsInChart.length >= 1) {
|
|
686
|
-
return !this._table._selectedDataItemsInChart.find((item => {
|
|
687
|
-
for (const itemKey in item) if (item[itemKey] !== datum[itemKey]) return !1;
|
|
688
|
-
return !0;
|
|
689
|
-
}));
|
|
690
|
-
}
|
|
691
|
-
if (this._table._selectedDimensionInChart.length) {
|
|
692
|
-
return !this._table._selectedDimensionInChart.every((item => datum[item.key] === item.value));
|
|
693
|
-
}
|
|
694
|
-
return !1;
|
|
695
|
-
}
|
|
696
|
-
}
|
|
697
|
-
};
|
|
698
|
-
}
|
|
699
|
-
updateDataStateToChartInstance(activeChartInstance) {
|
|
700
|
-
activeChartInstance || (activeChartInstance = this._table._getActiveChartInstance());
|
|
701
|
-
const state = this._generateChartState();
|
|
702
|
-
this._indicatorObjects.forEach((_indicatorObject => {
|
|
703
|
-
_indicatorObject.chartInstance.updateState(state);
|
|
704
|
-
})), null == activeChartInstance || activeChartInstance.updateState(state);
|
|
705
|
-
}
|
|
706
|
-
updateDataStateToActiveChartInstance(activeChartInstance) {
|
|
707
|
-
activeChartInstance || (activeChartInstance = this._table._getActiveChartInstance());
|
|
708
|
-
const state = this._generateChartState();
|
|
709
|
-
null == activeChartInstance || activeChartInstance.updateState(state);
|
|
710
|
-
}
|
|
711
|
-
getOptimunWidthForChart(col) {
|
|
712
|
-
var _a;
|
|
713
|
-
const path = this.getCellHeaderPaths(col, this.columnHeaderLevelCount).colHeaderPaths;
|
|
714
|
-
let collectedValues;
|
|
715
|
-
for (const key in this.dataset.collectValuesBy) if ("xField" === this.dataset.collectValuesBy[key].type && !this.dataset.collectValuesBy[key].range) {
|
|
716
|
-
collectedValues = this.dataset.collectedValues[key][path.map((pathObj => pathObj.value)).join(this.dataset.stringJoinChar)];
|
|
717
|
-
break;
|
|
718
|
-
}
|
|
719
|
-
return 50 * (null !== (_a = null == collectedValues ? void 0 : collectedValues.size) && void 0 !== _a ? _a : 0);
|
|
720
|
-
}
|
|
721
|
-
getIndicatorKeyInChartSpec(_col, _row) {
|
|
722
|
-
const chartSpec = this.getRawChartSpec(_col, _row), indicatorKeys = [];
|
|
723
|
-
return chartSpec ? (!1 === this.indicatorsAsCol ? chartSpec.series ? chartSpec.series.forEach((chartSeries => {
|
|
724
|
-
const yField = chartSeries.yField;
|
|
725
|
-
indicatorKeys.push(yField);
|
|
726
|
-
})) : indicatorKeys.push(chartSpec.yField) : chartSpec.series ? chartSpec.series.forEach((chartSeries => {
|
|
727
|
-
const xField = chartSeries.xField;
|
|
728
|
-
indicatorKeys.push(xField);
|
|
729
|
-
})) : indicatorKeys.push(chartSpec.xField), indicatorKeys) : null;
|
|
730
|
-
}
|
|
731
|
-
getDimensionKeyInChartSpec(_col, _row) {
|
|
732
|
-
const chartSpec = this.getRawChartSpec(_col, _row), dimensionKeys = [];
|
|
733
|
-
return chartSpec ? (!1 === this.indicatorsAsCol ? dimensionKeys.push(chartSpec.xField) : dimensionKeys.push(chartSpec.yField),
|
|
734
|
-
dimensionKeys) : null;
|
|
735
|
-
}
|
|
736
|
-
getAxisConfigInPivotChart(col, row) {
|
|
737
|
-
return getAxisConfigInPivotChart(col, row, this);
|
|
738
|
-
}
|
|
739
|
-
getRawChartSpec(col, row) {
|
|
740
|
-
return getRawChartSpec(col, row, this);
|
|
741
|
-
}
|
|
742
|
-
getChartSpec(col, row) {
|
|
743
|
-
return getChartSpec(col, row, this);
|
|
744
|
-
}
|
|
745
|
-
getChartAxes(col, row) {
|
|
746
|
-
return getChartAxes(col, row, this);
|
|
747
|
-
}
|
|
748
|
-
isEmpty(col, row) {
|
|
749
|
-
return !!this._table.isPivotChart() && (col > this.colCount - this.rightFrozenColCount - 1 || row > this.rowCount - this.bottomFrozenRowCount - 1 || !(!this.hasTwoIndicatorAxes || !this.indicatorsAsCol || row !== this.columnHeaderLevelCount - 1));
|
|
750
|
-
}
|
|
751
442
|
}
|
|
752
443
|
//# sourceMappingURL=pivot-layout.js.map
|