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