@visactor/vtable 0.9.0-alpha.0-alpha.0
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/README.md +152 -0
- package/cjs/ListTable.d.ts +38 -0
- package/cjs/ListTable.js +258 -0
- package/cjs/ListTable.js.map +1 -0
- package/cjs/PivotTable.d.ts +50 -0
- package/cjs/PivotTable.js +275 -0
- package/cjs/PivotTable.js.map +1 -0
- package/cjs/body-helper/body-helper.d.ts +14 -0
- package/cjs/body-helper/body-helper.js +99 -0
- package/cjs/body-helper/body-helper.js.map +1 -0
- package/cjs/body-helper/style/ImageStyle.d.ts +7 -0
- package/cjs/body-helper/style/ImageStyle.js +24 -0
- package/cjs/body-helper/style/ImageStyle.js.map +1 -0
- package/cjs/body-helper/style/MultilineTextStyle.d.ts +13 -0
- package/cjs/body-helper/style/MultilineTextStyle.js +38 -0
- package/cjs/body-helper/style/MultilineTextStyle.js.map +1 -0
- package/cjs/body-helper/style/NumberStyle.d.ts +7 -0
- package/cjs/body-helper/style/NumberStyle.js +24 -0
- package/cjs/body-helper/style/NumberStyle.js.map +1 -0
- package/cjs/body-helper/style/ProgressBarStyle.d.ts +52 -0
- package/cjs/body-helper/style/ProgressBarStyle.js +126 -0
- package/cjs/body-helper/style/ProgressBarStyle.js.map +1 -0
- package/cjs/body-helper/style/Style.d.ts +85 -0
- package/cjs/body-helper/style/Style.js +200 -0
- package/cjs/body-helper/style/Style.js.map +1 -0
- package/cjs/body-helper/style.d.ts +10 -0
- package/cjs/body-helper/style.js +52 -0
- package/cjs/body-helper/style.js.map +1 -0
- package/cjs/chartType.d.ts +3 -0
- package/cjs/chartType.js +14 -0
- package/cjs/chartType.js.map +1 -0
- package/cjs/core/BaseTable.d.ts +287 -0
- package/cjs/core/BaseTable.js +1272 -0
- package/cjs/core/BaseTable.js.map +1 -0
- package/cjs/core/FouseInput.d.ts +11 -0
- package/cjs/core/FouseInput.js +38 -0
- package/cjs/core/FouseInput.js.map +1 -0
- package/cjs/core/TABLE_EVENT_TYPE.d.ts +30 -0
- package/cjs/core/TABLE_EVENT_TYPE.js +34 -0
- package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -0
- package/cjs/core/tableHelper.d.ts +28 -0
- package/cjs/core/tableHelper.js +141 -0
- package/cjs/core/tableHelper.js.map +1 -0
- package/cjs/core.d.ts +3 -0
- package/cjs/core.js +24 -0
- package/cjs/core.js.map +1 -0
- package/cjs/data/CachedDataSource.d.ts +16 -0
- package/cjs/data/CachedDataSource.js +54 -0
- package/cjs/data/CachedDataSource.js.map +1 -0
- package/cjs/data/DataSource.d.ts +64 -0
- package/cjs/data/DataSource.js +294 -0
- package/cjs/data/DataSource.js.map +1 -0
- package/cjs/data/FilterDataSource.d.ts +1 -0
- package/cjs/data/FilterDataSource.js +1 -0
- package/cjs/data/FilterDataSource.js.map +1 -0
- package/cjs/data.d.ts +4 -0
- package/cjs/data.js +24 -0
- package/cjs/data.js.map +1 -0
- package/cjs/dataset/DataStatistics.d.ts +10 -0
- package/cjs/dataset/DataStatistics.js +81 -0
- package/cjs/dataset/DataStatistics.js.map +1 -0
- package/cjs/dataset/dataset.d.ts +72 -0
- package/cjs/dataset/dataset.js +490 -0
- package/cjs/dataset/dataset.js.map +1 -0
- package/cjs/dataset/flatDataToObject.d.ts +31 -0
- package/cjs/dataset/flatDataToObject.js +71 -0
- package/cjs/dataset/flatDataToObject.js.map +1 -0
- package/cjs/event/EventHandler.d.ts +45 -0
- package/cjs/event/EventHandler.js +120 -0
- package/cjs/event/EventHandler.js.map +1 -0
- package/cjs/event/EventTarget.d.ts +11 -0
- package/cjs/event/EventTarget.js +59 -0
- package/cjs/event/EventTarget.js.map +1 -0
- package/cjs/event/chart.d.ts +2 -0
- package/cjs/event/chart.js +24 -0
- package/cjs/event/chart.js.map +1 -0
- package/cjs/event/drill.d.ts +3 -0
- package/cjs/event/drill.js +23 -0
- package/cjs/event/drill.js.map +1 -0
- package/cjs/event/event.d.ts +35 -0
- package/cjs/event/event.js +426 -0
- package/cjs/event/event.js.map +1 -0
- package/cjs/event/media-click.d.ts +2 -0
- package/cjs/event/media-click.js +58 -0
- package/cjs/event/media-click.js.map +1 -0
- package/cjs/event/scroll.d.ts +2 -0
- package/cjs/event/scroll.js +23 -0
- package/cjs/event/scroll.js.map +1 -0
- package/cjs/header-helper/header-helper.d.ts +26 -0
- package/cjs/header-helper/header-helper.js +214 -0
- package/cjs/header-helper/header-helper.js.map +1 -0
- package/cjs/header-helper/style/ImageStyle.d.ts +7 -0
- package/cjs/header-helper/style/ImageStyle.js +25 -0
- package/cjs/header-helper/style/ImageStyle.js.map +1 -0
- package/cjs/header-helper/style/MultilineTextHeaderStyle.d.ts +13 -0
- package/cjs/header-helper/style/MultilineTextHeaderStyle.js +38 -0
- package/cjs/header-helper/style/MultilineTextHeaderStyle.js.map +1 -0
- package/cjs/header-helper/style/SortHeaderStyle.d.ts +1 -0
- package/cjs/header-helper/style/SortHeaderStyle.js +3 -0
- package/cjs/header-helper/style/SortHeaderStyle.js.map +1 -0
- package/cjs/header-helper/style/Style.d.ts +88 -0
- package/cjs/header-helper/style/Style.js +208 -0
- package/cjs/header-helper/style/Style.js.map +1 -0
- package/cjs/header-helper/style.d.ts +5 -0
- package/cjs/header-helper/style.js +30 -0
- package/cjs/header-helper/style.js.map +1 -0
- package/cjs/icons.d.ts +4 -0
- package/cjs/icons.js +241 -0
- package/cjs/icons.js.map +1 -0
- package/cjs/index.d.ts +17 -0
- package/cjs/index.js +95 -0
- package/cjs/index.js.map +1 -0
- package/cjs/layout/index.d.ts +1 -0
- package/cjs/layout/index.js +15 -0
- package/cjs/layout/index.js.map +1 -0
- package/cjs/layout/pivot-header-layout.d.ts +155 -0
- package/cjs/layout/pivot-header-layout.js +897 -0
- package/cjs/layout/pivot-header-layout.js.map +1 -0
- package/cjs/layout/pivot-layout.d.ts +86 -0
- package/cjs/layout/pivot-layout.js +422 -0
- package/cjs/layout/pivot-layout.js.map +1 -0
- package/cjs/layout/simple-header-layout.d.ts +67 -0
- package/cjs/layout/simple-header-layout.js +413 -0
- package/cjs/layout/simple-header-layout.js.map +1 -0
- package/cjs/menu/dom/BaseMenu.d.ts +15 -0
- package/cjs/menu/dom/BaseMenu.js +30 -0
- package/cjs/menu/dom/BaseMenu.js.map +1 -0
- package/cjs/menu/dom/Menu.d.ts +9 -0
- package/cjs/menu/dom/Menu.js +24 -0
- package/cjs/menu/dom/Menu.js.map +1 -0
- package/cjs/menu/dom/MenuHandler.d.ts +20 -0
- package/cjs/menu/dom/MenuHandler.js +134 -0
- package/cjs/menu/dom/MenuHandler.js.map +1 -0
- package/cjs/menu/dom/logic/MenuContainer.d.ts +22 -0
- package/cjs/menu/dom/logic/MenuContainer.js +110 -0
- package/cjs/menu/dom/logic/MenuContainer.js.map +1 -0
- package/cjs/menu/dom/logic/MenuElement.css +86 -0
- package/cjs/menu/dom/logic/MenuElement.d.ts +27 -0
- package/cjs/menu/dom/logic/MenuElement.js +278 -0
- package/cjs/menu/dom/logic/MenuElement.js.map +1 -0
- package/cjs/plugins/chartTypes.d.ts +3 -0
- package/cjs/plugins/chartTypes.js +6 -0
- package/cjs/plugins/chartTypes.js.map +1 -0
- package/cjs/plugins/icons.d.ts +12 -0
- package/cjs/plugins/icons.js +26 -0
- package/cjs/plugins/icons.js.map +1 -0
- package/cjs/plugins/themes.d.ts +4 -0
- package/cjs/plugins/themes.js +6 -0
- package/cjs/plugins/themes.js.map +1 -0
- package/cjs/register.d.ts +5 -0
- package/cjs/register.js +35 -0
- package/cjs/register.js.map +1 -0
- package/cjs/render/layout/arc.d.ts +23 -0
- package/cjs/render/layout/arc.js +20 -0
- package/cjs/render/layout/arc.js.map +1 -0
- package/cjs/render/layout/circle.d.ts +19 -0
- package/cjs/render/layout/circle.js +19 -0
- package/cjs/render/layout/circle.js.map +1 -0
- package/cjs/render/layout/container.d.ts +52 -0
- package/cjs/render/layout/container.js +99 -0
- package/cjs/render/layout/container.js.map +1 -0
- package/cjs/render/layout/direction.d.ts +22 -0
- package/cjs/render/layout/direction.js +35 -0
- package/cjs/render/layout/direction.js.map +1 -0
- package/cjs/render/layout/element.d.ts +47 -0
- package/cjs/render/layout/element.js +27 -0
- package/cjs/render/layout/element.js.map +1 -0
- package/cjs/render/layout/group-element.d.ts +25 -0
- package/cjs/render/layout/group-element.js +52 -0
- package/cjs/render/layout/group-element.js.map +1 -0
- package/cjs/render/layout/icon.d.ts +21 -0
- package/cjs/render/layout/icon.js +48 -0
- package/cjs/render/layout/icon.js.map +1 -0
- package/cjs/render/layout/image.d.ts +21 -0
- package/cjs/render/layout/image.js +20 -0
- package/cjs/render/layout/image.js.map +1 -0
- package/cjs/render/layout/index.d.ts +9 -0
- package/cjs/render/layout/index.js +25 -0
- package/cjs/render/layout/index.js.map +1 -0
- package/cjs/render/layout/line.d.ts +32 -0
- package/cjs/render/layout/line.js +88 -0
- package/cjs/render/layout/line.js.map +1 -0
- package/cjs/render/layout/percent-calc.d.ts +8 -0
- package/cjs/render/layout/percent-calc.js +13 -0
- package/cjs/render/layout/percent-calc.js.map +1 -0
- package/cjs/render/layout/rect.d.ts +22 -0
- package/cjs/render/layout/rect.js +19 -0
- package/cjs/render/layout/rect.js.map +1 -0
- package/cjs/render/layout/text.d.ts +22 -0
- package/cjs/render/layout/text.js +26 -0
- package/cjs/render/layout/text.js.map +1 -0
- package/cjs/scenegraph/component/cell-content.d.ts +36 -0
- package/cjs/scenegraph/component/cell-content.js +100 -0
- package/cjs/scenegraph/component/cell-content.js.map +1 -0
- package/cjs/scenegraph/component/cell-mover.d.ts +15 -0
- package/cjs/scenegraph/component/cell-mover.js +107 -0
- package/cjs/scenegraph/component/cell-mover.js.map +1 -0
- package/cjs/scenegraph/component/custom.d.ts +7 -0
- package/cjs/scenegraph/component/custom.js +212 -0
- package/cjs/scenegraph/component/custom.js.map +1 -0
- package/cjs/scenegraph/component/drill-icon.d.ts +9 -0
- package/cjs/scenegraph/component/drill-icon.js +70 -0
- package/cjs/scenegraph/component/drill-icon.js.map +1 -0
- package/cjs/scenegraph/component/menu.d.ts +41 -0
- package/cjs/scenegraph/component/menu.js +214 -0
- package/cjs/scenegraph/component/menu.js.map +1 -0
- package/cjs/scenegraph/component/table-component.d.ts +37 -0
- package/cjs/scenegraph/component/table-component.js +302 -0
- package/cjs/scenegraph/component/table-component.js.map +1 -0
- package/cjs/scenegraph/component/util.d.ts +2 -0
- package/cjs/scenegraph/component/util.js +11 -0
- package/cjs/scenegraph/component/util.js.map +1 -0
- package/cjs/scenegraph/debug-tool/debug-tool.d.ts +36 -0
- package/cjs/scenegraph/debug-tool/debug-tool.js +138 -0
- package/cjs/scenegraph/debug-tool/debug-tool.js.map +1 -0
- package/cjs/scenegraph/debug-tool/index.d.ts +4 -0
- package/cjs/scenegraph/debug-tool/index.js +14 -0
- package/cjs/scenegraph/debug-tool/index.js.map +1 -0
- package/cjs/scenegraph/graphic/chart.d.ts +30 -0
- package/cjs/scenegraph/graphic/chart.js +66 -0
- package/cjs/scenegraph/graphic/chart.js.map +1 -0
- package/cjs/scenegraph/graphic/contributions/chart-render.d.ts +10 -0
- package/cjs/scenegraph/graphic/contributions/chart-render.js +46 -0
- package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -0
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.d.ts +70 -0
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +195 -0
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -0
- package/cjs/scenegraph/graphic/contributions/image-contribution-render.d.ts +20 -0
- package/cjs/scenegraph/graphic/contributions/image-contribution-render.js +46 -0
- package/cjs/scenegraph/graphic/contributions/image-contribution-render.js.map +1 -0
- package/cjs/scenegraph/graphic/contributions/index.d.ts +3 -0
- package/cjs/scenegraph/graphic/contributions/index.js +36 -0
- package/cjs/scenegraph/graphic/contributions/index.js.map +1 -0
- package/cjs/scenegraph/graphic/contributions/rect-contribution-render.d.ts +17 -0
- package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js +47 -0
- package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -0
- package/cjs/scenegraph/graphic/group.d.ts +23 -0
- package/cjs/scenegraph/graphic/group.js +94 -0
- package/cjs/scenegraph/graphic/group.js.map +1 -0
- package/cjs/scenegraph/graphic/icon.d.ts +24 -0
- package/cjs/scenegraph/graphic/icon.js +25 -0
- package/cjs/scenegraph/graphic/icon.js.map +1 -0
- package/cjs/scenegraph/graphic/text.d.ts +16 -0
- package/cjs/scenegraph/graphic/text.js +146 -0
- package/cjs/scenegraph/graphic/text.js.map +1 -0
- package/cjs/scenegraph/group-creater/cell-helper.d.ts +7 -0
- package/cjs/scenegraph/group-creater/cell-helper.js +84 -0
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -0
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.d.ts +3 -0
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +78 -0
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -0
- package/cjs/scenegraph/group-creater/cell-type/image-cell.d.ts +7 -0
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js +123 -0
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js.map +1 -0
- package/cjs/scenegraph/group-creater/cell-type/progress-bar-cell.d.ts +9 -0
- package/cjs/scenegraph/group-creater/cell-type/progress-bar-cell.js +342 -0
- package/cjs/scenegraph/group-creater/cell-type/progress-bar-cell.js.map +1 -0
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.d.ts +3 -0
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js +163 -0
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -0
- package/cjs/scenegraph/group-creater/cell-type/text-cell.d.ts +5 -0
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js +64 -0
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js.map +1 -0
- package/cjs/scenegraph/group-creater/cell-type/video-cell.d.ts +4 -0
- package/cjs/scenegraph/group-creater/cell-type/video-cell.js +100 -0
- package/cjs/scenegraph/group-creater/cell-type/video-cell.js.map +1 -0
- package/cjs/scenegraph/group-creater/column-helper.d.ts +24 -0
- package/cjs/scenegraph/group-creater/column-helper.js +136 -0
- package/cjs/scenegraph/group-creater/column-helper.js.map +1 -0
- package/cjs/scenegraph/group-creater/column.d.ts +14 -0
- package/cjs/scenegraph/group-creater/column.js +57 -0
- package/cjs/scenegraph/group-creater/column.js.map +1 -0
- package/cjs/scenegraph/group-creater/progress/proxy.d.ts +45 -0
- package/cjs/scenegraph/group-creater/progress/proxy.js +267 -0
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -0
- package/cjs/scenegraph/header-icon/layout.d.ts +3 -0
- package/cjs/scenegraph/header-icon/layout.js +75 -0
- package/cjs/scenegraph/header-icon/layout.js.map +1 -0
- package/cjs/scenegraph/hover-state.d.ts +14 -0
- package/cjs/scenegraph/hover-state.js +27 -0
- package/cjs/scenegraph/hover-state.js.map +1 -0
- package/cjs/scenegraph/layout/auto-height.d.ts +2 -0
- package/cjs/scenegraph/layout/auto-height.js +50 -0
- package/cjs/scenegraph/layout/auto-height.js.map +1 -0
- 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.d.ts +3 -0
- package/cjs/scenegraph/layout/compute-col-width.js +194 -0
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -0
- package/cjs/scenegraph/layout/move-cell.d.ts +2 -0
- package/cjs/scenegraph/layout/move-cell.js +61 -0
- package/cjs/scenegraph/layout/move-cell.js.map +1 -0
- package/cjs/scenegraph/layout/update-cell.d.ts +3 -0
- package/cjs/scenegraph/layout/update-cell.js +55 -0
- package/cjs/scenegraph/layout/update-cell.js.map +1 -0
- package/cjs/scenegraph/layout/update-height.d.ts +6 -0
- package/cjs/scenegraph/layout/update-height.js +90 -0
- package/cjs/scenegraph/layout/update-height.js.map +1 -0
- package/cjs/scenegraph/layout/update-width.d.ts +2 -0
- package/cjs/scenegraph/layout/update-width.js +103 -0
- package/cjs/scenegraph/layout/update-width.js.map +1 -0
- package/cjs/scenegraph/scenegraph.d.ts +109 -0
- package/cjs/scenegraph/scenegraph.js +798 -0
- package/cjs/scenegraph/scenegraph.js.map +1 -0
- package/cjs/scenegraph/style/frame-border.d.ts +3 -0
- package/cjs/scenegraph/style/frame-border.js +43 -0
- package/cjs/scenegraph/style/frame-border.js.map +1 -0
- package/cjs/scenegraph/utils/border-line.d.ts +8 -0
- package/cjs/scenegraph/utils/border-line.js +51 -0
- package/cjs/scenegraph/utils/border-line.js.map +1 -0
- package/cjs/scenegraph/utils/break-string.d.ts +1 -0
- package/cjs/scenegraph/utils/break-string.js +37 -0
- package/cjs/scenegraph/utils/break-string.js.map +1 -0
- package/cjs/scenegraph/utils/cell-pos.d.ts +4 -0
- package/cjs/scenegraph/utils/cell-pos.js +18 -0
- package/cjs/scenegraph/utils/cell-pos.js.map +1 -0
- package/cjs/scenegraph/utils/font.d.ts +1 -0
- package/cjs/scenegraph/utils/font.js +20 -0
- package/cjs/scenegraph/utils/font.js.map +1 -0
- package/cjs/scenegraph/utils/get-cell-merge.d.ts +3 -0
- package/cjs/scenegraph/utils/get-cell-merge.js +11 -0
- package/cjs/scenegraph/utils/get-cell-merge.js.map +1 -0
- package/cjs/scenegraph/utils/get-prop.d.ts +4 -0
- package/cjs/scenegraph/utils/get-prop.js +44 -0
- package/cjs/scenegraph/utils/get-prop.js.map +1 -0
- package/cjs/scenegraph/utils/icon.d.ts +12 -0
- package/cjs/scenegraph/utils/icon.js +35 -0
- package/cjs/scenegraph/utils/icon.js.map +1 -0
- package/cjs/scenegraph/utils/keep-aspect-ratio.d.ts +4 -0
- package/cjs/scenegraph/utils/keep-aspect-ratio.js +16 -0
- package/cjs/scenegraph/utils/keep-aspect-ratio.js.map +1 -0
- package/cjs/scenegraph/utils/measure-text.d.ts +20 -0
- package/cjs/scenegraph/utils/measure-text.js +111 -0
- package/cjs/scenegraph/utils/measure-text.js.map +1 -0
- package/cjs/scenegraph/utils/padding.d.ts +1 -0
- package/cjs/scenegraph/utils/padding.js +16 -0
- package/cjs/scenegraph/utils/padding.js.map +1 -0
- package/cjs/scenegraph/utils/text-icon-layout.d.ts +9 -0
- package/cjs/scenegraph/utils/text-icon-layout.js +237 -0
- package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -0
- package/cjs/scenegraph/utils/text-pos.d.ts +8 -0
- package/cjs/scenegraph/utils/text-pos.js +27 -0
- package/cjs/scenegraph/utils/text-pos.js.map +1 -0
- package/cjs/state/cell-move/adjust-header.d.ts +3 -0
- package/cjs/state/cell-move/adjust-header.js +20 -0
- package/cjs/state/cell-move/adjust-header.js.map +1 -0
- package/cjs/state/cell-move/index.d.ts +4 -0
- package/cjs/state/cell-move/index.js +60 -0
- package/cjs/state/cell-move/index.js.map +1 -0
- package/cjs/state/common/check-in-select.d.ts +8 -0
- package/cjs/state/common/check-in-select.js +63 -0
- package/cjs/state/common/check-in-select.js.map +1 -0
- package/cjs/state/drill/index.d.ts +2 -0
- package/cjs/state/drill/index.js +15 -0
- package/cjs/state/drill/index.js.map +1 -0
- package/cjs/state/hover/col.d.ts +5 -0
- package/cjs/state/hover/col.js +24 -0
- package/cjs/state/hover/col.js.map +1 -0
- package/cjs/state/hover/is-cell-hover.d.ts +5 -0
- package/cjs/state/hover/is-cell-hover.js +36 -0
- package/cjs/state/hover/is-cell-hover.js.map +1 -0
- package/cjs/state/hover/row.d.ts +5 -0
- package/cjs/state/hover/row.js +22 -0
- package/cjs/state/hover/row.js.map +1 -0
- package/cjs/state/hover/single.d.ts +5 -0
- package/cjs/state/hover/single.js +18 -0
- package/cjs/state/hover/single.js.map +1 -0
- package/cjs/state/hover/update-cell.d.ts +2 -0
- package/cjs/state/hover/update-cell.js +13 -0
- package/cjs/state/hover/update-cell.js.map +1 -0
- package/cjs/state/hover/update-position.d.ts +2 -0
- package/cjs/state/hover/update-position.js +44 -0
- package/cjs/state/hover/update-position.js.map +1 -0
- package/cjs/state/pin/index.d.ts +2 -0
- package/cjs/state/pin/index.js +10 -0
- package/cjs/state/pin/index.js.map +1 -0
- package/cjs/state/select/update-position.d.ts +4 -0
- package/cjs/state/select/update-position.js +111 -0
- package/cjs/state/select/update-position.js.map +1 -0
- package/cjs/state/sort/index.d.ts +2 -0
- package/cjs/state/sort/index.js +41 -0
- package/cjs/state/sort/index.js.map +1 -0
- package/cjs/state/spark-line/index.d.ts +3 -0
- package/cjs/state/spark-line/index.js +98 -0
- package/cjs/state/spark-line/index.js.map +1 -0
- package/cjs/state/state.d.ts +155 -0
- package/cjs/state/state.js +431 -0
- package/cjs/state/state.js.map +1 -0
- package/cjs/themes/ARCO.d.ts +3 -0
- package/cjs/themes/ARCO.js +114 -0
- package/cjs/themes/ARCO.js.map +1 -0
- package/cjs/themes/BRIGHT.d.ts +3 -0
- package/cjs/themes/BRIGHT.js +71 -0
- package/cjs/themes/BRIGHT.js.map +1 -0
- package/cjs/themes/DARK.d.ts +3 -0
- package/cjs/themes/DARK.js +90 -0
- package/cjs/themes/DARK.js.map +1 -0
- package/cjs/themes/DEFAULT.d.ts +3 -0
- package/cjs/themes/DEFAULT.js +89 -0
- package/cjs/themes/DEFAULT.js.map +1 -0
- package/cjs/themes/SIMPLIFY.d.ts +3 -0
- package/cjs/themes/SIMPLIFY.js +46 -0
- package/cjs/themes/SIMPLIFY.js.map +1 -0
- package/cjs/themes/theme.d.ts +34 -0
- package/cjs/themes/theme.js +520 -0
- package/cjs/themes/theme.js.map +1 -0
- package/cjs/themes.d.ts +28 -0
- package/cjs/themes.js +52 -0
- package/cjs/themes.js.map +1 -0
- package/cjs/tools/LimitPromiseQueue.d.ts +8 -0
- package/cjs/tools/LimitPromiseQueue.js +29 -0
- package/cjs/tools/LimitPromiseQueue.js.map +1 -0
- package/cjs/tools/NumberMap.d.ts +16 -0
- package/cjs/tools/NumberMap.js +76 -0
- package/cjs/tools/NumberMap.js.map +1 -0
- package/cjs/tools/Rect.d.ts +24 -0
- package/cjs/tools/Rect.js +69 -0
- package/cjs/tools/Rect.js.map +1 -0
- package/cjs/tools/calc.d.ts +5 -0
- package/cjs/tools/calc.js +197 -0
- package/cjs/tools/calc.js.map +1 -0
- package/cjs/tools/debounce.d.ts +1 -0
- package/cjs/tools/debounce.js +51 -0
- package/cjs/tools/debounce.js.map +1 -0
- package/cjs/tools/dom.d.ts +1 -0
- package/cjs/tools/dom.js +11 -0
- package/cjs/tools/dom.js.map +1 -0
- package/cjs/tools/env.d.ts +19 -0
- package/cjs/tools/env.js +48 -0
- package/cjs/tools/env.js.map +1 -0
- package/cjs/tools/global.d.ts +13 -0
- package/cjs/tools/global.js +12 -0
- package/cjs/tools/global.js.map +1 -0
- package/cjs/tools/helper.d.ts +60 -0
- package/cjs/tools/helper.js +216 -0
- package/cjs/tools/helper.js.map +1 -0
- package/cjs/tools/icons.d.ts +4 -0
- package/cjs/tools/icons.js +10 -0
- package/cjs/tools/icons.js.map +1 -0
- package/cjs/tools/isx.d.ts +16 -0
- package/cjs/tools/isx.js +117 -0
- package/cjs/tools/isx.js.map +1 -0
- package/cjs/tools/sort.d.ts +1 -0
- package/cjs/tools/sort.js +18 -0
- package/cjs/tools/sort.js.map +1 -0
- package/cjs/tools/style.css +60 -0
- package/cjs/tools/style.d.ts +2 -0
- package/cjs/tools/style.js +11 -0
- package/cjs/tools/style.js.map +1 -0
- package/cjs/tools/text-width.d.ts +1 -0
- package/cjs/tools/text-width.js +17 -0
- package/cjs/tools/text-width.js.map +1 -0
- package/cjs/tools/util.d.ts +45 -0
- package/cjs/tools/util.js +299 -0
- package/cjs/tools/util.js.map +1 -0
- package/cjs/tooltip/BaseTooltip.d.ts +22 -0
- package/cjs/tooltip/BaseTooltip.js +35 -0
- package/cjs/tooltip/BaseTooltip.js.map +1 -0
- package/cjs/tooltip/Tooltip.d.ts +5 -0
- package/cjs/tooltip/Tooltip.js +16 -0
- package/cjs/tooltip/Tooltip.js.map +1 -0
- package/cjs/tooltip/TooltipHandler.d.ts +27 -0
- package/cjs/tooltip/TooltipHandler.js +129 -0
- package/cjs/tooltip/TooltipHandler.js.map +1 -0
- package/cjs/tooltip/logic/BubbleTooltipElement.css +63 -0
- package/cjs/tooltip/logic/BubbleTooltipElement.d.ts +33 -0
- package/cjs/tooltip/logic/BubbleTooltipElement.js +152 -0
- package/cjs/tooltip/logic/BubbleTooltipElement.js.map +1 -0
- package/cjs/ts-types/base-table.d.ts +313 -0
- package/cjs/ts-types/base-table.js +6 -0
- package/cjs/ts-types/base-table.js.map +1 -0
- package/cjs/ts-types/chartType.d.ts +53 -0
- package/cjs/ts-types/chartType.js +6 -0
- package/cjs/ts-types/chartType.js.map +1 -0
- package/cjs/ts-types/column/index.d.ts +2 -0
- package/cjs/ts-types/column/index.js +21 -0
- package/cjs/ts-types/column/index.js.map +1 -0
- package/cjs/ts-types/column/style.d.ts +78 -0
- package/cjs/ts-types/column/style.js +6 -0
- package/cjs/ts-types/column/style.js.map +1 -0
- package/cjs/ts-types/column/type.d.ts +2 -0
- package/cjs/ts-types/column/type.js +6 -0
- package/cjs/ts-types/column/type.js.map +1 -0
- package/cjs/ts-types/common.d.ts +72 -0
- package/cjs/ts-types/common.js +6 -0
- package/cjs/ts-types/common.js.map +1 -0
- package/cjs/ts-types/customElement.d.ts +111 -0
- package/cjs/ts-types/customElement.js +6 -0
- package/cjs/ts-types/customElement.js.map +1 -0
- package/cjs/ts-types/customLayout.d.ts +8 -0
- package/cjs/ts-types/customLayout.js +6 -0
- package/cjs/ts-types/customLayout.js.map +1 -0
- package/cjs/ts-types/events.d.ts +182 -0
- package/cjs/ts-types/events.js +6 -0
- package/cjs/ts-types/events.js.map +1 -0
- package/cjs/ts-types/icon.d.ts +86 -0
- package/cjs/ts-types/icon.js +26 -0
- package/cjs/ts-types/icon.js.map +1 -0
- package/cjs/ts-types/index.d.ts +15 -0
- package/cjs/ts-types/index.js +28 -0
- package/cjs/ts-types/index.js.map +1 -0
- package/cjs/ts-types/list-table/define/basic-define.d.ts +36 -0
- package/cjs/ts-types/list-table/define/basic-define.js +6 -0
- package/cjs/ts-types/list-table/define/basic-define.js.map +1 -0
- package/cjs/ts-types/list-table/define/chart-define.d.ts +10 -0
- package/cjs/ts-types/list-table/define/chart-define.js +6 -0
- package/cjs/ts-types/list-table/define/chart-define.js.map +1 -0
- package/cjs/ts-types/list-table/define/image-define.d.ts +15 -0
- package/cjs/ts-types/list-table/define/image-define.js +6 -0
- package/cjs/ts-types/list-table/define/image-define.js.map +1 -0
- package/cjs/ts-types/list-table/define/index.d.ts +21 -0
- package/cjs/ts-types/list-table/define/index.js +6 -0
- package/cjs/ts-types/list-table/define/index.js.map +1 -0
- package/cjs/ts-types/list-table/define/link-define.d.ts +17 -0
- package/cjs/ts-types/list-table/define/link-define.js +6 -0
- package/cjs/ts-types/list-table/define/link-define.js.map +1 -0
- package/cjs/ts-types/list-table/define/multilinetext-define.d.ts +12 -0
- package/cjs/ts-types/list-table/define/multilinetext-define.js +6 -0
- package/cjs/ts-types/list-table/define/multilinetext-define.js.map +1 -0
- package/cjs/ts-types/list-table/define/progressbar-define.d.ts +11 -0
- package/cjs/ts-types/list-table/define/progressbar-define.js +6 -0
- package/cjs/ts-types/list-table/define/progressbar-define.js.map +1 -0
- package/cjs/ts-types/list-table/define/sparkline-define.d.ts +10 -0
- package/cjs/ts-types/list-table/define/sparkline-define.js +6 -0
- package/cjs/ts-types/list-table/define/sparkline-define.js.map +1 -0
- package/cjs/ts-types/list-table/index.d.ts +2 -0
- package/cjs/ts-types/list-table/index.js +21 -0
- package/cjs/ts-types/list-table/index.js.map +1 -0
- package/cjs/ts-types/list-table/layout-map/api.d.ts +92 -0
- package/cjs/ts-types/list-table/layout-map/api.js +6 -0
- package/cjs/ts-types/list-table/layout-map/api.js.map +1 -0
- package/cjs/ts-types/list-table/layout-map/index.d.ts +1 -0
- package/cjs/ts-types/list-table/layout-map/index.js +6 -0
- package/cjs/ts-types/list-table/layout-map/index.js.map +1 -0
- package/cjs/ts-types/menu.d.ts +73 -0
- package/cjs/ts-types/menu.js +6 -0
- package/cjs/ts-types/menu.js.map +1 -0
- package/cjs/ts-types/new-data-set.d.ts +95 -0
- package/cjs/ts-types/new-data-set.js +14 -0
- package/cjs/ts-types/new-data-set.js.map +1 -0
- package/cjs/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.d.ts +6 -0
- package/cjs/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js +13 -0
- package/cjs/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js.map +1 -0
- package/cjs/ts-types/pivot-table/corner.d.ts +19 -0
- package/cjs/ts-types/pivot-table/corner.js +6 -0
- package/cjs/ts-types/pivot-table/corner.js.map +1 -0
- package/cjs/ts-types/pivot-table/dimension/basic-dimension.d.ts +25 -0
- package/cjs/ts-types/pivot-table/dimension/basic-dimension.js +6 -0
- package/cjs/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -0
- package/cjs/ts-types/pivot-table/dimension/image-dimension.d.ts +9 -0
- package/cjs/ts-types/pivot-table/dimension/image-dimension.js +6 -0
- package/cjs/ts-types/pivot-table/dimension/image-dimension.js.map +1 -0
- package/cjs/ts-types/pivot-table/dimension/index.d.ts +4 -0
- package/cjs/ts-types/pivot-table/dimension/index.js +6 -0
- package/cjs/ts-types/pivot-table/dimension/index.js.map +1 -0
- package/cjs/ts-types/pivot-table/dimension/link-dimension.d.ts +10 -0
- package/cjs/ts-types/pivot-table/dimension/link-dimension.js +6 -0
- package/cjs/ts-types/pivot-table/dimension/link-dimension.js.map +1 -0
- package/cjs/ts-types/pivot-table/dimension/multilinetext-dimension.d.ts +7 -0
- package/cjs/ts-types/pivot-table/dimension/multilinetext-dimension.js +6 -0
- package/cjs/ts-types/pivot-table/dimension/multilinetext-dimension.js.map +1 -0
- package/cjs/ts-types/pivot-table/index.d.ts +4 -0
- package/cjs/ts-types/pivot-table/index.js +22 -0
- package/cjs/ts-types/pivot-table/index.js.map +1 -0
- package/cjs/ts-types/pivot-table/indicator/basic-indicator.d.ts +26 -0
- package/cjs/ts-types/pivot-table/indicator/basic-indicator.js +6 -0
- package/cjs/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -0
- package/cjs/ts-types/pivot-table/indicator/chart-indicator.d.ts +10 -0
- package/cjs/ts-types/pivot-table/indicator/chart-indicator.js +6 -0
- package/cjs/ts-types/pivot-table/indicator/chart-indicator.js.map +1 -0
- package/cjs/ts-types/pivot-table/indicator/image-indicator.d.ts +15 -0
- package/cjs/ts-types/pivot-table/indicator/image-indicator.js +6 -0
- package/cjs/ts-types/pivot-table/indicator/image-indicator.js.map +1 -0
- package/cjs/ts-types/pivot-table/indicator/index.d.ts +10 -0
- package/cjs/ts-types/pivot-table/indicator/index.js +6 -0
- package/cjs/ts-types/pivot-table/indicator/index.js.map +1 -0
- package/cjs/ts-types/pivot-table/indicator/link-indicator.d.ts +17 -0
- package/cjs/ts-types/pivot-table/indicator/link-indicator.js +6 -0
- package/cjs/ts-types/pivot-table/indicator/link-indicator.js.map +1 -0
- package/cjs/ts-types/pivot-table/indicator/multilinetext-indicator.d.ts +11 -0
- package/cjs/ts-types/pivot-table/indicator/multilinetext-indicator.js +6 -0
- package/cjs/ts-types/pivot-table/indicator/multilinetext-indicator.js.map +1 -0
- package/cjs/ts-types/pivot-table/indicator/progress-indicator.d.ts +11 -0
- package/cjs/ts-types/pivot-table/indicator/progress-indicator.js +6 -0
- package/cjs/ts-types/pivot-table/indicator/progress-indicator.js.map +1 -0
- package/cjs/ts-types/pivot-table/indicator/sparkline-indicator.d.ts +10 -0
- package/cjs/ts-types/pivot-table/indicator/sparkline-indicator.js +6 -0
- package/cjs/ts-types/pivot-table/indicator/sparkline-indicator.js.map +1 -0
- package/cjs/ts-types/pivot-table/title.d.ts +18 -0
- package/cjs/ts-types/pivot-table/title.js +6 -0
- package/cjs/ts-types/pivot-table/title.js.map +1 -0
- package/cjs/ts-types/style-define.d.ts +60 -0
- package/cjs/ts-types/style-define.js +6 -0
- package/cjs/ts-types/style-define.js.map +1 -0
- package/cjs/ts-types/table-engine.d.ts +169 -0
- package/cjs/ts-types/table-engine.js +12 -0
- package/cjs/ts-types/table-engine.js.map +1 -0
- package/cjs/ts-types/theme.d.ts +88 -0
- package/cjs/ts-types/theme.js +6 -0
- package/cjs/ts-types/theme.js.map +1 -0
- package/cjs/ts-types/tooltip.d.ts +22 -0
- package/cjs/ts-types/tooltip.js +6 -0
- package/cjs/ts-types/tooltip.js.map +1 -0
- package/dist/vtable.js +72964 -0
- package/dist/vtable.min.js +17 -0
- package/es/ListTable.d.ts +38 -0
- package/es/ListTable.js +256 -0
- package/es/ListTable.js.map +1 -0
- package/es/PivotTable.d.ts +50 -0
- package/es/PivotTable.js +282 -0
- package/es/PivotTable.js.map +1 -0
- package/es/body-helper/body-helper.d.ts +14 -0
- package/es/body-helper/body-helper.js +80 -0
- package/es/body-helper/body-helper.js.map +1 -0
- package/es/body-helper/style/ImageStyle.d.ts +7 -0
- package/es/body-helper/style/ImageStyle.js +16 -0
- package/es/body-helper/style/ImageStyle.js.map +1 -0
- package/es/body-helper/style/MultilineTextStyle.d.ts +13 -0
- package/es/body-helper/style/MultilineTextStyle.js +30 -0
- package/es/body-helper/style/MultilineTextStyle.js.map +1 -0
- package/es/body-helper/style/NumberStyle.d.ts +7 -0
- package/es/body-helper/style/NumberStyle.js +16 -0
- package/es/body-helper/style/NumberStyle.js.map +1 -0
- package/es/body-helper/style/ProgressBarStyle.d.ts +52 -0
- package/es/body-helper/style/ProgressBarStyle.js +118 -0
- package/es/body-helper/style/ProgressBarStyle.js.map +1 -0
- package/es/body-helper/style/Style.d.ts +85 -0
- package/es/body-helper/style/Style.js +194 -0
- package/es/body-helper/style/Style.js.map +1 -0
- package/es/body-helper/style.d.ts +10 -0
- package/es/body-helper/style.js +20 -0
- package/es/body-helper/style.js.map +1 -0
- package/es/chartType.d.ts +3 -0
- package/es/chartType.js +10 -0
- package/es/chartType.js.map +1 -0
- package/es/core/BaseTable.d.ts +287 -0
- package/es/core/BaseTable.js +1281 -0
- package/es/core/BaseTable.js.map +1 -0
- package/es/core/FouseInput.d.ts +11 -0
- package/es/core/FouseInput.js +30 -0
- package/es/core/FouseInput.js.map +1 -0
- package/es/core/TABLE_EVENT_TYPE.d.ts +30 -0
- package/es/core/TABLE_EVENT_TYPE.js +30 -0
- package/es/core/TABLE_EVENT_TYPE.js.map +1 -0
- package/es/core/tableHelper.d.ts +28 -0
- package/es/core/tableHelper.js +107 -0
- package/es/core/tableHelper.js.map +1 -0
- package/es/core.d.ts +3 -0
- package/es/core.js +6 -0
- package/es/core.js.map +1 -0
- package/es/data/CachedDataSource.d.ts +16 -0
- package/es/data/CachedDataSource.js +48 -0
- package/es/data/CachedDataSource.js.map +1 -0
- package/es/data/DataSource.d.ts +64 -0
- package/es/data/DataSource.js +267 -0
- package/es/data/DataSource.js.map +1 -0
- package/es/data/FilterDataSource.d.ts +1 -0
- package/es/data/FilterDataSource.js +1 -0
- package/es/data/FilterDataSource.js.map +1 -0
- package/es/data.d.ts +4 -0
- package/es/data.js +6 -0
- package/es/data.js.map +1 -0
- package/es/dataset/DataStatistics.d.ts +10 -0
- package/es/dataset/DataStatistics.js +74 -0
- package/es/dataset/DataStatistics.js.map +1 -0
- package/es/dataset/dataset.d.ts +72 -0
- package/es/dataset/dataset.js +482 -0
- package/es/dataset/dataset.js.map +1 -0
- package/es/dataset/flatDataToObject.d.ts +31 -0
- package/es/dataset/flatDataToObject.js +63 -0
- package/es/dataset/flatDataToObject.js.map +1 -0
- package/es/event/EventHandler.d.ts +45 -0
- package/es/event/EventHandler.js +111 -0
- package/es/event/EventHandler.js.map +1 -0
- package/es/event/EventTarget.d.ts +11 -0
- package/es/event/EventTarget.js +50 -0
- package/es/event/EventTarget.js.map +1 -0
- package/es/event/chart.d.ts +2 -0
- package/es/event/chart.js +16 -0
- package/es/event/chart.js.map +1 -0
- package/es/event/drill.d.ts +3 -0
- package/es/event/drill.js +17 -0
- package/es/event/drill.js.map +1 -0
- package/es/event/event.d.ts +35 -0
- package/es/event/event.js +438 -0
- package/es/event/event.js.map +1 -0
- package/es/event/media-click.d.ts +2 -0
- package/es/event/media-click.js +54 -0
- package/es/event/media-click.js.map +1 -0
- package/es/event/scroll.d.ts +2 -0
- package/es/event/scroll.js +17 -0
- package/es/event/scroll.js.map +1 -0
- package/es/header-helper/header-helper.d.ts +26 -0
- package/es/header-helper/header-helper.js +189 -0
- package/es/header-helper/header-helper.js.map +1 -0
- package/es/header-helper/style/ImageStyle.d.ts +7 -0
- package/es/header-helper/style/ImageStyle.js +17 -0
- package/es/header-helper/style/ImageStyle.js.map +1 -0
- package/es/header-helper/style/MultilineTextHeaderStyle.d.ts +13 -0
- package/es/header-helper/style/MultilineTextHeaderStyle.js +30 -0
- package/es/header-helper/style/MultilineTextHeaderStyle.js.map +1 -0
- package/es/header-helper/style/SortHeaderStyle.d.ts +1 -0
- package/es/header-helper/style/SortHeaderStyle.js +3 -0
- package/es/header-helper/style/SortHeaderStyle.js.map +1 -0
- package/es/header-helper/style/Style.d.ts +88 -0
- package/es/header-helper/style/Style.js +202 -0
- package/es/header-helper/style/Style.js.map +1 -0
- package/es/header-helper/style.d.ts +5 -0
- package/es/header-helper/style.js +14 -0
- package/es/header-helper/style.js.map +1 -0
- package/es/icons.d.ts +4 -0
- package/es/icons.js +241 -0
- package/es/icons.js.map +1 -0
- package/es/index.d.ts +17 -0
- package/es/index.js +34 -0
- package/es/index.js.map +1 -0
- package/es/layout/index.d.ts +1 -0
- package/es/layout/index.js +2 -0
- package/es/layout/index.js.map +1 -0
- package/es/layout/pivot-header-layout.d.ts +155 -0
- package/es/layout/pivot-header-layout.js +888 -0
- package/es/layout/pivot-header-layout.js.map +1 -0
- package/es/layout/pivot-layout.d.ts +86 -0
- package/es/layout/pivot-layout.js +416 -0
- package/es/layout/pivot-layout.js.map +1 -0
- package/es/layout/simple-header-layout.d.ts +67 -0
- package/es/layout/simple-header-layout.js +405 -0
- package/es/layout/simple-header-layout.js.map +1 -0
- package/es/menu/dom/BaseMenu.d.ts +15 -0
- package/es/menu/dom/BaseMenu.js +22 -0
- package/es/menu/dom/BaseMenu.js.map +1 -0
- package/es/menu/dom/Menu.d.ts +9 -0
- package/es/menu/dom/Menu.js +18 -0
- package/es/menu/dom/Menu.js.map +1 -0
- package/es/menu/dom/MenuHandler.d.ts +20 -0
- package/es/menu/dom/MenuHandler.js +132 -0
- package/es/menu/dom/MenuHandler.js.map +1 -0
- package/es/menu/dom/logic/MenuContainer.d.ts +22 -0
- package/es/menu/dom/logic/MenuContainer.js +105 -0
- package/es/menu/dom/logic/MenuContainer.js.map +1 -0
- package/es/menu/dom/logic/MenuElement.css +86 -0
- package/es/menu/dom/logic/MenuElement.d.ts +27 -0
- package/es/menu/dom/logic/MenuElement.js +277 -0
- package/es/menu/dom/logic/MenuElement.js.map +1 -0
- package/es/plugins/chartTypes.d.ts +3 -0
- package/es/plugins/chartTypes.js +2 -0
- package/es/plugins/chartTypes.js.map +1 -0
- package/es/plugins/icons.d.ts +12 -0
- package/es/plugins/icons.js +22 -0
- package/es/plugins/icons.js.map +1 -0
- package/es/plugins/themes.d.ts +4 -0
- package/es/plugins/themes.js +2 -0
- package/es/plugins/themes.js.map +1 -0
- package/es/register.d.ts +5 -0
- package/es/register.js +31 -0
- package/es/register.js.map +1 -0
- package/es/render/layout/arc.d.ts +23 -0
- package/es/render/layout/arc.js +12 -0
- package/es/render/layout/arc.js.map +1 -0
- package/es/render/layout/circle.d.ts +19 -0
- package/es/render/layout/circle.js +11 -0
- package/es/render/layout/circle.js.map +1 -0
- package/es/render/layout/container.d.ts +52 -0
- package/es/render/layout/container.js +99 -0
- package/es/render/layout/container.js.map +1 -0
- package/es/render/layout/direction.d.ts +22 -0
- package/es/render/layout/direction.js +31 -0
- package/es/render/layout/direction.js.map +1 -0
- package/es/render/layout/element.d.ts +47 -0
- package/es/render/layout/element.js +19 -0
- package/es/render/layout/element.js.map +1 -0
- package/es/render/layout/group-element.d.ts +25 -0
- package/es/render/layout/group-element.js +46 -0
- package/es/render/layout/group-element.js.map +1 -0
- package/es/render/layout/icon.d.ts +21 -0
- package/es/render/layout/icon.js +19 -0
- package/es/render/layout/icon.js.map +1 -0
- package/es/render/layout/image.d.ts +21 -0
- package/es/render/layout/image.js +12 -0
- package/es/render/layout/image.js.map +1 -0
- package/es/render/layout/index.d.ts +9 -0
- package/es/render/layout/index.js +18 -0
- package/es/render/layout/index.js.map +1 -0
- package/es/render/layout/line.d.ts +32 -0
- package/es/render/layout/line.js +80 -0
- package/es/render/layout/line.js.map +1 -0
- package/es/render/layout/percent-calc.d.ts +8 -0
- package/es/render/layout/percent-calc.js +7 -0
- package/es/render/layout/percent-calc.js.map +1 -0
- package/es/render/layout/rect.d.ts +22 -0
- package/es/render/layout/rect.js +11 -0
- package/es/render/layout/rect.js.map +1 -0
- package/es/render/layout/text.d.ts +22 -0
- package/es/render/layout/text.js +18 -0
- package/es/render/layout/text.js.map +1 -0
- package/es/scenegraph/component/cell-content.d.ts +36 -0
- package/es/scenegraph/component/cell-content.js +98 -0
- package/es/scenegraph/component/cell-content.js.map +1 -0
- package/es/scenegraph/component/cell-mover.d.ts +15 -0
- package/es/scenegraph/component/cell-mover.js +101 -0
- package/es/scenegraph/component/cell-mover.js.map +1 -0
- package/es/scenegraph/component/custom.d.ts +7 -0
- package/es/scenegraph/component/custom.js +211 -0
- package/es/scenegraph/component/custom.js.map +1 -0
- package/es/scenegraph/component/drill-icon.d.ts +9 -0
- package/es/scenegraph/component/drill-icon.js +41 -0
- package/es/scenegraph/component/drill-icon.js.map +1 -0
- package/es/scenegraph/component/menu.d.ts +41 -0
- package/es/scenegraph/component/menu.js +212 -0
- package/es/scenegraph/component/menu.js.map +1 -0
- package/es/scenegraph/component/table-component.d.ts +37 -0
- package/es/scenegraph/component/table-component.js +304 -0
- package/es/scenegraph/component/table-component.js.map +1 -0
- package/es/scenegraph/component/util.d.ts +2 -0
- package/es/scenegraph/component/util.js +5 -0
- package/es/scenegraph/component/util.js.map +1 -0
- package/es/scenegraph/debug-tool/debug-tool.d.ts +36 -0
- package/es/scenegraph/debug-tool/debug-tool.js +126 -0
- package/es/scenegraph/debug-tool/debug-tool.js.map +1 -0
- package/es/scenegraph/debug-tool/index.d.ts +4 -0
- package/es/scenegraph/debug-tool/index.js +6 -0
- package/es/scenegraph/debug-tool/index.js.map +1 -0
- package/es/scenegraph/graphic/chart.d.ts +30 -0
- package/es/scenegraph/graphic/chart.js +59 -0
- package/es/scenegraph/graphic/chart.js.map +1 -0
- package/es/scenegraph/graphic/contributions/chart-render.d.ts +10 -0
- package/es/scenegraph/graphic/contributions/chart-render.js +47 -0
- package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -0
- package/es/scenegraph/graphic/contributions/group-contribution-render.d.ts +70 -0
- package/es/scenegraph/graphic/contributions/group-contribution-render.js +192 -0
- package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -0
- package/es/scenegraph/graphic/contributions/image-contribution-render.d.ts +20 -0
- package/es/scenegraph/graphic/contributions/image-contribution-render.js +42 -0
- package/es/scenegraph/graphic/contributions/image-contribution-render.js.map +1 -0
- package/es/scenegraph/graphic/contributions/index.d.ts +3 -0
- package/es/scenegraph/graphic/contributions/index.js +29 -0
- package/es/scenegraph/graphic/contributions/index.js.map +1 -0
- package/es/scenegraph/graphic/contributions/rect-contribution-render.d.ts +17 -0
- package/es/scenegraph/graphic/contributions/rect-contribution-render.js +45 -0
- package/es/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -0
- package/es/scenegraph/graphic/group.d.ts +23 -0
- package/es/scenegraph/graphic/group.js +86 -0
- package/es/scenegraph/graphic/group.js.map +1 -0
- package/es/scenegraph/graphic/icon.d.ts +24 -0
- package/es/scenegraph/graphic/icon.js +17 -0
- package/es/scenegraph/graphic/icon.js.map +1 -0
- package/es/scenegraph/graphic/text.d.ts +16 -0
- package/es/scenegraph/graphic/text.js +142 -0
- package/es/scenegraph/graphic/text.js.map +1 -0
- package/es/scenegraph/group-creater/cell-helper.d.ts +7 -0
- package/es/scenegraph/group-creater/cell-helper.js +93 -0
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -0
- package/es/scenegraph/group-creater/cell-type/chart-cell.d.ts +3 -0
- package/es/scenegraph/group-creater/cell-type/chart-cell.js +54 -0
- package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -0
- package/es/scenegraph/group-creater/cell-type/image-cell.d.ts +7 -0
- package/es/scenegraph/group-creater/cell-type/image-cell.js +102 -0
- package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -0
- package/es/scenegraph/group-creater/cell-type/progress-bar-cell.d.ts +9 -0
- package/es/scenegraph/group-creater/cell-type/progress-bar-cell.js +337 -0
- package/es/scenegraph/group-creater/cell-type/progress-bar-cell.js.map +1 -0
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.d.ts +3 -0
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.js +165 -0
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -0
- package/es/scenegraph/group-creater/cell-type/text-cell.d.ts +5 -0
- package/es/scenegraph/group-creater/cell-type/text-cell.js +66 -0
- package/es/scenegraph/group-creater/cell-type/text-cell.js.map +1 -0
- package/es/scenegraph/group-creater/cell-type/video-cell.d.ts +4 -0
- package/es/scenegraph/group-creater/cell-type/video-cell.js +86 -0
- package/es/scenegraph/group-creater/cell-type/video-cell.js.map +1 -0
- package/es/scenegraph/group-creater/column-helper.d.ts +24 -0
- package/es/scenegraph/group-creater/column-helper.js +135 -0
- package/es/scenegraph/group-creater/column-helper.js.map +1 -0
- package/es/scenegraph/group-creater/column.d.ts +14 -0
- package/es/scenegraph/group-creater/column.js +49 -0
- package/es/scenegraph/group-creater/column.js.map +1 -0
- package/es/scenegraph/group-creater/progress/proxy.d.ts +45 -0
- package/es/scenegraph/group-creater/progress/proxy.js +268 -0
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -0
- package/es/scenegraph/header-icon/layout.d.ts +3 -0
- package/es/scenegraph/header-icon/layout.js +69 -0
- package/es/scenegraph/header-icon/layout.js.map +1 -0
- package/es/scenegraph/hover-state.d.ts +14 -0
- package/es/scenegraph/hover-state.js +19 -0
- package/es/scenegraph/hover-state.js.map +1 -0
- package/es/scenegraph/layout/auto-height.d.ts +2 -0
- package/es/scenegraph/layout/auto-height.js +44 -0
- package/es/scenegraph/layout/auto-height.js.map +1 -0
- 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.d.ts +3 -0
- package/es/scenegraph/layout/compute-col-width.js +167 -0
- package/es/scenegraph/layout/compute-col-width.js.map +1 -0
- package/es/scenegraph/layout/move-cell.d.ts +2 -0
- package/es/scenegraph/layout/move-cell.js +55 -0
- package/es/scenegraph/layout/move-cell.js.map +1 -0
- package/es/scenegraph/layout/update-cell.d.ts +3 -0
- package/es/scenegraph/layout/update-cell.js +55 -0
- package/es/scenegraph/layout/update-cell.js.map +1 -0
- package/es/scenegraph/layout/update-height.d.ts +6 -0
- package/es/scenegraph/layout/update-height.js +91 -0
- package/es/scenegraph/layout/update-height.js.map +1 -0
- package/es/scenegraph/layout/update-width.d.ts +2 -0
- package/es/scenegraph/layout/update-width.js +105 -0
- package/es/scenegraph/layout/update-width.js.map +1 -0
- package/es/scenegraph/scenegraph.d.ts +109 -0
- package/es/scenegraph/scenegraph.js +818 -0
- package/es/scenegraph/scenegraph.js.map +1 -0
- package/es/scenegraph/style/frame-border.d.ts +3 -0
- package/es/scenegraph/style/frame-border.js +35 -0
- package/es/scenegraph/style/frame-border.js.map +1 -0
- package/es/scenegraph/utils/border-line.d.ts +8 -0
- package/es/scenegraph/utils/border-line.js +45 -0
- package/es/scenegraph/utils/border-line.js.map +1 -0
- package/es/scenegraph/utils/break-string.d.ts +1 -0
- package/es/scenegraph/utils/break-string.js +31 -0
- package/es/scenegraph/utils/break-string.js.map +1 -0
- package/es/scenegraph/utils/cell-pos.d.ts +4 -0
- package/es/scenegraph/utils/cell-pos.js +12 -0
- package/es/scenegraph/utils/cell-pos.js.map +1 -0
- package/es/scenegraph/utils/font.d.ts +1 -0
- package/es/scenegraph/utils/font.js +6 -0
- package/es/scenegraph/utils/font.js.map +1 -0
- package/es/scenegraph/utils/get-cell-merge.d.ts +3 -0
- package/es/scenegraph/utils/get-cell-merge.js +5 -0
- package/es/scenegraph/utils/get-cell-merge.js.map +1 -0
- package/es/scenegraph/utils/get-prop.d.ts +4 -0
- package/es/scenegraph/utils/get-prop.js +36 -0
- package/es/scenegraph/utils/get-prop.js.map +1 -0
- package/es/scenegraph/utils/icon.d.ts +12 -0
- package/es/scenegraph/utils/icon.js +29 -0
- package/es/scenegraph/utils/icon.js.map +1 -0
- package/es/scenegraph/utils/keep-aspect-ratio.d.ts +4 -0
- package/es/scenegraph/utils/keep-aspect-ratio.js +10 -0
- package/es/scenegraph/utils/keep-aspect-ratio.js.map +1 -0
- package/es/scenegraph/utils/measure-text.d.ts +20 -0
- package/es/scenegraph/utils/measure-text.js +114 -0
- package/es/scenegraph/utils/measure-text.js.map +1 -0
- package/es/scenegraph/utils/padding.d.ts +1 -0
- package/es/scenegraph/utils/padding.js +8 -0
- package/es/scenegraph/utils/padding.js.map +1 -0
- package/es/scenegraph/utils/text-icon-layout.d.ts +9 -0
- package/es/scenegraph/utils/text-icon-layout.js +239 -0
- package/es/scenegraph/utils/text-icon-layout.js.map +1 -0
- package/es/scenegraph/utils/text-pos.d.ts +8 -0
- package/es/scenegraph/utils/text-pos.js +20 -0
- package/es/scenegraph/utils/text-pos.js.map +1 -0
- package/es/state/cell-move/adjust-header.d.ts +3 -0
- package/es/state/cell-move/adjust-header.js +14 -0
- package/es/state/cell-move/adjust-header.js.map +1 -0
- package/es/state/cell-move/index.d.ts +4 -0
- package/es/state/cell-move/index.js +52 -0
- package/es/state/cell-move/index.js.map +1 -0
- package/es/state/common/check-in-select.d.ts +8 -0
- package/es/state/common/check-in-select.js +53 -0
- package/es/state/common/check-in-select.js.map +1 -0
- package/es/state/drill/index.d.ts +2 -0
- package/es/state/drill/index.js +9 -0
- package/es/state/drill/index.js.map +1 -0
- package/es/state/hover/col.d.ts +5 -0
- package/es/state/hover/col.js +16 -0
- package/es/state/hover/col.js.map +1 -0
- package/es/state/hover/is-cell-hover.d.ts +5 -0
- package/es/state/hover/is-cell-hover.js +30 -0
- package/es/state/hover/is-cell-hover.js.map +1 -0
- package/es/state/hover/row.d.ts +5 -0
- package/es/state/hover/row.js +14 -0
- package/es/state/hover/row.js.map +1 -0
- package/es/state/hover/single.d.ts +5 -0
- package/es/state/hover/single.js +10 -0
- package/es/state/hover/single.js.map +1 -0
- package/es/state/hover/update-cell.d.ts +2 -0
- package/es/state/hover/update-cell.js +7 -0
- package/es/state/hover/update-cell.js.map +1 -0
- package/es/state/hover/update-position.d.ts +2 -0
- package/es/state/hover/update-position.js +36 -0
- package/es/state/hover/update-position.js.map +1 -0
- package/es/state/pin/index.d.ts +2 -0
- package/es/state/pin/index.js +4 -0
- package/es/state/pin/index.js.map +1 -0
- package/es/state/select/update-position.d.ts +4 -0
- package/es/state/select/update-position.js +103 -0
- package/es/state/select/update-position.js.map +1 -0
- package/es/state/sort/index.d.ts +2 -0
- package/es/state/sort/index.js +35 -0
- package/es/state/sort/index.js.map +1 -0
- package/es/state/spark-line/index.d.ts +3 -0
- package/es/state/spark-line/index.js +92 -0
- package/es/state/spark-line/index.js.map +1 -0
- package/es/state/state.d.ts +155 -0
- package/es/state/state.js +458 -0
- package/es/state/state.js.map +1 -0
- package/es/themes/ARCO.d.ts +3 -0
- package/es/themes/ARCO.js +110 -0
- package/es/themes/ARCO.js.map +1 -0
- package/es/themes/BRIGHT.d.ts +3 -0
- package/es/themes/BRIGHT.js +67 -0
- package/es/themes/BRIGHT.js.map +1 -0
- package/es/themes/DARK.d.ts +3 -0
- package/es/themes/DARK.js +86 -0
- package/es/themes/DARK.js.map +1 -0
- package/es/themes/DEFAULT.d.ts +3 -0
- package/es/themes/DEFAULT.js +85 -0
- package/es/themes/DEFAULT.js.map +1 -0
- package/es/themes/SIMPLIFY.d.ts +3 -0
- package/es/themes/SIMPLIFY.js +42 -0
- package/es/themes/SIMPLIFY.js.map +1 -0
- package/es/themes/theme.d.ts +34 -0
- package/es/themes/theme.js +505 -0
- package/es/themes/theme.js.map +1 -0
- package/es/themes.d.ts +28 -0
- package/es/themes.js +62 -0
- package/es/themes.js.map +1 -0
- package/es/tools/LimitPromiseQueue.d.ts +8 -0
- package/es/tools/LimitPromiseQueue.js +21 -0
- package/es/tools/LimitPromiseQueue.js.map +1 -0
- package/es/tools/NumberMap.d.ts +16 -0
- package/es/tools/NumberMap.js +70 -0
- package/es/tools/NumberMap.js.map +1 -0
- package/es/tools/Rect.d.ts +24 -0
- package/es/tools/Rect.js +61 -0
- package/es/tools/Rect.js.map +1 -0
- package/es/tools/calc.d.ts +5 -0
- package/es/tools/calc.js +191 -0
- package/es/tools/calc.js.map +1 -0
- package/es/tools/debounce.d.ts +1 -0
- package/es/tools/debounce.js +43 -0
- package/es/tools/debounce.js.map +1 -0
- package/es/tools/dom.d.ts +1 -0
- package/es/tools/dom.js +5 -0
- package/es/tools/dom.js.map +1 -0
- package/es/tools/env.d.ts +19 -0
- package/es/tools/env.js +42 -0
- package/es/tools/env.js.map +1 -0
- package/es/tools/global.d.ts +13 -0
- package/es/tools/global.js +26 -0
- package/es/tools/global.js.map +1 -0
- package/es/tools/helper.d.ts +60 -0
- package/es/tools/helper.js +216 -0
- package/es/tools/helper.js.map +1 -0
- package/es/tools/icons.d.ts +4 -0
- package/es/tools/icons.js +4 -0
- package/es/tools/icons.js.map +1 -0
- package/es/tools/isx.d.ts +16 -0
- package/es/tools/isx.js +79 -0
- package/es/tools/isx.js.map +1 -0
- package/es/tools/sort.d.ts +1 -0
- package/es/tools/sort.js +12 -0
- package/es/tools/sort.js.map +1 -0
- package/es/tools/style.css +60 -0
- package/es/tools/style.d.ts +2 -0
- package/es/tools/style.js +5 -0
- package/es/tools/style.js.map +1 -0
- package/es/tools/text-width.d.ts +1 -0
- package/es/tools/text-width.js +9 -0
- package/es/tools/text-width.js.map +1 -0
- package/es/tools/util.d.ts +45 -0
- package/es/tools/util.js +250 -0
- package/es/tools/util.js.map +1 -0
- package/es/tooltip/BaseTooltip.d.ts +22 -0
- package/es/tooltip/BaseTooltip.js +27 -0
- package/es/tooltip/BaseTooltip.js.map +1 -0
- package/es/tooltip/Tooltip.d.ts +5 -0
- package/es/tooltip/Tooltip.js +10 -0
- package/es/tooltip/Tooltip.js.map +1 -0
- package/es/tooltip/TooltipHandler.d.ts +27 -0
- package/es/tooltip/TooltipHandler.js +131 -0
- package/es/tooltip/TooltipHandler.js.map +1 -0
- package/es/tooltip/logic/BubbleTooltipElement.css +63 -0
- package/es/tooltip/logic/BubbleTooltipElement.d.ts +33 -0
- package/es/tooltip/logic/BubbleTooltipElement.js +149 -0
- package/es/tooltip/logic/BubbleTooltipElement.js.map +1 -0
- package/es/ts-types/base-table.d.ts +313 -0
- package/es/ts-types/base-table.js +2 -0
- package/es/ts-types/base-table.js.map +1 -0
- package/es/ts-types/chartType.d.ts +53 -0
- package/es/ts-types/chartType.js +2 -0
- package/es/ts-types/chartType.js.map +1 -0
- package/es/ts-types/column/index.d.ts +2 -0
- package/es/ts-types/column/index.js +4 -0
- package/es/ts-types/column/index.js.map +1 -0
- package/es/ts-types/column/style.d.ts +78 -0
- package/es/ts-types/column/style.js +2 -0
- package/es/ts-types/column/style.js.map +1 -0
- package/es/ts-types/column/type.d.ts +2 -0
- package/es/ts-types/column/type.js +2 -0
- package/es/ts-types/column/type.js.map +1 -0
- package/es/ts-types/common.d.ts +72 -0
- package/es/ts-types/common.js +2 -0
- package/es/ts-types/common.js.map +1 -0
- package/es/ts-types/customElement.d.ts +111 -0
- package/es/ts-types/customElement.js +2 -0
- package/es/ts-types/customElement.js.map +1 -0
- package/es/ts-types/customLayout.d.ts +8 -0
- package/es/ts-types/customLayout.js +2 -0
- package/es/ts-types/customLayout.js.map +1 -0
- package/es/ts-types/events.d.ts +182 -0
- package/es/ts-types/events.js +2 -0
- package/es/ts-types/events.js.map +1 -0
- package/es/ts-types/icon.d.ts +86 -0
- package/es/ts-types/icon.js +28 -0
- package/es/ts-types/icon.js.map +1 -0
- package/es/ts-types/index.d.ts +15 -0
- package/es/ts-types/index.js +30 -0
- package/es/ts-types/index.js.map +1 -0
- package/es/ts-types/list-table/define/basic-define.d.ts +36 -0
- package/es/ts-types/list-table/define/basic-define.js +2 -0
- package/es/ts-types/list-table/define/basic-define.js.map +1 -0
- package/es/ts-types/list-table/define/chart-define.d.ts +10 -0
- package/es/ts-types/list-table/define/chart-define.js +2 -0
- package/es/ts-types/list-table/define/chart-define.js.map +1 -0
- package/es/ts-types/list-table/define/image-define.d.ts +15 -0
- package/es/ts-types/list-table/define/image-define.js +2 -0
- package/es/ts-types/list-table/define/image-define.js.map +1 -0
- package/es/ts-types/list-table/define/index.d.ts +21 -0
- package/es/ts-types/list-table/define/index.js +2 -0
- package/es/ts-types/list-table/define/index.js.map +1 -0
- package/es/ts-types/list-table/define/link-define.d.ts +17 -0
- package/es/ts-types/list-table/define/link-define.js +2 -0
- package/es/ts-types/list-table/define/link-define.js.map +1 -0
- package/es/ts-types/list-table/define/multilinetext-define.d.ts +12 -0
- package/es/ts-types/list-table/define/multilinetext-define.js +2 -0
- package/es/ts-types/list-table/define/multilinetext-define.js.map +1 -0
- package/es/ts-types/list-table/define/progressbar-define.d.ts +11 -0
- package/es/ts-types/list-table/define/progressbar-define.js +2 -0
- package/es/ts-types/list-table/define/progressbar-define.js.map +1 -0
- package/es/ts-types/list-table/define/sparkline-define.d.ts +10 -0
- package/es/ts-types/list-table/define/sparkline-define.js +2 -0
- package/es/ts-types/list-table/define/sparkline-define.js.map +1 -0
- package/es/ts-types/list-table/index.d.ts +2 -0
- package/es/ts-types/list-table/index.js +4 -0
- package/es/ts-types/list-table/index.js.map +1 -0
- package/es/ts-types/list-table/layout-map/api.d.ts +92 -0
- package/es/ts-types/list-table/layout-map/api.js +2 -0
- package/es/ts-types/list-table/layout-map/api.js.map +1 -0
- package/es/ts-types/list-table/layout-map/index.d.ts +1 -0
- package/es/ts-types/list-table/layout-map/index.js +2 -0
- package/es/ts-types/list-table/layout-map/index.js.map +1 -0
- package/es/ts-types/menu.d.ts +73 -0
- package/es/ts-types/menu.js +2 -0
- package/es/ts-types/menu.js.map +1 -0
- package/es/ts-types/new-data-set.d.ts +95 -0
- package/es/ts-types/new-data-set.js +13 -0
- package/es/ts-types/new-data-set.js.map +1 -0
- package/es/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.d.ts +6 -0
- package/es/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js +9 -0
- package/es/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js.map +1 -0
- package/es/ts-types/pivot-table/corner.d.ts +19 -0
- package/es/ts-types/pivot-table/corner.js +2 -0
- package/es/ts-types/pivot-table/corner.js.map +1 -0
- package/es/ts-types/pivot-table/dimension/basic-dimension.d.ts +25 -0
- package/es/ts-types/pivot-table/dimension/basic-dimension.js +2 -0
- package/es/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -0
- package/es/ts-types/pivot-table/dimension/image-dimension.d.ts +9 -0
- package/es/ts-types/pivot-table/dimension/image-dimension.js +2 -0
- package/es/ts-types/pivot-table/dimension/image-dimension.js.map +1 -0
- package/es/ts-types/pivot-table/dimension/index.d.ts +4 -0
- package/es/ts-types/pivot-table/dimension/index.js +2 -0
- package/es/ts-types/pivot-table/dimension/index.js.map +1 -0
- package/es/ts-types/pivot-table/dimension/link-dimension.d.ts +10 -0
- package/es/ts-types/pivot-table/dimension/link-dimension.js +2 -0
- package/es/ts-types/pivot-table/dimension/link-dimension.js.map +1 -0
- package/es/ts-types/pivot-table/dimension/multilinetext-dimension.d.ts +7 -0
- package/es/ts-types/pivot-table/dimension/multilinetext-dimension.js +2 -0
- package/es/ts-types/pivot-table/dimension/multilinetext-dimension.js.map +1 -0
- package/es/ts-types/pivot-table/index.d.ts +4 -0
- package/es/ts-types/pivot-table/index.js +8 -0
- package/es/ts-types/pivot-table/index.js.map +1 -0
- package/es/ts-types/pivot-table/indicator/basic-indicator.d.ts +26 -0
- package/es/ts-types/pivot-table/indicator/basic-indicator.js +2 -0
- package/es/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -0
- package/es/ts-types/pivot-table/indicator/chart-indicator.d.ts +10 -0
- package/es/ts-types/pivot-table/indicator/chart-indicator.js +2 -0
- package/es/ts-types/pivot-table/indicator/chart-indicator.js.map +1 -0
- package/es/ts-types/pivot-table/indicator/image-indicator.d.ts +15 -0
- package/es/ts-types/pivot-table/indicator/image-indicator.js +2 -0
- package/es/ts-types/pivot-table/indicator/image-indicator.js.map +1 -0
- package/es/ts-types/pivot-table/indicator/index.d.ts +10 -0
- package/es/ts-types/pivot-table/indicator/index.js +2 -0
- package/es/ts-types/pivot-table/indicator/index.js.map +1 -0
- package/es/ts-types/pivot-table/indicator/link-indicator.d.ts +17 -0
- package/es/ts-types/pivot-table/indicator/link-indicator.js +2 -0
- package/es/ts-types/pivot-table/indicator/link-indicator.js.map +1 -0
- package/es/ts-types/pivot-table/indicator/multilinetext-indicator.d.ts +11 -0
- package/es/ts-types/pivot-table/indicator/multilinetext-indicator.js +2 -0
- package/es/ts-types/pivot-table/indicator/multilinetext-indicator.js.map +1 -0
- package/es/ts-types/pivot-table/indicator/progress-indicator.d.ts +11 -0
- package/es/ts-types/pivot-table/indicator/progress-indicator.js +2 -0
- package/es/ts-types/pivot-table/indicator/progress-indicator.js.map +1 -0
- package/es/ts-types/pivot-table/indicator/sparkline-indicator.d.ts +10 -0
- package/es/ts-types/pivot-table/indicator/sparkline-indicator.js +2 -0
- package/es/ts-types/pivot-table/indicator/sparkline-indicator.js.map +1 -0
- package/es/ts-types/pivot-table/title.d.ts +18 -0
- package/es/ts-types/pivot-table/title.js +2 -0
- package/es/ts-types/pivot-table/title.js.map +1 -0
- package/es/ts-types/style-define.d.ts +60 -0
- package/es/ts-types/style-define.js +2 -0
- package/es/ts-types/style-define.js.map +1 -0
- package/es/ts-types/table-engine.d.ts +169 -0
- package/es/ts-types/table-engine.js +12 -0
- package/es/ts-types/table-engine.js.map +1 -0
- package/es/ts-types/theme.d.ts +88 -0
- package/es/ts-types/theme.js +2 -0
- package/es/ts-types/theme.js.map +1 -0
- package/es/ts-types/tooltip.d.ts +22 -0
- package/es/ts-types/tooltip.js +2 -0
- package/es/ts-types/tooltip.js.map +1 -0
- package/package.json +95 -0
|
@@ -0,0 +1,1281 @@
|
|
|
1
|
+
import * as columnStyleContents from "../body-helper/style";
|
|
2
|
+
|
|
3
|
+
import * as headerStyleContents from "../header-helper/style";
|
|
4
|
+
|
|
5
|
+
import "../tools/style.css";
|
|
6
|
+
|
|
7
|
+
import * as style from "../tools/style";
|
|
8
|
+
|
|
9
|
+
import { event, style as utilStyle } from "../tools/helper";
|
|
10
|
+
|
|
11
|
+
import { TABLE_EVENT_TYPE } from "./TABLE_EVENT_TYPE";
|
|
12
|
+
|
|
13
|
+
import { EventHandler } from "../event/EventHandler";
|
|
14
|
+
|
|
15
|
+
import { EventTarget } from "../event/EventTarget";
|
|
16
|
+
|
|
17
|
+
import { NumberMap } from "../tools/NumberMap";
|
|
18
|
+
|
|
19
|
+
import { Rect } from "../tools/Rect";
|
|
20
|
+
|
|
21
|
+
import { defaultOrderFn, isValid, throttle2 } from "../tools/util";
|
|
22
|
+
|
|
23
|
+
import themes from "../themes";
|
|
24
|
+
|
|
25
|
+
import { Env } from "../tools/env";
|
|
26
|
+
|
|
27
|
+
import { Scenegraph } from "../scenegraph/scenegraph";
|
|
28
|
+
|
|
29
|
+
import { StateManeger } from "../state/state";
|
|
30
|
+
|
|
31
|
+
import { EventManeger } from "../event/event";
|
|
32
|
+
|
|
33
|
+
import { BodyHelper } from "../body-helper/body-helper";
|
|
34
|
+
|
|
35
|
+
import { HeaderHelper } from "../header-helper/header-helper";
|
|
36
|
+
|
|
37
|
+
import { TooltipHandler } from "../tooltip/TooltipHandler";
|
|
38
|
+
|
|
39
|
+
import { WrapText } from "../scenegraph/graphic/text";
|
|
40
|
+
|
|
41
|
+
import { textMeasure } from "../scenegraph/utils/measure-text";
|
|
42
|
+
|
|
43
|
+
import { getStyleTheme } from "../scenegraph/group-creater/column-helper";
|
|
44
|
+
|
|
45
|
+
import { getProp } from "../scenegraph/utils/get-prop";
|
|
46
|
+
|
|
47
|
+
import { IconCache } from "../plugins/icons";
|
|
48
|
+
|
|
49
|
+
import { _applyColWidthLimits, _getScrollableVisibleRect, _getTargetFrozenColAt, _getTargetFrozenRowAt, _setDataSource, _setRecords, _toPxWidth, createRootElement, isAutoDefine, updateRootElementPadding } from "./tableHelper";
|
|
50
|
+
|
|
51
|
+
import { MenuHandler } from "../menu/dom/MenuHandler";
|
|
52
|
+
|
|
53
|
+
import { FocusInput } from "./FouseInput";
|
|
54
|
+
|
|
55
|
+
const {toBoxArray: toBoxArray} = utilStyle, {isTouchEvent: isTouchEvent} = event, rangeReg = /^\$(\d+)\$(\d+)$/;
|
|
56
|
+
|
|
57
|
+
export class BaseTable extends EventTarget {
|
|
58
|
+
static get EVENT_TYPE() {
|
|
59
|
+
return TABLE_EVENT_TYPE;
|
|
60
|
+
}
|
|
61
|
+
constructor(options = {}) {
|
|
62
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
63
|
+
super(), this.showPin = !0, this.showSort = !0, this.id = `VTable${Date.now()}`,
|
|
64
|
+
this.throttleInvalidate = throttle2(this.invalidate.bind(this), 200);
|
|
65
|
+
const {frozenColCount: frozenColCount = 0, defaultRowHeight: defaultRowHeight = 40, defaultHeaderRowHeight: defaultHeaderRowHeight, defaultColWidth: defaultColWidth = 80, defaultHeaderColWidth: defaultHeaderColWidth, widthMode: widthMode = "standard", keyboardOptions: keyboardOptions, parentElement: parentElement, columnResizeMode: columnResizeMode, dragHeaderMode: dragHeaderMode, showPin: showPin, allowFrozenColCount: allowFrozenColCount, padding: padding, hover: hover, menu: menu, select: click, customRender: customRender, pixelRatio: pixelRatio = 1} = options;
|
|
66
|
+
this.options = options, this._widthMode = widthMode, this.customRender = customRender,
|
|
67
|
+
this.padding = {
|
|
68
|
+
top: 0,
|
|
69
|
+
right: 0,
|
|
70
|
+
left: 0,
|
|
71
|
+
bottom: 0
|
|
72
|
+
}, padding && ("number" == typeof padding ? (this.padding.top = padding, this.padding.left = padding,
|
|
73
|
+
this.padding.bottom = padding, this.padding.right = padding) : (padding.top && (this.padding.top = padding.top),
|
|
74
|
+
padding.bottom && (this.padding.bottom = padding.bottom), padding.left && (this.padding.left = padding.left),
|
|
75
|
+
padding.right && (this.padding.right = padding.right))), this.tableNoFrameWidth = 0,
|
|
76
|
+
this.tableNoFrameHeight = 0;
|
|
77
|
+
const internalProps = this.internalProps = {};
|
|
78
|
+
void 0 !== showPin && (this.showPin = showPin), "number" == typeof allowFrozenColCount && allowFrozenColCount <= 0 && (this.showPin = !1),
|
|
79
|
+
internalProps.autoRowHeight = null !== (_a = options.autoRowHeight) && void 0 !== _a && _a,
|
|
80
|
+
internalProps.handler = new EventHandler, internalProps.element = createRootElement(this.padding),
|
|
81
|
+
internalProps.focusControl = new FocusInput(this, internalProps.element), internalProps.pixelRatio = pixelRatio,
|
|
82
|
+
internalProps.canvas = document.createElement("canvas"), internalProps.element.appendChild(internalProps.canvas),
|
|
83
|
+
internalProps.context = internalProps.canvas.getContext("2d"), internalProps.frozenColCount = frozenColCount,
|
|
84
|
+
internalProps.defaultRowHeight = defaultRowHeight, internalProps.defaultHeaderRowHeight = null != defaultHeaderRowHeight ? defaultHeaderRowHeight : defaultRowHeight,
|
|
85
|
+
internalProps.defaultColWidth = defaultColWidth, internalProps.defaultHeaderColWidth = null != defaultHeaderColWidth ? defaultHeaderColWidth : defaultColWidth,
|
|
86
|
+
internalProps.keyboardOptions = keyboardOptions, internalProps.columnResizeMode = columnResizeMode,
|
|
87
|
+
internalProps.dragHeaderMode = dragHeaderMode, internalProps._rowHeightsMap = new NumberMap,
|
|
88
|
+
internalProps._rowRangeHeightsMap = new Map, internalProps._colRangeWidthsMap = new Map,
|
|
89
|
+
this.colWidthsMap = new NumberMap, this.colContentWidthsMap = new NumberMap, this.colWidthsLimit = {},
|
|
90
|
+
internalProps.calcWidthContext = {
|
|
91
|
+
_: internalProps,
|
|
92
|
+
get full() {
|
|
93
|
+
var _a;
|
|
94
|
+
return this._.canvas.width / (null !== (_a = this._.context.pixelRatio) && void 0 !== _a ? _a : window.devicePixelRatio);
|
|
95
|
+
}
|
|
96
|
+
}, internalProps.cellTextOverflows = {}, internalProps.focusedTable = !1, internalProps.theme = themes.of(null !== (_b = options.theme) && void 0 !== _b ? _b : themes.DEFAULT),
|
|
97
|
+
parentElement ? (parentElement.innerHTML = "", parentElement.appendChild(internalProps.element),
|
|
98
|
+
this._updateSize()) : this._updateSize(), this._cellToBeInvalidatedNextFrame = new Set,
|
|
99
|
+
this._willNextFrameInvalidate = !1, this.options = options, internalProps.theme = themes.of(null !== (_c = options.theme) && void 0 !== _c ? _c : themes.DEFAULT),
|
|
100
|
+
internalProps.bodyHelper = new BodyHelper(this), internalProps.headerHelper = new HeaderHelper(this),
|
|
101
|
+
internalProps.autoWrapText = options.autoWrapText, internalProps.allowFrozenColCount = null !== (_d = options.allowFrozenColCount) && void 0 !== _d ? _d : internalProps.colCount,
|
|
102
|
+
internalProps.limitMaxAutoWidth = null !== (_e = options.limitMaxAutoWidth) && void 0 !== _e ? _e : 450,
|
|
103
|
+
this.scenegraph = new Scenegraph(this), this.stateManeger = new StateManeger(this),
|
|
104
|
+
this.eventManeger = new EventManeger(this), internalProps.tooltip = Object.assign({
|
|
105
|
+
renderMode: "html",
|
|
106
|
+
isShowOverflowTextTooltip: !1,
|
|
107
|
+
confine: !0
|
|
108
|
+
}, options.tooltip), "html" === internalProps.tooltip.renderMode && (internalProps.tooltipHandler = new TooltipHandler(this, internalProps.tooltip.confine)),
|
|
109
|
+
internalProps.menu = Object.assign({
|
|
110
|
+
renderMode: "html"
|
|
111
|
+
}, options.menu), Array.isArray(null === (_f = options.menu) || void 0 === _f ? void 0 : _f.dropDownMenuHighlight) && this.setDropDownMenuHighlight(null === (_g = options.menu) || void 0 === _g ? void 0 : _g.dropDownMenuHighlight),
|
|
112
|
+
Array.isArray(null === (_h = options.menu) || void 0 === _h ? void 0 : _h.defaultHeaderMenuItems) && (this.globalDropDownMenu = options.menu.defaultHeaderMenuItems),
|
|
113
|
+
"html" === internalProps.menu.renderMode && (internalProps.menuHandler = new MenuHandler(this)),
|
|
114
|
+
this.headerStyleCache = new Map, this.bodyStyleCache = new Map;
|
|
115
|
+
}
|
|
116
|
+
getParentElement() {
|
|
117
|
+
return this.options.parentElement;
|
|
118
|
+
}
|
|
119
|
+
getElement() {
|
|
120
|
+
return this.internalProps.element;
|
|
121
|
+
}
|
|
122
|
+
get canvas() {
|
|
123
|
+
return this.internalProps.canvas;
|
|
124
|
+
}
|
|
125
|
+
get rowCount() {
|
|
126
|
+
return this.internalProps.rowCount;
|
|
127
|
+
}
|
|
128
|
+
set rowCount(rowCount) {
|
|
129
|
+
this.internalProps.rowCount = rowCount;
|
|
130
|
+
}
|
|
131
|
+
get colCount() {
|
|
132
|
+
var _a;
|
|
133
|
+
return null !== (_a = this.internalProps.colCount) && void 0 !== _a ? _a : 0;
|
|
134
|
+
}
|
|
135
|
+
set colCount(colCount) {
|
|
136
|
+
this.internalProps.colCount = colCount;
|
|
137
|
+
}
|
|
138
|
+
get frozenColCount() {
|
|
139
|
+
var _a;
|
|
140
|
+
return null !== (_a = this.internalProps.frozenColCount) && void 0 !== _a ? _a : 0;
|
|
141
|
+
}
|
|
142
|
+
set frozenColCount(frozenColCount) {
|
|
143
|
+
frozenColCount >= this.colCount && (frozenColCount = 0), this.internalProps.frozenColCount = frozenColCount,
|
|
144
|
+
this.options.frozenColCount = frozenColCount, this.tableNoFrameWidth - this.getColsWidth(0, frozenColCount - 1) <= 120 && (this.internalProps.frozenColCount = 0),
|
|
145
|
+
this.stateManeger.setFrozenCol(this.internalProps.frozenColCount);
|
|
146
|
+
}
|
|
147
|
+
setFrozenColCount(frozenColCount) {
|
|
148
|
+
frozenColCount >= this.colCount && (frozenColCount = 0), this.internalProps.frozenColCount = frozenColCount,
|
|
149
|
+
this.options.frozenColCount = frozenColCount, this.tableNoFrameWidth - this.getColsWidth(0, frozenColCount - 1) <= 120 && (this.internalProps.frozenColCount = 0),
|
|
150
|
+
this.stateManeger.setFrozenCol(this.internalProps.frozenColCount);
|
|
151
|
+
}
|
|
152
|
+
_setFrozenColCount(frozenColCount) {
|
|
153
|
+
frozenColCount >= this.colCount && (frozenColCount = 0), this.internalProps.frozenColCount = frozenColCount;
|
|
154
|
+
}
|
|
155
|
+
_resetFrozenColCount() {
|
|
156
|
+
this.options.frozenColCount && (this.tableNoFrameWidth - this.getColsWidth(0, this.options.frozenColCount - 1) <= 120 ? this._setFrozenColCount(0) : this.frozenColCount !== this.options.frozenColCount && this._setFrozenColCount(this.options.frozenColCount));
|
|
157
|
+
}
|
|
158
|
+
get frozenRowCount() {
|
|
159
|
+
var _a;
|
|
160
|
+
return null !== (_a = this.internalProps.frozenRowCount) && void 0 !== _a ? _a : 0;
|
|
161
|
+
}
|
|
162
|
+
set frozenRowCount(frozenRowCount) {
|
|
163
|
+
this.internalProps.frozenRowCount = frozenRowCount;
|
|
164
|
+
}
|
|
165
|
+
get defaultRowHeight() {
|
|
166
|
+
return this.internalProps.defaultRowHeight;
|
|
167
|
+
}
|
|
168
|
+
set defaultRowHeight(defaultRowHeight) {
|
|
169
|
+
this.internalProps.defaultRowHeight = defaultRowHeight, this.options.defaultRowHeight = defaultRowHeight;
|
|
170
|
+
}
|
|
171
|
+
get defaultHeaderRowHeight() {
|
|
172
|
+
return this.internalProps.defaultHeaderRowHeight;
|
|
173
|
+
}
|
|
174
|
+
set defaultHeaderRowHeight(defaultHeaderRowHeight) {
|
|
175
|
+
this.internalProps.defaultHeaderRowHeight = defaultHeaderRowHeight, this.options.defaultHeaderRowHeight = defaultHeaderRowHeight;
|
|
176
|
+
}
|
|
177
|
+
get defaultColWidth() {
|
|
178
|
+
return this.internalProps.defaultColWidth;
|
|
179
|
+
}
|
|
180
|
+
set defaultColWidth(defaultColWidth) {
|
|
181
|
+
this.internalProps.defaultColWidth = defaultColWidth, this.options.defaultColWidth = defaultColWidth;
|
|
182
|
+
}
|
|
183
|
+
get defaultHeaderColWidth() {
|
|
184
|
+
return this.internalProps.defaultHeaderColWidth;
|
|
185
|
+
}
|
|
186
|
+
set defaultHeaderColWidth(defaultHeaderColWidth) {
|
|
187
|
+
this.internalProps.defaultHeaderColWidth = defaultHeaderColWidth, this.options.defaultHeaderColWidth = defaultHeaderColWidth;
|
|
188
|
+
}
|
|
189
|
+
get colWidthsMap() {
|
|
190
|
+
return this.internalProps._colWidthsMap;
|
|
191
|
+
}
|
|
192
|
+
set colWidthsMap(colWidthsMap) {
|
|
193
|
+
this.internalProps._colWidthsMap = colWidthsMap;
|
|
194
|
+
}
|
|
195
|
+
get colContentWidthsMap() {
|
|
196
|
+
return this.internalProps._colContentWidthsMap;
|
|
197
|
+
}
|
|
198
|
+
set colContentWidthsMap(colContentWidthsMap) {
|
|
199
|
+
this.internalProps._colContentWidthsMap = colContentWidthsMap;
|
|
200
|
+
}
|
|
201
|
+
get _colRangeWidthsMap() {
|
|
202
|
+
return this.internalProps._colRangeWidthsMap;
|
|
203
|
+
}
|
|
204
|
+
set _colRangeWidthsMap(_colRangeWidthsMap) {
|
|
205
|
+
this.internalProps._colRangeWidthsMap = _colRangeWidthsMap;
|
|
206
|
+
}
|
|
207
|
+
get _rowRangeHeightsMap() {
|
|
208
|
+
return this.internalProps._rowRangeHeightsMap;
|
|
209
|
+
}
|
|
210
|
+
set _rowRangeHeightsMap(_rowRangeHeightsMap) {
|
|
211
|
+
this.internalProps._rowRangeHeightsMap = _rowRangeHeightsMap;
|
|
212
|
+
}
|
|
213
|
+
get rowHeightsMap() {
|
|
214
|
+
return this.internalProps._rowHeightsMap;
|
|
215
|
+
}
|
|
216
|
+
set rowHeightsMap(rowHeightsMap) {
|
|
217
|
+
this.internalProps._rowHeightsMap = rowHeightsMap;
|
|
218
|
+
}
|
|
219
|
+
get colWidthsLimit() {
|
|
220
|
+
return this.internalProps._colWidthsLimit;
|
|
221
|
+
}
|
|
222
|
+
set colWidthsLimit(colWidthsLimit) {
|
|
223
|
+
this.internalProps._colWidthsLimit = colWidthsLimit;
|
|
224
|
+
}
|
|
225
|
+
get keyboardOptions() {
|
|
226
|
+
var _a;
|
|
227
|
+
return null !== (_a = this.internalProps.keyboardOptions) && void 0 !== _a ? _a : null;
|
|
228
|
+
}
|
|
229
|
+
set keyboardOptions(keyboardOptions) {
|
|
230
|
+
this.internalProps.keyboardOptions = null != keyboardOptions ? keyboardOptions : void 0;
|
|
231
|
+
}
|
|
232
|
+
get widthMode() {
|
|
233
|
+
return this._widthMode;
|
|
234
|
+
}
|
|
235
|
+
set widthMode(widthMode) {
|
|
236
|
+
widthMode !== this._widthMode && (this._widthMode = widthMode);
|
|
237
|
+
}
|
|
238
|
+
_colWidthDefineToPxWidth(width) {
|
|
239
|
+
return isAutoDefine(width) ? _toPxWidth(this, this._calculateAutoColWidthExpr()) : _toPxWidth(this, width);
|
|
240
|
+
}
|
|
241
|
+
_calculateAutoColWidthExpr() {
|
|
242
|
+
const fullWidth = this.internalProps.calcWidthContext.full;
|
|
243
|
+
let sumMin = 0;
|
|
244
|
+
const others = [];
|
|
245
|
+
let autoCount = 0;
|
|
246
|
+
const hasLimitsOnAuto = [];
|
|
247
|
+
for (let col = 0; col < this.internalProps.colCount; col++) {
|
|
248
|
+
const def = this.getColWidthDefine(col), limits = this._getColWidthLimits(col);
|
|
249
|
+
if (isAutoDefine(def)) limits && (hasLimitsOnAuto.push(limits), limits.min && (sumMin += limits.min)),
|
|
250
|
+
autoCount++; else {
|
|
251
|
+
let expr = def;
|
|
252
|
+
if (limits) {
|
|
253
|
+
const orgWidth = _toPxWidth(this, expr), newWidth = _applyColWidthLimits(limits, orgWidth);
|
|
254
|
+
orgWidth !== newWidth && (expr = `${newWidth}px`), sumMin += newWidth;
|
|
255
|
+
}
|
|
256
|
+
others.push(expr);
|
|
257
|
+
}
|
|
258
|
+
if (sumMin > fullWidth) return "0px";
|
|
259
|
+
}
|
|
260
|
+
if (hasLimitsOnAuto.length && others.length) {
|
|
261
|
+
const autoPx = (fullWidth - _toPxWidth(this, `calc(${others.map((c => "number" == typeof c ? `${c}px` : c)).join(" + ")})`)) / autoCount;
|
|
262
|
+
if (hasLimitsOnAuto.forEach((limits => {
|
|
263
|
+
limits.min && autoPx < limits.min ? (others.push(limits.minDef), autoCount--) : limits.max && limits.max < autoPx && (others.push(limits.maxDef),
|
|
264
|
+
autoCount--);
|
|
265
|
+
})), autoCount <= 0) return `${autoPx}px`;
|
|
266
|
+
}
|
|
267
|
+
if (others.length) {
|
|
268
|
+
const strDefs = [];
|
|
269
|
+
let num = 0;
|
|
270
|
+
return others.forEach((c => {
|
|
271
|
+
"number" == typeof c ? num += c : strDefs.push(c);
|
|
272
|
+
})), strDefs.push(`${num}px`), `calc((100% - (${strDefs.join(" + ")})) / ${autoCount})`;
|
|
273
|
+
}
|
|
274
|
+
return 100 / autoCount + "%";
|
|
275
|
+
}
|
|
276
|
+
_getColWidthLimits(col) {
|
|
277
|
+
const limit = this.colWidthsLimit[col];
|
|
278
|
+
if (!limit) return null;
|
|
279
|
+
const result = {};
|
|
280
|
+
return limit.min && (result.min = _toPxWidth(this, limit.min), result.minDef = limit.min),
|
|
281
|
+
limit.max && (result.max = _toPxWidth(this, limit.max), result.maxDef = limit.max),
|
|
282
|
+
result;
|
|
283
|
+
}
|
|
284
|
+
_adjustColWidth(col, orgWidth) {
|
|
285
|
+
const limits = this._getColWidthLimits(col);
|
|
286
|
+
return Math.max(_applyColWidthLimits(limits, orgWidth), 0);
|
|
287
|
+
}
|
|
288
|
+
setPixelRatio(pixelRatio) {}
|
|
289
|
+
_updateSize() {
|
|
290
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
|
|
291
|
+
const {padding: padding} = this;
|
|
292
|
+
let widthP = 0, heightP = 0;
|
|
293
|
+
if ("browser" === Env.mode) {
|
|
294
|
+
const element = this.getElement(), width1 = null !== (_b = null === (_a = element.parentElement) || void 0 === _a ? void 0 : _a.offsetWidth) && void 0 !== _b ? _b : 0, height1 = null !== (_d = null === (_c = element.parentElement) || void 0 === _c ? void 0 : _c.offsetHeight) && void 0 !== _d ? _d : 0;
|
|
295
|
+
element.style.width = width1 && width1 - padding.left - padding.right + "px" || "0px",
|
|
296
|
+
element.style.height = height1 && height1 - padding.top - padding.bottom + "px" || "0px";
|
|
297
|
+
const {canvas: canvas} = this.internalProps;
|
|
298
|
+
canvas.style.width = "", canvas.style.height = "", widthP = null !== (_f = null === (_e = canvas.parentElement) || void 0 === _e ? void 0 : _e.offsetWidth) && void 0 !== _f ? _f : 0,
|
|
299
|
+
heightP = null !== (_h = null === (_g = canvas.parentElement) || void 0 === _g ? void 0 : _g.offsetHeight) && void 0 !== _h ? _h : 0,
|
|
300
|
+
canvas.width = widthP, canvas.height = heightP, canvas.style.width = `${widthP}px`,
|
|
301
|
+
canvas.style.height = `${heightP}px`;
|
|
302
|
+
} else "node" === Env.mode && (widthP = this.canvasWidth - 1, heightP = this.canvasHeight - 1);
|
|
303
|
+
const width = Math.floor(widthP - style.getScrollBarSize(this.getTheme().scrollStyle)), height = Math.floor(heightP - style.getScrollBarSize(this.getTheme().scrollStyle));
|
|
304
|
+
if (null === (_j = this.internalProps.theme) || void 0 === _j ? void 0 : _j.frameStyle) {
|
|
305
|
+
const lineWidths = toBoxArray(null !== (_l = null === (_k = this.internalProps.theme.frameStyle) || void 0 === _k ? void 0 : _k.borderLineWidth) && void 0 !== _l ? _l : [ null ]), shadowWidths = toBoxArray(null !== (_o = null === (_m = this.internalProps.theme.frameStyle) || void 0 === _m ? void 0 : _m.shadowBlur) && void 0 !== _o ? _o : [ 0 ]);
|
|
306
|
+
this.tableX = (null !== (_p = lineWidths[3]) && void 0 !== _p ? _p : 0) + (null !== (_q = shadowWidths[3]) && void 0 !== _q ? _q : 0),
|
|
307
|
+
this.tableY = (null !== (_r = lineWidths[0]) && void 0 !== _r ? _r : 0) + (null !== (_s = shadowWidths[0]) && void 0 !== _s ? _s : 0),
|
|
308
|
+
this.tableNoFrameWidth = width - ((null !== (_t = lineWidths[1]) && void 0 !== _t ? _t : 0) + (null !== (_u = shadowWidths[1]) && void 0 !== _u ? _u : 0)) - ((null !== (_v = lineWidths[3]) && void 0 !== _v ? _v : 0) + (null !== (_w = shadowWidths[3]) && void 0 !== _w ? _w : 0)),
|
|
309
|
+
this.tableNoFrameHeight = height - ((null !== (_x = lineWidths[0]) && void 0 !== _x ? _x : 0) + (null !== (_y = shadowWidths[0]) && void 0 !== _y ? _y : 0)) - ((null !== (_z = lineWidths[2]) && void 0 !== _z ? _z : 0) + (null !== (_0 = shadowWidths[2]) && void 0 !== _0 ? _0 : 0));
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
get rowHierarchyType() {
|
|
313
|
+
return "grid";
|
|
314
|
+
}
|
|
315
|
+
setColWidths(widths) {
|
|
316
|
+
widths.forEach(((value, index) => this.setColWidth(index, value)));
|
|
317
|
+
}
|
|
318
|
+
getColsWidth(startCol, endCol) {
|
|
319
|
+
var _a;
|
|
320
|
+
endCol = Math.min(endCol, this.colCount - 1);
|
|
321
|
+
const cachedColWidth = this._colRangeWidthsMap.get(`$${startCol}$${endCol}`);
|
|
322
|
+
if (null != cachedColWidth) return cachedColWidth;
|
|
323
|
+
const cachedLowerColWidth = this._colRangeWidthsMap.get(`$${startCol}$${endCol - 1}`);
|
|
324
|
+
if (null != cachedLowerColWidth) {
|
|
325
|
+
const width = this.colWidthsMap.get(endCol);
|
|
326
|
+
let adjustW;
|
|
327
|
+
adjustW = width ? "adaptive" === this.widthMode || this.transpose ? Number(width) : this._adjustColWidth(endCol, this._colWidthDefineToPxWidth(width)) : 0;
|
|
328
|
+
const addWidth = cachedLowerColWidth + adjustW;
|
|
329
|
+
return startCol >= 0 && endCol >= 0 && !Number.isNaN(addWidth) && this._colRangeWidthsMap.set(`$${startCol}$${endCol}`, Math.round(addWidth)),
|
|
330
|
+
Math.round(addWidth);
|
|
331
|
+
}
|
|
332
|
+
let w = 0;
|
|
333
|
+
for (let col = startCol; col <= endCol; col++) w += this.isRowHeader(col, 0) || this.isCornerHeader(col, 0) ? Array.isArray(this.defaultHeaderColWidth) ? null !== (_a = this.defaultHeaderColWidth[col]) && void 0 !== _a ? _a : this.internalProps.defaultColWidth : this.defaultHeaderColWidth : this.internalProps.defaultColWidth;
|
|
334
|
+
this.colWidthsMap.each(startCol, endCol, ((width, col) => {
|
|
335
|
+
var _a;
|
|
336
|
+
w += ("adaptive" === this.widthMode || this.transpose ? Number(width) : this._adjustColWidth(col, this._colWidthDefineToPxWidth(width))) - (this.isRowHeader(col, 0) || this.isCornerHeader(col, 0) ? Array.isArray(this.defaultHeaderColWidth) ? null !== (_a = this.defaultHeaderColWidth[col]) && void 0 !== _a ? _a : this.internalProps.defaultColWidth : this.defaultHeaderColWidth : this.internalProps.defaultColWidth);
|
|
337
|
+
}));
|
|
338
|
+
for (let col = startCol; col <= endCol; col++) {
|
|
339
|
+
if (this.colWidthsMap.has(col)) continue;
|
|
340
|
+
const adj = this._adjustColWidth(col, this.internalProps.defaultColWidth);
|
|
341
|
+
adj !== this.internalProps.defaultColWidth && (w += adj - this.internalProps.defaultColWidth);
|
|
342
|
+
}
|
|
343
|
+
return startCol >= 0 && endCol >= 0 && this._colRangeWidthsMap.set(`$${startCol}$${endCol}`, Math.round(w)),
|
|
344
|
+
Math.round(w);
|
|
345
|
+
}
|
|
346
|
+
getRowHeight(row) {
|
|
347
|
+
var _a;
|
|
348
|
+
return this.rowHeightsMap.get(row) || (this.isColumnHeader(0, row) || this.isCornerHeader(0, row) ? Array.isArray(this.defaultHeaderRowHeight) ? null !== (_a = this.defaultHeaderRowHeight[row]) && void 0 !== _a ? _a : this.internalProps.defaultRowHeight : this.defaultHeaderRowHeight : this.internalProps.defaultRowHeight);
|
|
349
|
+
}
|
|
350
|
+
setRowHeight(row, height, clearCache) {
|
|
351
|
+
this.rowHeightsMap.put(row, Math.round(height)), clearCache && this._clearRowRangeHeightsMap(row);
|
|
352
|
+
}
|
|
353
|
+
fillRowsHeight(rowStart, rowEnd, rowHeight) {
|
|
354
|
+
var _a;
|
|
355
|
+
for (let row = rowStart; row <= rowEnd; row++) this.rowHeightsMap.put(row, Math.round(rowHeight)),
|
|
356
|
+
this._rowRangeHeightsMap.set(`$0$${row}`, Math.round((null !== (_a = this._rowRangeHeightsMap.get("$0$" + (row - 1))) && void 0 !== _a ? _a : 0) + rowHeight));
|
|
357
|
+
}
|
|
358
|
+
getRowsHeight(startRow, endRow) {
|
|
359
|
+
var _a, _b, _c;
|
|
360
|
+
const cachedRowHeight = this._rowRangeHeightsMap.get(`$${startRow}$${endRow}`);
|
|
361
|
+
if (null != cachedRowHeight) return cachedRowHeight;
|
|
362
|
+
const cachedLowerRowHeight = this._rowRangeHeightsMap.get(`$${startRow}$${endRow - 1}`);
|
|
363
|
+
if (null != cachedLowerRowHeight) {
|
|
364
|
+
const height = Math.round(cachedLowerRowHeight + (null !== (_a = this.rowHeightsMap.get(endRow)) && void 0 !== _a ? _a : this.isColumnHeader(0, endRow) || this.isCornerHeader(0, endRow) ? Array.isArray(this.defaultHeaderRowHeight) ? null !== (_b = this.defaultHeaderRowHeight[endRow]) && void 0 !== _b ? _b : this.internalProps.defaultRowHeight : this.defaultHeaderRowHeight : this.internalProps.defaultRowHeight));
|
|
365
|
+
return startRow >= 0 && endRow >= 0 && this._rowRangeHeightsMap.set(`$${startRow}$${endRow}`, Math.round(height)),
|
|
366
|
+
height;
|
|
367
|
+
}
|
|
368
|
+
let h = 0;
|
|
369
|
+
for (let i = startRow; i <= endRow; i++) h += this.rowHeightsMap.get(i) || (this.isColumnHeader(0, i) || this.isCornerHeader(0, i) ? Array.isArray(this.defaultHeaderRowHeight) ? null !== (_c = this.defaultHeaderRowHeight[i]) && void 0 !== _c ? _c : this.internalProps.defaultRowHeight : this.defaultHeaderRowHeight : this.internalProps.defaultRowHeight);
|
|
370
|
+
return startRow >= 0 && endRow >= 0 && h > 0 && this._rowRangeHeightsMap.set(`$${startRow}$${endRow}`, Math.round(h)),
|
|
371
|
+
Math.round(h);
|
|
372
|
+
}
|
|
373
|
+
getColWidthDefine(col) {
|
|
374
|
+
var _a;
|
|
375
|
+
const width = this.colWidthsMap.get(col);
|
|
376
|
+
return "number" == typeof width && width <= 0 ? 0 : width || (this.isRowHeader(col, 0) || this.isCornerHeader(col, 0) ? Array.isArray(this.defaultHeaderColWidth) ? null !== (_a = this.defaultHeaderColWidth[col]) && void 0 !== _a ? _a : this.defaultColWidth : this.defaultHeaderColWidth : this.defaultColWidth);
|
|
377
|
+
}
|
|
378
|
+
getColWidth(col) {
|
|
379
|
+
const width = this.getColWidthDefine(col);
|
|
380
|
+
return "adaptive" === this.widthMode && "number" == typeof width || this.transpose && "number" == typeof width ? this._colWidthDefineToPxWidth(width) : this._adjustColWidth(col, this._colWidthDefineToPxWidth(width));
|
|
381
|
+
}
|
|
382
|
+
setColWidth(col, width, clearCache, skipCheckFrozen) {
|
|
383
|
+
this.colWidthsMap.put(col, "number" == typeof width ? Math.round(width) : width),
|
|
384
|
+
clearCache && this._clearColRangeWidthsMap(col), skipCheckFrozen || this.stateManeger.checkFrozen();
|
|
385
|
+
}
|
|
386
|
+
_clearColRangeWidthsMap(col) {
|
|
387
|
+
if ("number" != typeof col) this._colRangeWidthsMap.clear(); else {
|
|
388
|
+
const keys = this._colRangeWidthsMap.keys();
|
|
389
|
+
for (const key of keys) {
|
|
390
|
+
const reg = rangeReg.exec(key);
|
|
391
|
+
if (reg) {
|
|
392
|
+
const start = Number(reg[1]), end = Number(reg[2]);
|
|
393
|
+
col >= start && col <= end && this._colRangeWidthsMap.delete(key);
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
_clearRowRangeHeightsMap(row) {
|
|
399
|
+
const keys = this._rowRangeHeightsMap.keys();
|
|
400
|
+
for (const key of keys) {
|
|
401
|
+
const reg = rangeReg.exec(key);
|
|
402
|
+
if (reg) {
|
|
403
|
+
const start = Number(reg[1]), end = Number(reg[2]);
|
|
404
|
+
row >= start && row <= end && this._rowRangeHeightsMap.delete(key);
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
_getColContentWidth(col) {
|
|
409
|
+
return Number(this.colContentWidthsMap.get(col));
|
|
410
|
+
}
|
|
411
|
+
_setColContentWidth(col, width) {
|
|
412
|
+
this.colContentWidthsMap.put(col, width);
|
|
413
|
+
}
|
|
414
|
+
getAllRowsHeight() {
|
|
415
|
+
if (this.internalProps.rowCount <= 0) return 0;
|
|
416
|
+
return this.getRowsHeight(0, this.internalProps.rowCount - 1);
|
|
417
|
+
}
|
|
418
|
+
getAllColsWidth() {
|
|
419
|
+
if (this.internalProps.colCount <= 0) return 0;
|
|
420
|
+
return this.getColsWidth(0, this.internalProps.colCount - 1);
|
|
421
|
+
}
|
|
422
|
+
getMaxColWidth(col) {
|
|
423
|
+
var _a;
|
|
424
|
+
const obj = this.colWidthsLimit[col];
|
|
425
|
+
let max = null !== (_a = obj && obj.max) && void 0 !== _a ? _a : 1 / 0;
|
|
426
|
+
return "string" == typeof max && (max = _toPxWidth(this, max)), max;
|
|
427
|
+
}
|
|
428
|
+
setMaxColWidth(col, maxwidth) {
|
|
429
|
+
(this.colWidthsLimit[col] || (this.colWidthsLimit[col] = {})).max = maxwidth;
|
|
430
|
+
}
|
|
431
|
+
getMinColWidth(col) {
|
|
432
|
+
var _a;
|
|
433
|
+
const obj = this.colWidthsLimit[col];
|
|
434
|
+
let min = null !== (_a = obj && obj.min) && void 0 !== _a ? _a : 0;
|
|
435
|
+
return "string" == typeof min && (min = _toPxWidth(this, min)), min;
|
|
436
|
+
}
|
|
437
|
+
setMinColWidth(col, minwidth) {
|
|
438
|
+
(this.colWidthsLimit[col] || (this.colWidthsLimit[col] = {})).min = minwidth;
|
|
439
|
+
}
|
|
440
|
+
getCellRect(col, row) {
|
|
441
|
+
const isFrozenCell = this.isFrozenCell(col, row);
|
|
442
|
+
let absoluteLeft = this.getColsWidth(0, col - 1) || 0;
|
|
443
|
+
const width = this.getColWidth(col);
|
|
444
|
+
isFrozenCell && isFrozenCell.col && (absoluteLeft += this.scrollLeft);
|
|
445
|
+
let absoluteTop = this.getRowsHeight(0, row - 1);
|
|
446
|
+
const height = this.getRowHeight(row);
|
|
447
|
+
return isFrozenCell && isFrozenCell.row && (absoluteTop += this.scrollTop), new Rect(Math.round(absoluteLeft), Math.round(absoluteTop), Math.round(width), Math.round(height));
|
|
448
|
+
}
|
|
449
|
+
getMergeCellRect(col, row) {
|
|
450
|
+
const cellRange = this.getCellRange(col, row), absoluteLeft = this.getColsWidth(0, cellRange.start.col - 1) || 0, width = this.getColsWidth(cellRange.start.col, cellRange.end.col), absoluteTop = this.getRowsHeight(0, cellRange.start.row - 1) || 0, height = this.getRowsHeight(cellRange.start.row, cellRange.end.row);
|
|
451
|
+
return new Rect(Math.round(absoluteLeft), Math.round(absoluteTop), Math.round(width), Math.round(height));
|
|
452
|
+
}
|
|
453
|
+
getCellRelativeRect(col, row) {
|
|
454
|
+
return this._toRelativeRect(this.getCellRect(col, row));
|
|
455
|
+
}
|
|
456
|
+
getCellRangeRelativeRect(range) {
|
|
457
|
+
if (range.start) return this._toRelativeRect(this.getCellsRect(range.start.col, range.start.row, range.end.col, range.end.row));
|
|
458
|
+
const cellRange = this.getCellRange(range.col, range.row);
|
|
459
|
+
return this._toRelativeRect(this.getCellsRect(cellRange.start.col, cellRange.start.row, cellRange.end.col, cellRange.end.row));
|
|
460
|
+
}
|
|
461
|
+
getVisibleCellRangeRelativeRect(range) {
|
|
462
|
+
let cellRange;
|
|
463
|
+
return cellRange = range.start ? range : this.getCellRange(range.col, range.row),
|
|
464
|
+
this._getVisiableRect(this.getCellRangeRelativeRect(range), cellRange);
|
|
465
|
+
}
|
|
466
|
+
_getVisiableRect(relativeRectObj, cellRange) {
|
|
467
|
+
const targetLeft = cellRange.start.col >= this.frozenColCount ? Math.max(relativeRectObj.left, this.frozenColCount >= 1 ? this.getColsWidth(0, this.frozenColCount - 1) : 0) : relativeRectObj.left, targetRight = Math.min(relativeRectObj.right, this.tableNoFrameWidth), rect = relativeRectObj.copy();
|
|
468
|
+
rect.left = targetLeft, rect.right = targetRight;
|
|
469
|
+
const targetTop = cellRange.start.row >= this.frozenRowCount ? Math.max(relativeRectObj.top, this.frozenRowCount >= 1 ? this.getRowsHeight(0, this.frozenRowCount - 1) : 0) : relativeRectObj.top, targetBottom = Math.min(relativeRectObj.bottom, this.tableNoFrameHeight);
|
|
470
|
+
return rect.top = targetTop, rect.bottom = targetBottom, rect;
|
|
471
|
+
}
|
|
472
|
+
getCellsRect(startCol, startRow, endCol, endRow) {
|
|
473
|
+
const isFrozenStartCell = this.isFrozenCell(startCol, startRow), isFrozenEndCell = this.isFrozenCell(endCol, endRow);
|
|
474
|
+
let absoluteLeft = this.getColsWidth(0, startCol - 1) || 0, width = this.getColsWidth(startCol, endCol);
|
|
475
|
+
if (isFrozenStartCell && isFrozenStartCell.col) {
|
|
476
|
+
const scrollLeft = this.scrollLeft;
|
|
477
|
+
absoluteLeft += scrollLeft, isFrozenEndCell && isFrozenEndCell.col || (width -= scrollLeft,
|
|
478
|
+
width = Math.max(width, this.getColsWidth(startCol, this.frozenColCount - 1)));
|
|
479
|
+
}
|
|
480
|
+
let absoluteTop = this.getRowsHeight(0, startRow - 1), height = this.getRowsHeight(startRow, endRow);
|
|
481
|
+
if (isFrozenStartCell && isFrozenStartCell.row) {
|
|
482
|
+
const scrollTop = this.scrollTop;
|
|
483
|
+
absoluteTop += scrollTop, isFrozenEndCell && isFrozenEndCell.row || (height -= scrollTop,
|
|
484
|
+
height = Math.max(height, this.getRowsHeight(startRow, this.frozenRowCount - 1)));
|
|
485
|
+
}
|
|
486
|
+
return new Rect(Math.round(absoluteLeft), Math.round(absoluteTop), Math.round(width), Math.round(height));
|
|
487
|
+
}
|
|
488
|
+
getCellsRectWidth(startCol, startRow, endCol, endRow) {
|
|
489
|
+
const isFrozenStartCell = this.isFrozenCell(startCol, startRow), isFrozenEndCell = this.isFrozenCell(endCol, endRow);
|
|
490
|
+
let width = this.getColsWidth(startCol, endCol);
|
|
491
|
+
if (isFrozenStartCell && isFrozenStartCell.col) {
|
|
492
|
+
const scrollLeft = this.scrollLeft;
|
|
493
|
+
isFrozenEndCell && isFrozenEndCell.col || (width -= scrollLeft, width = Math.max(width, this.getColsWidth(startCol, this.frozenColCount - 1)));
|
|
494
|
+
}
|
|
495
|
+
return width;
|
|
496
|
+
}
|
|
497
|
+
getCellRangeRect(range) {
|
|
498
|
+
if (range.start) return this.getCellsRect(range.start.col, range.start.row, range.end.col, range.end.row);
|
|
499
|
+
const cellRange = this.getCellRange(range.col, range.row);
|
|
500
|
+
return this.getCellsRect(cellRange.start.col, cellRange.start.row, cellRange.end.col, cellRange.end.row);
|
|
501
|
+
}
|
|
502
|
+
getCellRangeRectWidth(range) {
|
|
503
|
+
if (range.start) return this.getCellsRectWidth(range.start.col, range.start.row, range.end.col, range.end.row);
|
|
504
|
+
const cellRange = this.getCellRange(range.col, range.row);
|
|
505
|
+
return this.getCellsRectWidth(cellRange.start.col, cellRange.start.row, cellRange.end.col, cellRange.end.row);
|
|
506
|
+
}
|
|
507
|
+
isFrozenCell(col, row) {
|
|
508
|
+
const {frozenRowCount: frozenRowCount, frozenColCount: frozenColCount} = this.internalProps, isFrozenRow = frozenRowCount > 0 && row < frozenRowCount, isFrozenCol = frozenColCount > 0 && col < frozenColCount;
|
|
509
|
+
return isFrozenRow || isFrozenCol ? {
|
|
510
|
+
row: isFrozenRow,
|
|
511
|
+
col: isFrozenCol
|
|
512
|
+
} : null;
|
|
513
|
+
}
|
|
514
|
+
getRowAt(absoluteY) {
|
|
515
|
+
const frozen = _getTargetFrozenRowAt(this, absoluteY);
|
|
516
|
+
if (frozen) return frozen;
|
|
517
|
+
let row = this.getTargetRowAt(absoluteY);
|
|
518
|
+
return row || (row = {
|
|
519
|
+
top: -1,
|
|
520
|
+
row: -1,
|
|
521
|
+
bottom: -1,
|
|
522
|
+
height: -1
|
|
523
|
+
}), row;
|
|
524
|
+
}
|
|
525
|
+
getColAt(absoluteX) {
|
|
526
|
+
const frozen = _getTargetFrozenColAt(this, absoluteX);
|
|
527
|
+
if (frozen) return frozen;
|
|
528
|
+
let col = this.getTargetColAt(absoluteX);
|
|
529
|
+
return col || (col = {
|
|
530
|
+
left: -1,
|
|
531
|
+
col: -1,
|
|
532
|
+
right: -1,
|
|
533
|
+
width: 1
|
|
534
|
+
}), col;
|
|
535
|
+
}
|
|
536
|
+
getCellAt(absoluteX, absoluteY) {
|
|
537
|
+
const rowInfo = this.getRowAt(absoluteY), {row: row, top: top, bottom: bottom, height: height} = rowInfo, colInfo = this.getColAt(absoluteX), {col: col, left: left, right: right, width: width} = colInfo;
|
|
538
|
+
return {
|
|
539
|
+
row: row,
|
|
540
|
+
col: col,
|
|
541
|
+
rect: {
|
|
542
|
+
left: left,
|
|
543
|
+
right: right,
|
|
544
|
+
top: top,
|
|
545
|
+
bottom: bottom,
|
|
546
|
+
width: width,
|
|
547
|
+
height: height
|
|
548
|
+
}
|
|
549
|
+
};
|
|
550
|
+
}
|
|
551
|
+
_checkRowCol(col, row) {
|
|
552
|
+
return col >= 0 && col < this.colCount && row >= 0 && row < this.rowCount;
|
|
553
|
+
}
|
|
554
|
+
_makeVisibleCell(col, row) {
|
|
555
|
+
if (this._checkRowCol(col, row)) {
|
|
556
|
+
const isFrozenCell = this.isFrozenCell(col, row);
|
|
557
|
+
if (isFrozenCell && isFrozenCell.col && isFrozenCell.row) return;
|
|
558
|
+
const rect = this.getCellRect(col, row), visibleRect = _getScrollableVisibleRect(this);
|
|
559
|
+
if (visibleRect.contains(rect)) return;
|
|
560
|
+
isFrozenCell && isFrozenCell.col || this.getColsWidth(0, this.frozenColCount - 1) + rect.width > this.canvas.width || (rect.left < visibleRect.left ? this.scrollLeft -= visibleRect.left - rect.left : visibleRect.right < rect.right && (this.scrollLeft -= visibleRect.right - rect.right)),
|
|
561
|
+
isFrozenCell && isFrozenCell.row || this.getRowsHeight(0, this.frozenRowCount - 1) + rect.height > this.canvas.height || (rect.top < visibleRect.top ? this.scrollTop -= visibleRect.top - rect.top : visibleRect.bottom < rect.bottom && (this.scrollTop -= visibleRect.bottom - rect.bottom));
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
invalidate() {
|
|
565
|
+
this.scenegraph.renderSceneGraph();
|
|
566
|
+
}
|
|
567
|
+
_toRelativeRect(absoluteRect) {
|
|
568
|
+
const rect = absoluteRect.copy(), visibleRect = this.getVisibleRect();
|
|
569
|
+
return rect.offsetLeft(-visibleRect.left), rect.offsetTop(-visibleRect.top), rect;
|
|
570
|
+
}
|
|
571
|
+
getVisibleRect() {
|
|
572
|
+
const {scrollTop: scrollTop, scrollLeft: scrollLeft} = this, width = this.tableNoFrameWidth, height = this.tableNoFrameHeight;
|
|
573
|
+
return new Rect(scrollLeft, scrollTop, width, height);
|
|
574
|
+
}
|
|
575
|
+
get visibleRowCount() {
|
|
576
|
+
const {frozenRowCount: frozenRowCount} = this, visibleRect = this.getVisibleRect(), visibleTop = frozenRowCount > 0 ? visibleRect.top + this.getRowsHeight(0, frozenRowCount - 1) : visibleRect.top, initRow = this.getTargetRowAt(visibleTop);
|
|
577
|
+
if (!initRow) return 0;
|
|
578
|
+
const startRow = Math.max(initRow.top >= visibleTop ? initRow.row : initRow.row + 1, frozenRowCount);
|
|
579
|
+
let absoluteTop = this.getRowsHeight(0, startRow - 1), count = 0;
|
|
580
|
+
const {rowCount: rowCount} = this;
|
|
581
|
+
for (let row = startRow; row < rowCount; row++) {
|
|
582
|
+
const bottom = absoluteTop + this.getRowHeight(row);
|
|
583
|
+
if (visibleRect.bottom < bottom) break;
|
|
584
|
+
count++, absoluteTop = bottom;
|
|
585
|
+
}
|
|
586
|
+
return count;
|
|
587
|
+
}
|
|
588
|
+
get visibleColCount() {
|
|
589
|
+
const {frozenColCount: frozenColCount} = this, visibleRect = this.getVisibleRect(), visibleLeft = frozenColCount > 0 ? visibleRect.left + this.getColsWidth(0, frozenColCount - 1) : visibleRect.left, initCol = this.getTargetColAt(visibleLeft);
|
|
590
|
+
if (!initCol) return 0;
|
|
591
|
+
const startCol = Math.max(initCol.left >= visibleLeft ? initCol.col : initCol.col + 1, frozenColCount);
|
|
592
|
+
let absoluteLeft = this.getColsWidth(0, startCol - 1), count = 0;
|
|
593
|
+
const {colCount: colCount} = this;
|
|
594
|
+
for (let col = startCol; col < colCount; col++) {
|
|
595
|
+
const right = absoluteLeft + this.getColWidth(col);
|
|
596
|
+
if (visibleRect.right < right) break;
|
|
597
|
+
count++, absoluteLeft = right;
|
|
598
|
+
}
|
|
599
|
+
return count;
|
|
600
|
+
}
|
|
601
|
+
get scrollTop() {
|
|
602
|
+
return this.stateManeger.scroll.verticalBarPos;
|
|
603
|
+
}
|
|
604
|
+
set scrollTop(scrollTop) {
|
|
605
|
+
this.stateManeger.setScrollTop(scrollTop);
|
|
606
|
+
}
|
|
607
|
+
get scrollLeft() {
|
|
608
|
+
return this.stateManeger.scroll.horizontalBarPos;
|
|
609
|
+
}
|
|
610
|
+
set scrollLeft(scrollLeft) {
|
|
611
|
+
this.stateManeger.setScrollLeft(scrollLeft);
|
|
612
|
+
}
|
|
613
|
+
getScrollLeft() {
|
|
614
|
+
return this.scrollLeft;
|
|
615
|
+
}
|
|
616
|
+
getScrollTop() {
|
|
617
|
+
return this.scrollTop;
|
|
618
|
+
}
|
|
619
|
+
setScrollLeft(num) {
|
|
620
|
+
this.scrollLeft = num;
|
|
621
|
+
}
|
|
622
|
+
setScrollTop(num) {
|
|
623
|
+
this.scrollTop = num;
|
|
624
|
+
}
|
|
625
|
+
getCellOverflowText(col, row) {
|
|
626
|
+
return this.scenegraph.getCellOverflowText(col, row);
|
|
627
|
+
}
|
|
628
|
+
addDisposable(disposable) {
|
|
629
|
+
if (!disposable || !disposable.dispose || "function" != typeof disposable.dispose) throw new Error("not disposable!");
|
|
630
|
+
(this.internalProps.disposables = this.internalProps.disposables || []).push(disposable);
|
|
631
|
+
}
|
|
632
|
+
dispose() {
|
|
633
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
634
|
+
const internalProps = this.internalProps;
|
|
635
|
+
null === (_b = null === (_a = internalProps.tooltipHandler) || void 0 === _a ? void 0 : _a.dispose) || void 0 === _b || _b.call(_a),
|
|
636
|
+
null === (_d = null === (_c = internalProps.menuHandler) || void 0 === _c ? void 0 : _c.dispose) || void 0 === _d || _d.call(_c),
|
|
637
|
+
IconCache.clearAll(), null === (_e = super.dispose) || void 0 === _e || _e.call(this),
|
|
638
|
+
null === (_g = null === (_f = internalProps.handler) || void 0 === _f ? void 0 : _f.dispose) || void 0 === _g || _g.call(_f),
|
|
639
|
+
null === (_j = null === (_h = internalProps.focusControl) || void 0 === _h ? void 0 : _h.dispose) || void 0 === _j || _j.call(_h),
|
|
640
|
+
internalProps.disposables && (internalProps.disposables.forEach((disposable => {
|
|
641
|
+
var _a;
|
|
642
|
+
return null === (_a = null == disposable ? void 0 : disposable.dispose) || void 0 === _a ? void 0 : _a.call(disposable);
|
|
643
|
+
})), internalProps.disposables = null), this.scenegraph.stage.release();
|
|
644
|
+
const {parentElement: parentElement} = internalProps.element;
|
|
645
|
+
parentElement && parentElement.removeChild(internalProps.element);
|
|
646
|
+
}
|
|
647
|
+
fireListeners(type, ...event) {
|
|
648
|
+
return super.fireListeners(type, ...event);
|
|
649
|
+
}
|
|
650
|
+
updateOption(options) {
|
|
651
|
+
var _a, _b, _c, _d;
|
|
652
|
+
this.options = options;
|
|
653
|
+
const {frozenColCount: frozenColCount = 0, defaultRowHeight: defaultRowHeight = 40, defaultHeaderRowHeight: defaultHeaderRowHeight, defaultColWidth: defaultColWidth = 80, defaultHeaderColWidth: defaultHeaderColWidth = 80, keyboardOptions: keyboardOptions, columnResizeMode: columnResizeMode, dragHeaderMode: dragHeaderMode, showPin: showPin, allowFrozenColCount: allowFrozenColCount, padding: padding, hover: hover, menu: menu, select: click, pixelRatio: pixelRatio, widthMode: widthMode} = options;
|
|
654
|
+
pixelRatio && pixelRatio !== this.internalProps.pixelRatio && (this.internalProps.pixelRatio = pixelRatio),
|
|
655
|
+
padding && ("number" == typeof padding ? (this.padding.top = padding, this.padding.left = padding,
|
|
656
|
+
this.padding.bottom = padding, this.padding.right = padding) : (padding.top && (this.padding.top = padding.top),
|
|
657
|
+
padding.bottom && (this.padding.bottom = padding.bottom), padding.left && (this.padding.left = padding.left),
|
|
658
|
+
padding.right && (this.padding.right = padding.right))), this.showPin = "boolean" != typeof showPin || showPin,
|
|
659
|
+
"number" == typeof allowFrozenColCount && allowFrozenColCount <= 0 && (this.showPin = !1),
|
|
660
|
+
this.widthMode = null != widthMode ? widthMode : "standard";
|
|
661
|
+
const internalProps = this.internalProps;
|
|
662
|
+
"node" !== Env.mode && updateRootElementPadding(internalProps.element, this.padding),
|
|
663
|
+
internalProps.frozenColCount = frozenColCount, internalProps.defaultRowHeight = defaultRowHeight,
|
|
664
|
+
internalProps.defaultHeaderRowHeight = null != defaultHeaderRowHeight ? defaultHeaderRowHeight : defaultRowHeight,
|
|
665
|
+
internalProps.defaultColWidth = defaultColWidth, internalProps.defaultHeaderColWidth = null != defaultHeaderColWidth ? defaultHeaderColWidth : defaultColWidth,
|
|
666
|
+
internalProps.keyboardOptions = keyboardOptions, internalProps.columnResizeMode = columnResizeMode,
|
|
667
|
+
internalProps.dragHeaderMode = dragHeaderMode, internalProps.cellTextOverflows = {},
|
|
668
|
+
internalProps.theme = themes.of(null !== (_a = options.theme) && void 0 !== _a ? _a : themes.DEFAULT),
|
|
669
|
+
internalProps.autoRowHeight = null !== (_b = options.autoRowHeight) && void 0 !== _b && _b,
|
|
670
|
+
internalProps.autoWrapText = options.autoWrapText, internalProps.allowFrozenColCount = null !== (_c = options.allowFrozenColCount) && void 0 !== _c ? _c : internalProps.colCount,
|
|
671
|
+
internalProps.limitMaxAutoWidth = null !== (_d = options.limitMaxAutoWidth) && void 0 !== _d ? _d : 450,
|
|
672
|
+
internalProps.tooltip = Object.assign({
|
|
673
|
+
renderMode: "html",
|
|
674
|
+
isShowOverflowTextTooltip: !1,
|
|
675
|
+
confine: !0
|
|
676
|
+
}, options.tooltip), "html" !== internalProps.tooltip.renderMode || internalProps.tooltipHandler || (internalProps.tooltipHandler = new TooltipHandler(this, internalProps.tooltip.confine)),
|
|
677
|
+
internalProps.menu = Object.assign({
|
|
678
|
+
renderMode: "html"
|
|
679
|
+
}, options.menu), "html" !== internalProps.menu.renderMode || internalProps.menuHandler || (internalProps.menuHandler = new MenuHandler(this));
|
|
680
|
+
}
|
|
681
|
+
getFrozenRowsHeight() {
|
|
682
|
+
return this.getRowsHeight(0, this.frozenRowCount - 1);
|
|
683
|
+
}
|
|
684
|
+
getFrozenColsWidth() {
|
|
685
|
+
return this.getColsWidth(0, this.frozenColCount - 1);
|
|
686
|
+
}
|
|
687
|
+
getDrawRange() {
|
|
688
|
+
const width = Math.min(this.tableNoFrameWidth, this.getAllColsWidth()), height = Math.min(this.tableNoFrameHeight, this.getAllRowsHeight());
|
|
689
|
+
return new Rect(this.tableX, this.tableY, width, height);
|
|
690
|
+
}
|
|
691
|
+
_getMouseAbstractPoint(evt, isAddScroll = !0) {
|
|
692
|
+
let e;
|
|
693
|
+
if (!evt) return null;
|
|
694
|
+
e = isTouchEvent(evt) ? evt.changedTouches[0] : evt;
|
|
695
|
+
const clientX = e.clientX || e.pageX + window.scrollX, clientY = e.clientY || e.pageY + window.scrollY, rect = this.internalProps.canvas.getBoundingClientRect();
|
|
696
|
+
if (rect.right <= clientX) return null;
|
|
697
|
+
if (rect.bottom <= clientY) return null;
|
|
698
|
+
const currentWidth = rect.width, widthRatio = currentWidth / (this.canvas.offsetWidth || currentWidth), currentHeight = rect.height, heightRatio = currentHeight / (this.canvas.offsetHeight || currentHeight);
|
|
699
|
+
return {
|
|
700
|
+
x: (clientX - rect.left) / widthRatio + (isAddScroll ? this.scrollLeft : 0) - this.tableX,
|
|
701
|
+
y: (clientY - rect.top) / heightRatio + (isAddScroll ? this.scrollTop : 0) - this.tableY
|
|
702
|
+
};
|
|
703
|
+
}
|
|
704
|
+
_getCellEventArgsSet(e) {
|
|
705
|
+
const abstractPos = this._getMouseAbstractPoint(e);
|
|
706
|
+
if (!abstractPos) return {};
|
|
707
|
+
const cell = this.getCellAt(abstractPos.x, abstractPos.y);
|
|
708
|
+
if (cell.col < 0 || cell.row < 0) return {
|
|
709
|
+
abstractPos: abstractPos,
|
|
710
|
+
cell: cell
|
|
711
|
+
};
|
|
712
|
+
return {
|
|
713
|
+
abstractPos: abstractPos,
|
|
714
|
+
cell: cell,
|
|
715
|
+
eventArgs: {
|
|
716
|
+
col: cell.col,
|
|
717
|
+
row: cell.row,
|
|
718
|
+
event: e,
|
|
719
|
+
rect: cell.rect
|
|
720
|
+
}
|
|
721
|
+
};
|
|
722
|
+
}
|
|
723
|
+
getTheme() {
|
|
724
|
+
return this.internalProps.theme;
|
|
725
|
+
}
|
|
726
|
+
getTargetColAt(absoluteX) {
|
|
727
|
+
if (0 === absoluteX) return {
|
|
728
|
+
left: 0,
|
|
729
|
+
col: 0,
|
|
730
|
+
right: 0,
|
|
731
|
+
width: 0
|
|
732
|
+
};
|
|
733
|
+
const findAfter = (startCol, startRight) => {
|
|
734
|
+
let left = startRight - this.getColWidth(startCol);
|
|
735
|
+
const {colCount: colCount} = this.internalProps;
|
|
736
|
+
for (let col = startCol; col < colCount; col++) {
|
|
737
|
+
const width = this.getColWidth(col), right = left + width;
|
|
738
|
+
if (Math.round(left) <= Math.round(absoluteX) && Math.round(absoluteX) < Math.round(right)) return {
|
|
739
|
+
left: left,
|
|
740
|
+
col: col,
|
|
741
|
+
right: right,
|
|
742
|
+
width: width
|
|
743
|
+
};
|
|
744
|
+
left = right;
|
|
745
|
+
}
|
|
746
|
+
return null;
|
|
747
|
+
}, candCol = this.computeTargetColByX(absoluteX), right = this.getColsWidth(0, candCol);
|
|
748
|
+
return absoluteX >= right ? findAfter(candCol, right) : ((startCol, startRight) => {
|
|
749
|
+
let right = startRight;
|
|
750
|
+
for (let col = startCol; col >= 0; col--) {
|
|
751
|
+
const width = this.getColWidth(col), left = right - width;
|
|
752
|
+
if (Math.round(left) <= Math.round(absoluteX) && Math.round(absoluteX) < Math.round(right)) return {
|
|
753
|
+
left: left,
|
|
754
|
+
col: col,
|
|
755
|
+
right: right,
|
|
756
|
+
width: width
|
|
757
|
+
};
|
|
758
|
+
right = left;
|
|
759
|
+
}
|
|
760
|
+
return null;
|
|
761
|
+
})(candCol, right);
|
|
762
|
+
}
|
|
763
|
+
getTargetRowAt(absoluteY) {
|
|
764
|
+
if (0 === absoluteY) return {
|
|
765
|
+
top: 0,
|
|
766
|
+
row: 0,
|
|
767
|
+
bottom: 0,
|
|
768
|
+
height: 0
|
|
769
|
+
};
|
|
770
|
+
const findAfter = (startRow, startBottom) => {
|
|
771
|
+
let top = startBottom - this.getRowHeight(startRow);
|
|
772
|
+
const {rowCount: rowCount} = this.internalProps;
|
|
773
|
+
for (let row = startRow; row < rowCount; row++) {
|
|
774
|
+
const height = this.getRowHeight(row), bottom = top + height;
|
|
775
|
+
if (Math.round(top) <= Math.round(absoluteY) && Math.round(absoluteY) < Math.round(bottom)) return {
|
|
776
|
+
top: top,
|
|
777
|
+
row: row,
|
|
778
|
+
bottom: bottom,
|
|
779
|
+
height: height
|
|
780
|
+
};
|
|
781
|
+
top = bottom;
|
|
782
|
+
}
|
|
783
|
+
return null;
|
|
784
|
+
}, candRow = this.computeTargetRowByY(absoluteY), bottom = this.getRowsHeight(0, candRow);
|
|
785
|
+
return absoluteY >= bottom ? findAfter(candRow, bottom) : ((startRow, startBottom) => {
|
|
786
|
+
let bottom = startBottom;
|
|
787
|
+
for (let row = startRow; row >= 0; row--) {
|
|
788
|
+
const height = this.getRowHeight(row), top = bottom - height;
|
|
789
|
+
if (Math.round(top) <= Math.round(absoluteY) && Math.round(absoluteY) < Math.round(bottom)) return {
|
|
790
|
+
top: top,
|
|
791
|
+
row: row,
|
|
792
|
+
bottom: bottom,
|
|
793
|
+
height: height
|
|
794
|
+
};
|
|
795
|
+
bottom = top;
|
|
796
|
+
}
|
|
797
|
+
return null;
|
|
798
|
+
})(candRow, bottom);
|
|
799
|
+
}
|
|
800
|
+
computeTargetRowByY(absoluteY) {
|
|
801
|
+
if (this._rowRangeHeightsMap.get("$0$" + (this.rowCount - 1))) {
|
|
802
|
+
let startRow = 0, endRow = this.rowCount - 1;
|
|
803
|
+
for (;endRow - startRow > 1; ) {
|
|
804
|
+
const midRow = Math.floor((startRow + endRow) / 2);
|
|
805
|
+
if (absoluteY < this._rowRangeHeightsMap.get(`$0$${midRow}`)) endRow = midRow; else {
|
|
806
|
+
if (!(absoluteY > this._rowRangeHeightsMap.get(`$0$${midRow}`))) return midRow;
|
|
807
|
+
startRow = midRow;
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
return endRow;
|
|
811
|
+
}
|
|
812
|
+
return Math.min(Math.ceil(absoluteY / this.internalProps.defaultRowHeight), this.rowCount - 1);
|
|
813
|
+
}
|
|
814
|
+
computeTargetColByX(absoluteX) {
|
|
815
|
+
if (this._colRangeWidthsMap.get("$0$" + (this.colCount - 1))) {
|
|
816
|
+
let startCol = 0, endCol = this.colCount - 1;
|
|
817
|
+
for (;endCol - startCol > 1; ) {
|
|
818
|
+
const midCol = Math.floor((startCol + endCol) / 2);
|
|
819
|
+
if (absoluteX < this._colRangeWidthsMap.get(`$0$${midCol}`)) endCol = midCol; else {
|
|
820
|
+
if (!(absoluteX > this._colRangeWidthsMap.get(`$0$${midCol}`))) return midCol;
|
|
821
|
+
startCol = midCol;
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
return endCol;
|
|
825
|
+
}
|
|
826
|
+
return Math.min(Math.ceil(absoluteX / this.internalProps.defaultColWidth), this.colCount - 1);
|
|
827
|
+
}
|
|
828
|
+
clearSelected() {}
|
|
829
|
+
selectCell(col, row) {}
|
|
830
|
+
updatePager(cof) {
|
|
831
|
+
this.pagerConf && ("number" == typeof cof.currentPage && cof.currentPage >= 0 && (this.pagerConf.currentPage = cof.currentPage),
|
|
832
|
+
cof.perPageCount && (this.pagerConf.perPageCount = cof.perPageCount || this.pagerConf.perPageCount),
|
|
833
|
+
this.scenegraph.clearCells(), this.dataSource.updatePager(this.pagerConf), this.refreshRowColCount(),
|
|
834
|
+
this.scenegraph.createSceneGraph(), this.invalidate());
|
|
835
|
+
}
|
|
836
|
+
get allowFrozenColCount() {
|
|
837
|
+
return this.internalProps.allowFrozenColCount;
|
|
838
|
+
}
|
|
839
|
+
get rowHeaderLevelCount() {
|
|
840
|
+
return this.internalProps.layoutMap.rowHeaderLevelCount;
|
|
841
|
+
}
|
|
842
|
+
get columnHeaderLevelCount() {
|
|
843
|
+
return this.internalProps.layoutMap.columnHeaderLevelCount;
|
|
844
|
+
}
|
|
845
|
+
get records() {
|
|
846
|
+
return this.internalProps.records || null;
|
|
847
|
+
}
|
|
848
|
+
get dataSource() {
|
|
849
|
+
return this.internalProps.dataSource;
|
|
850
|
+
}
|
|
851
|
+
set dataSource(dataSource) {
|
|
852
|
+
this.scenegraph.clearCells(), _setDataSource(this, dataSource), this.refreshRowColCount(),
|
|
853
|
+
this.scenegraph.createSceneGraph(), this.invalidate();
|
|
854
|
+
}
|
|
855
|
+
get autoWrapText() {
|
|
856
|
+
return this.internalProps.autoWrapText;
|
|
857
|
+
}
|
|
858
|
+
set autoWrapText(autoWrapText) {
|
|
859
|
+
this.internalProps.autoWrapText !== autoWrapText && (this.internalProps.autoWrapText = autoWrapText,
|
|
860
|
+
this.options.autoWrapText = autoWrapText, this.internalProps.layoutMap && (this.refreshHeader(),
|
|
861
|
+
this.invalidate()));
|
|
862
|
+
}
|
|
863
|
+
get theme() {
|
|
864
|
+
return this.internalProps.theme;
|
|
865
|
+
}
|
|
866
|
+
set theme(theme) {
|
|
867
|
+
const t = themes.of(theme);
|
|
868
|
+
this.internalProps.theme = t || themes.DEFAULT, this.options.theme = theme, this._updateSize(),
|
|
869
|
+
this._resetFrozenColCount(), this.invalidate();
|
|
870
|
+
}
|
|
871
|
+
getBodyField(col, row) {
|
|
872
|
+
return this.internalProps.layoutMap.getBody(col, row).field;
|
|
873
|
+
}
|
|
874
|
+
getBodyColumnDefine(col, row) {
|
|
875
|
+
const body = this.internalProps.layoutMap.getBody(col, row);
|
|
876
|
+
return null == body ? void 0 : body.define;
|
|
877
|
+
}
|
|
878
|
+
getBodyColumnType(col, row) {
|
|
879
|
+
return this.internalProps.layoutMap.getBody(col, row).columnType;
|
|
880
|
+
}
|
|
881
|
+
getHeaderField(col, row) {
|
|
882
|
+
return this.internalProps.layoutMap.getHeaderField(col, row);
|
|
883
|
+
}
|
|
884
|
+
getHeaderFieldKey(col, row) {
|
|
885
|
+
return this.internalProps.layoutMap.getHeaderFieldKey(col, row);
|
|
886
|
+
}
|
|
887
|
+
getHeaderDefine(col, row) {
|
|
888
|
+
const hd = this.internalProps.layoutMap.getHeader(col, row);
|
|
889
|
+
return null == hd ? void 0 : hd.define;
|
|
890
|
+
}
|
|
891
|
+
getCellType(col, row) {
|
|
892
|
+
return this.internalProps.layoutMap.getCellType(col, row);
|
|
893
|
+
}
|
|
894
|
+
getCellHeaderPaths(col, row) {
|
|
895
|
+
return this.internalProps.layoutMap.getCellHeaderPaths(col, row);
|
|
896
|
+
}
|
|
897
|
+
getHeadersDefine(col, row) {
|
|
898
|
+
const headers = [];
|
|
899
|
+
for (;;) {
|
|
900
|
+
const header = this.getHeaderDefine(col, row);
|
|
901
|
+
if (!header || !header.field && !header.columns) break;
|
|
902
|
+
headers.push(header), row++;
|
|
903
|
+
}
|
|
904
|
+
return headers;
|
|
905
|
+
}
|
|
906
|
+
_getHeaderLayoutMap(col, row) {
|
|
907
|
+
return this.internalProps.layoutMap.getHeader(col, row);
|
|
908
|
+
}
|
|
909
|
+
_getBodyLayoutMap(col, row) {
|
|
910
|
+
return this.internalProps.layoutMap.getBody(col, row);
|
|
911
|
+
}
|
|
912
|
+
getContext() {
|
|
913
|
+
return this.internalProps.context;
|
|
914
|
+
}
|
|
915
|
+
getRecordByRowCol(col, row) {
|
|
916
|
+
var _a;
|
|
917
|
+
if (!this.internalProps.layoutMap.isHeader(col, row)) return null === (_a = this.internalProps.dataSource) || void 0 === _a ? void 0 : _a.get(this.getRecordIndexByRow(col, row));
|
|
918
|
+
}
|
|
919
|
+
getRecordStartRowByRecordIndex(index) {
|
|
920
|
+
return this.internalProps.layoutMap.getRecordStartRowByRecordIndex(index);
|
|
921
|
+
}
|
|
922
|
+
_getHeaderCellBySortState(sortState) {
|
|
923
|
+
const {layoutMap: layoutMap} = this.internalProps;
|
|
924
|
+
let hd;
|
|
925
|
+
if (hd = sortState.fieldKey ? layoutMap.headerObjects.find((col => col && col.fieldKey === sortState.fieldKey)) : layoutMap.headerObjects.find((col => col && col.field === sortState.field)),
|
|
926
|
+
hd) {
|
|
927
|
+
return layoutMap.getHeaderCellAdress(hd.id);
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
getCellRange(col, row) {
|
|
931
|
+
return this.internalProps.layoutMap.getCellRange(col, row);
|
|
932
|
+
}
|
|
933
|
+
isCellRangeEqual(col, row, targetCol, targetRow) {
|
|
934
|
+
return this.internalProps.layoutMap.isCellRangeEqual(col, row, targetCol, targetRow);
|
|
935
|
+
}
|
|
936
|
+
_getLayoutCellId(col, row) {
|
|
937
|
+
return this.internalProps.layoutMap.getCellId(col, row);
|
|
938
|
+
}
|
|
939
|
+
getHeaderDescription(col, row) {
|
|
940
|
+
var _a;
|
|
941
|
+
const field = this._getHeaderLayoutMap(col, row), fieldDef = null == field ? void 0 : field.define, description = null !== (_a = null == fieldDef ? void 0 : fieldDef.description) && void 0 !== _a ? _a : null == field ? void 0 : field.description;
|
|
942
|
+
if ("function" == typeof description) {
|
|
943
|
+
return description({
|
|
944
|
+
col: col,
|
|
945
|
+
row: row,
|
|
946
|
+
value: this.getCellValue(col, row),
|
|
947
|
+
dataValue: this.getCellOriginValue(col, row)
|
|
948
|
+
});
|
|
949
|
+
}
|
|
950
|
+
return description;
|
|
951
|
+
}
|
|
952
|
+
setRecords(records, sort) {
|
|
953
|
+
var _a, _b;
|
|
954
|
+
const time = "undefined" != typeof window ? window.performance.now() : 0;
|
|
955
|
+
if (this.scenegraph.clearCells(), void 0 !== sort && (this.sortState = sort, this.stateManeger.setSortState(this.sortState)),
|
|
956
|
+
records) {
|
|
957
|
+
if (_setRecords(this, records), this.sortState) {
|
|
958
|
+
let order, field, fieldKey;
|
|
959
|
+
if (Array.isArray(this.sortState) ? 0 !== this.sortState.length && ({order: order, field: field, fieldKey: fieldKey} = null === (_a = this.sortState) || void 0 === _a ? void 0 : _a[0]) : ({order: order, field: field, fieldKey: fieldKey} = this.sortState),
|
|
960
|
+
order && field && "normal" !== order) {
|
|
961
|
+
const sortFunc = this.getSortFuncFromHeaderOption(void 0, field, fieldKey);
|
|
962
|
+
let hd;
|
|
963
|
+
hd = fieldKey ? this.internalProps.layoutMap.headerObjects.find((col => col && col.fieldKey === fieldKey)) : this.internalProps.layoutMap.headerObjects.find((col => col && col.field === field)),
|
|
964
|
+
(null === (_b = null == hd ? void 0 : hd.define) || void 0 === _b ? void 0 : _b.sort) && this.dataSource.sort(hd.field, order, null != sortFunc ? sortFunc : defaultOrderFn);
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
this.refreshRowColCount();
|
|
968
|
+
} else _setRecords(this, records);
|
|
969
|
+
this.scenegraph.createSceneGraph(), this.invalidate(), console.log("setRecords cost time:", ("undefined" != typeof window ? window.performance.now() : 0) - time);
|
|
970
|
+
}
|
|
971
|
+
setDropDownMenuHighlight(cells) {
|
|
972
|
+
this.stateManeger.setDropDownMenuHighlight(cells);
|
|
973
|
+
}
|
|
974
|
+
_dropDownMenuIsHighlight(colNow, rowNow, index) {
|
|
975
|
+
return this.stateManeger.dropDownMenuIsHighlight(colNow, rowNow, index);
|
|
976
|
+
}
|
|
977
|
+
isHeader(col, row) {
|
|
978
|
+
return this.internalProps.layoutMap && this.internalProps.layoutMap.isHeader(col, row);
|
|
979
|
+
}
|
|
980
|
+
isColumnHeader(col, row) {
|
|
981
|
+
var _a;
|
|
982
|
+
return null === (_a = this.internalProps.layoutMap) || void 0 === _a ? void 0 : _a.isColumnHeader(col, row);
|
|
983
|
+
}
|
|
984
|
+
isRowHeader(col, row) {
|
|
985
|
+
var _a;
|
|
986
|
+
return null === (_a = this.internalProps.layoutMap) || void 0 === _a ? void 0 : _a.isRowHeader(col, row);
|
|
987
|
+
}
|
|
988
|
+
isCornerHeader(col, row) {
|
|
989
|
+
var _a;
|
|
990
|
+
return null === (_a = this.internalProps.layoutMap) || void 0 === _a ? void 0 : _a.isCornerHeader(col, row);
|
|
991
|
+
}
|
|
992
|
+
getCellInfo(col, row) {
|
|
993
|
+
const colDef = this.isHeader(col, row) ? this.getHeaderDefine(col, row) : this.getBodyColumnDefine(col, row);
|
|
994
|
+
return {
|
|
995
|
+
col: col,
|
|
996
|
+
row: row,
|
|
997
|
+
field: this.getHeaderField(col, row),
|
|
998
|
+
cellHeaderPaths: this.internalProps.layoutMap.getCellHeaderPaths(col, row),
|
|
999
|
+
caption: colDef.caption,
|
|
1000
|
+
columnType: colDef.columnType ? "string" == typeof colDef.columnType ? colDef.columnType : "progressbar" : "text",
|
|
1001
|
+
originData: this.getCellOriginRecord(col, row),
|
|
1002
|
+
cellRange: this.getCellRangeRelativeRect({
|
|
1003
|
+
col: col,
|
|
1004
|
+
row: row
|
|
1005
|
+
}),
|
|
1006
|
+
value: this.getCellValue(col, row),
|
|
1007
|
+
dataValue: this.getCellOriginValue(col, row),
|
|
1008
|
+
cellType: this.getCellType(col, row),
|
|
1009
|
+
scaleRatio: this.canvas.getBoundingClientRect().width / this.canvas.offsetWidth
|
|
1010
|
+
};
|
|
1011
|
+
}
|
|
1012
|
+
_hasField(field, col, row) {
|
|
1013
|
+
if (null == field) return !1;
|
|
1014
|
+
if (this.internalProps.layoutMap.isHeader(col, row)) return !1;
|
|
1015
|
+
const index = this.getRecordIndexByRow(col, row);
|
|
1016
|
+
return this.internalProps.dataSource.hasField(index, field);
|
|
1017
|
+
}
|
|
1018
|
+
_getCellStyle(col, row) {
|
|
1019
|
+
const {layoutMap: layoutMap} = this.internalProps;
|
|
1020
|
+
if (layoutMap.isHeader(col, row)) {
|
|
1021
|
+
let cacheStyle = this.headerStyleCache.get(`${col}-${row}`);
|
|
1022
|
+
if (cacheStyle) return cacheStyle;
|
|
1023
|
+
const hd = layoutMap.getHeader(col, row), styleClass = this.internalProps.headerHelper.getStyleClass(hd.headerType), {style: style} = hd;
|
|
1024
|
+
return cacheStyle = headerStyleContents.of(style, layoutMap.isColumnHeader(col, row) ? this.theme.headerStyle : layoutMap.isRowHeader(col, row) ? this.theme.rowHeaderStyle : this.theme.cornerHeaderStyle, {
|
|
1025
|
+
col: col,
|
|
1026
|
+
row: row,
|
|
1027
|
+
table: this,
|
|
1028
|
+
value: this.getCellValue(col, row),
|
|
1029
|
+
dataValue: this.getCellOriginValue(col, row),
|
|
1030
|
+
cellHeaderPaths: this.getCellHeaderPaths(col, row)
|
|
1031
|
+
}, styleClass, this.options.autoWrapText), this.headerStyleCache.set(`${col}-${row}`, cacheStyle),
|
|
1032
|
+
cacheStyle;
|
|
1033
|
+
}
|
|
1034
|
+
let cacheKey;
|
|
1035
|
+
cacheKey = this.isListTable() && !this.transpose || this.isPivotTable() && this.internalProps.layoutMap.indicatorsAsCol ? col : row;
|
|
1036
|
+
let cacheStyle = this.bodyStyleCache.get(cacheKey);
|
|
1037
|
+
if (cacheStyle) return cacheStyle;
|
|
1038
|
+
const column = layoutMap.getBody(col, row), styleClass = this.internalProps.bodyHelper.getStyleClass(column.columnType), style = null == column ? void 0 : column.style;
|
|
1039
|
+
return cacheStyle = columnStyleContents.of(style, this.theme.bodyStyle, {
|
|
1040
|
+
col: col,
|
|
1041
|
+
row: row,
|
|
1042
|
+
table: this,
|
|
1043
|
+
value: this.getCellValue(col, row),
|
|
1044
|
+
dataValue: this.getCellOriginValue(col, row),
|
|
1045
|
+
cellHeaderPaths: this.getCellHeaderPaths(col, row)
|
|
1046
|
+
}, styleClass, this.options.autoWrapText), this.bodyStyleCache.set(cacheKey, cacheStyle),
|
|
1047
|
+
cacheStyle;
|
|
1048
|
+
}
|
|
1049
|
+
_canResizeColumn(col, row) {
|
|
1050
|
+
if (!(col >= 0 && row >= 0)) return !1;
|
|
1051
|
+
if (this.isCellRangeEqual(col, row, col + 1, row)) return !1;
|
|
1052
|
+
if ("none" === this.internalProps.columnResizeMode) return !1;
|
|
1053
|
+
if ("header" === this.internalProps.columnResizeMode) {
|
|
1054
|
+
if (!this.isHeader(col, row)) return !1;
|
|
1055
|
+
} else if ("body" === this.internalProps.columnResizeMode && this.isHeader(col, row)) return !1;
|
|
1056
|
+
const limit = this.colWidthsLimit[col];
|
|
1057
|
+
return !(limit && limit.min && limit.max) || limit.max !== limit.min;
|
|
1058
|
+
}
|
|
1059
|
+
_canDragHeaderPosition(col, row) {
|
|
1060
|
+
if (this.isHeader(col, row) && this.stateManeger.isSelected(col, row)) {
|
|
1061
|
+
const selectRange = this.stateManeger.select.ranges[0];
|
|
1062
|
+
if (this.isColumnHeader(col, row)) {
|
|
1063
|
+
if (selectRange.end.row !== this.rowCount - 1) return !1;
|
|
1064
|
+
} else {
|
|
1065
|
+
if (!this.isRowHeader(col, row)) return !1;
|
|
1066
|
+
if (selectRange.end.col !== this.colCount - 1) return !1;
|
|
1067
|
+
}
|
|
1068
|
+
const define = this.getHeaderDefine(col, row);
|
|
1069
|
+
if (void 0 === define.dragHeader) {
|
|
1070
|
+
if ("all" === this.internalProps.dragHeaderMode) return !0;
|
|
1071
|
+
if ("column" === this.internalProps.dragHeaderMode) {
|
|
1072
|
+
if (this.isColumnHeader(col, row)) return !0;
|
|
1073
|
+
} else if ("row" === this.internalProps.dragHeaderMode && this.isRowHeader(col, row)) return !0;
|
|
1074
|
+
return !1;
|
|
1075
|
+
}
|
|
1076
|
+
return define.dragHeader;
|
|
1077
|
+
}
|
|
1078
|
+
return !1;
|
|
1079
|
+
}
|
|
1080
|
+
getCellIcons(col, row) {
|
|
1081
|
+
let icons;
|
|
1082
|
+
if (this.isHeader(col, row)) icons = this.internalProps.headerHelper.getIcons(col, row); else {
|
|
1083
|
+
const cellValue = this.getCellValue(col, row), dataValue = this.getCellOriginValue(col, row), ctx = this.internalProps.context;
|
|
1084
|
+
icons = this.internalProps.bodyHelper.getIcons(col, row, cellValue, dataValue, ctx);
|
|
1085
|
+
}
|
|
1086
|
+
return icons;
|
|
1087
|
+
}
|
|
1088
|
+
showDropDownMenu(col, row, dropDownMenuOptions) {
|
|
1089
|
+
let menuType = "dropdown-menu";
|
|
1090
|
+
dropDownMenuOptions && (menuType = Array.isArray(dropDownMenuOptions.content) ? "dropdown-menu" : "container"),
|
|
1091
|
+
"html" === this.internalProps.menu.renderMode && (this.stateManeger.menu.isShow = !0,
|
|
1092
|
+
this.internalProps.menuHandler._bindToCell(col, row, menuType, dropDownMenuOptions));
|
|
1093
|
+
}
|
|
1094
|
+
showTooltip(col, row, tooltipOptions) {
|
|
1095
|
+
"html" === this.internalProps.tooltip.renderMode && this.internalProps.tooltipHandler._bindToCell(col, row, tooltipOptions);
|
|
1096
|
+
}
|
|
1097
|
+
getCellStyle(col, row) {
|
|
1098
|
+
const actStyle = this._getCellStyle(col, row), theme = getStyleTheme(actStyle, this, col, row, getProp).theme, {autoWrapText: autoWrapText, lineClamp: lineClamp, textOverflow: textOverflow} = actStyle;
|
|
1099
|
+
return {
|
|
1100
|
+
textAlign: theme.text.textAlign,
|
|
1101
|
+
textBaseline: theme.text.textBaseline,
|
|
1102
|
+
bgColor: theme.group.fillColor,
|
|
1103
|
+
color: theme.text.fillColor,
|
|
1104
|
+
fontFamily: theme.text.fontFamily,
|
|
1105
|
+
fontSize: theme.text.fontSize,
|
|
1106
|
+
fontWeight: theme.text.fontWeight,
|
|
1107
|
+
fontVariant: theme.text.fontVariant,
|
|
1108
|
+
fontStyle: theme.text.fontStyle,
|
|
1109
|
+
lineHeight: theme.text.lineHeight,
|
|
1110
|
+
autoWrapText: null != autoWrapText && autoWrapText,
|
|
1111
|
+
lineClamp: null != lineClamp ? lineClamp : "auto",
|
|
1112
|
+
textOverflow: textOverflow,
|
|
1113
|
+
borderColor: theme.group.strokeColor,
|
|
1114
|
+
borderLineWidth: theme.group.lineWidth,
|
|
1115
|
+
borderLineDash: theme.group.lineDash,
|
|
1116
|
+
underline: theme.text.underline,
|
|
1117
|
+
underlineDash: theme.text.underlineDash,
|
|
1118
|
+
lineThrough: theme.text.lineThrough,
|
|
1119
|
+
lineThroughDash: theme.text.lineThroughDash
|
|
1120
|
+
};
|
|
1121
|
+
}
|
|
1122
|
+
getAllBodyCells(colMaxCount, rowMaxCount) {
|
|
1123
|
+
const start_col = this.rowHeaderLevelCount, start_row = this.columnHeaderLevelCount, end_col = this.colCount - 1, end_row = this.rowCount - 1;
|
|
1124
|
+
return Array(Math.min(null != rowMaxCount ? rowMaxCount : 2e3, end_row - start_row + 1, this.rowCount)).fill(0).map(((_, i) => Array(Math.min(null != colMaxCount ? colMaxCount : 2e3, end_col - start_col + 1, this.colCount)).fill(0).map(((_, j) => this.getCellInfo(j + start_col, i + start_row)))));
|
|
1125
|
+
}
|
|
1126
|
+
getAllCells(colMaxCount, rowMaxCount) {
|
|
1127
|
+
const start_col = 0, start_row = 0, end_col = this.colCount - 1, end_row = this.rowCount - 1;
|
|
1128
|
+
return Array(Math.min(null != rowMaxCount ? rowMaxCount : 2e3, end_row - start_row + 1, this.rowCount)).fill(0).map(((_, i) => Array(Math.min(null != colMaxCount ? colMaxCount : 2e3, end_col - start_col + 1, this.colCount)).fill(0).map(((_, j) => this.getCellInfo(j + start_col, i + start_row)))));
|
|
1129
|
+
}
|
|
1130
|
+
getAllColumnHeaderCells() {
|
|
1131
|
+
const start_col = this.rowHeaderLevelCount, start_row = 0, end_col = this.colCount - 1, end_row = this.columnHeaderLevelCount - 1;
|
|
1132
|
+
return Array(end_row - start_row + 1).fill(0).map(((_, i) => Array(end_col - start_col + 1).fill(0).map(((_, j) => this.getCellInfo(j + start_col, i + start_row)))));
|
|
1133
|
+
}
|
|
1134
|
+
getAllRowHeaderCells() {
|
|
1135
|
+
const start_col = 0, start_row = this.columnHeaderLevelCount, end_col = this.rowHeaderLevelCount - 1, end_row = this.rowCount - 1;
|
|
1136
|
+
return Array(end_row - start_row + 1).fill(0).map(((_, i) => Array(end_col - start_col + 1).fill(0).map(((_, j) => this.getCellInfo(j + start_col, i + start_row)))));
|
|
1137
|
+
}
|
|
1138
|
+
scrollToCell(cellAddr) {
|
|
1139
|
+
const drawRange = this.getDrawRange();
|
|
1140
|
+
if (isValid(cellAddr.col) && cellAddr.col >= this.frozenColCount) {
|
|
1141
|
+
const frozenWidth = this.getFrozenColsWidth(), left = this.getColsWidth(0, cellAddr.col - 1);
|
|
1142
|
+
this.scrollLeft = Math.min(left - frozenWidth, this.getAllColsWidth() - drawRange.width);
|
|
1143
|
+
}
|
|
1144
|
+
if (isValid(cellAddr.row) && cellAddr.row >= this.frozenRowCount) {
|
|
1145
|
+
const frozenHeight = this.getFrozenRowsHeight(), top = this.getRowsHeight(0, cellAddr.row - 1);
|
|
1146
|
+
this.scrollTop = Math.min(top - frozenHeight, this.getAllRowsHeight() - drawRange.height);
|
|
1147
|
+
}
|
|
1148
|
+
this.invalidate();
|
|
1149
|
+
}
|
|
1150
|
+
getCopyValue() {
|
|
1151
|
+
const ranges = this.stateManeger.select.ranges;
|
|
1152
|
+
let minCol = Math.min(ranges[0].start.col, ranges[0].end.col), maxCol = Math.max(ranges[0].start.col, ranges[0].end.col), minRow = Math.min(ranges[0].start.row, ranges[0].end.row), maxRow = Math.max(ranges[0].start.row, ranges[0].end.row);
|
|
1153
|
+
ranges.forEach((a => {
|
|
1154
|
+
minCol = Math.min(minCol, a.start.col, a.end.col), maxCol = Math.max(maxCol, a.start.col, a.end.col),
|
|
1155
|
+
minRow = Math.min(minRow, a.start.row, a.end.row), maxRow = Math.max(maxRow, a.start.row, a.end.row);
|
|
1156
|
+
}));
|
|
1157
|
+
const isExistDataInRow = r => {
|
|
1158
|
+
let isExist = !1;
|
|
1159
|
+
return ranges.forEach((range => {
|
|
1160
|
+
const minRow = Math.min(range.start.row, range.end.row), maxRow = Math.max(range.start.row, range.end.row);
|
|
1161
|
+
minRow <= r && maxRow >= r && (isExist = !0);
|
|
1162
|
+
})), isExist;
|
|
1163
|
+
}, isExistDataInCol = c => {
|
|
1164
|
+
let isExist = !1;
|
|
1165
|
+
return ranges.forEach((range => {
|
|
1166
|
+
const minCol = Math.min(range.start.col, range.end.col), maxCol = Math.max(range.start.col, range.end.col);
|
|
1167
|
+
minCol <= c && maxCol >= c && (isExist = !0);
|
|
1168
|
+
})), isExist;
|
|
1169
|
+
}, getRangeExistDataInCell = (c, r) => {
|
|
1170
|
+
let isExistRange;
|
|
1171
|
+
return ranges.forEach((range => {
|
|
1172
|
+
const minRow = Math.min(range.start.row, range.end.row), maxRow = Math.max(range.start.row, range.end.row), minCol = Math.min(range.start.col, range.end.col), maxCol = Math.max(range.start.col, range.end.col);
|
|
1173
|
+
minCol <= c && maxCol >= c && minRow <= r && maxRow >= r && (isExistRange = range);
|
|
1174
|
+
})), isExistRange;
|
|
1175
|
+
}, getCopyCellValue = (col, row, range) => {
|
|
1176
|
+
const cellRange = this.getCellRange(col, row);
|
|
1177
|
+
let copyStartCol = cellRange.start.col, copyStartRow = cellRange.start.row;
|
|
1178
|
+
if (range) {
|
|
1179
|
+
const rangeMinCol = Math.min(range.start.col, range.end.col), rangeMinRow = Math.min(range.start.row, range.end.row);
|
|
1180
|
+
copyStartCol = Math.max(rangeMinCol, cellRange.start.col), copyStartRow = Math.max(rangeMinRow, cellRange.start.row);
|
|
1181
|
+
}
|
|
1182
|
+
if (copyStartCol !== col || copyStartRow !== row) return "";
|
|
1183
|
+
return this.getCellValue(col, row);
|
|
1184
|
+
};
|
|
1185
|
+
let copyValue = "";
|
|
1186
|
+
for (let r = minRow; r <= maxRow; r++) {
|
|
1187
|
+
if (isExistDataInRow(r)) {
|
|
1188
|
+
for (let c = minCol; c <= maxCol; c++) {
|
|
1189
|
+
if (isExistDataInCol(c)) {
|
|
1190
|
+
const range = getRangeExistDataInCell(c, r);
|
|
1191
|
+
if (range) {
|
|
1192
|
+
const copyCellValue = getCopyCellValue(c, r, range);
|
|
1193
|
+
if ("undefined" != typeof Promise && copyCellValue instanceof Promise) ; else {
|
|
1194
|
+
const strCellValue = `${copyCellValue}`;
|
|
1195
|
+
/^\[object .*\]$/.exec(strCellValue) || (copyValue += strCellValue);
|
|
1196
|
+
}
|
|
1197
|
+
(c < range.end.col || c < maxCol) && (copyValue += "\t");
|
|
1198
|
+
} else copyValue += "\t";
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
copyValue += "\n";
|
|
1202
|
+
}
|
|
1203
|
+
}
|
|
1204
|
+
return copyValue;
|
|
1205
|
+
}
|
|
1206
|
+
getSelectedCellInfos() {
|
|
1207
|
+
const ranges = this.stateManeger.select.ranges;
|
|
1208
|
+
let minCol = Math.min(ranges[0].start.col, ranges[0].end.col), maxCol = Math.max(ranges[0].start.col, ranges[0].end.col), minRow = Math.min(ranges[0].start.row, ranges[0].end.row), maxRow = Math.max(ranges[0].start.row, ranges[0].end.row);
|
|
1209
|
+
ranges.forEach((a => {
|
|
1210
|
+
minCol = Math.min(minCol, a.start.col, a.end.col), maxCol = Math.max(maxCol, a.start.col, a.end.col),
|
|
1211
|
+
minRow = Math.min(minRow, a.start.row, a.end.row), maxRow = Math.max(maxRow, a.start.row, a.end.row);
|
|
1212
|
+
}));
|
|
1213
|
+
const isExistDataInRow = r => {
|
|
1214
|
+
let isExist = !1;
|
|
1215
|
+
return ranges.forEach((range => {
|
|
1216
|
+
const minRow = Math.min(range.start.row, range.end.row), maxRow = Math.max(range.start.row, range.end.row);
|
|
1217
|
+
minRow <= r && maxRow >= r && (isExist = !0);
|
|
1218
|
+
})), isExist;
|
|
1219
|
+
}, isExistDataInCol = c => {
|
|
1220
|
+
let isExist = !1;
|
|
1221
|
+
return ranges.forEach((range => {
|
|
1222
|
+
const minCol = Math.min(range.start.col, range.end.col), maxCol = Math.max(range.start.col, range.end.col);
|
|
1223
|
+
minCol <= c && maxCol >= c && (isExist = !0);
|
|
1224
|
+
})), isExist;
|
|
1225
|
+
}, getRangeExistDataInCell = (c, r) => {
|
|
1226
|
+
let isExistRange;
|
|
1227
|
+
return ranges.forEach((range => {
|
|
1228
|
+
const minRow = Math.min(range.start.row, range.end.row), maxRow = Math.max(range.start.row, range.end.row), minCol = Math.min(range.start.col, range.end.col), maxCol = Math.max(range.start.col, range.end.col);
|
|
1229
|
+
minCol <= c && maxCol >= c && minRow <= r && maxRow >= r && (isExistRange = range);
|
|
1230
|
+
})), isExistRange;
|
|
1231
|
+
}, cellInfoArray = [];
|
|
1232
|
+
for (let r = minRow; r <= maxRow; r++) {
|
|
1233
|
+
if (isExistDataInRow(r)) {
|
|
1234
|
+
const cellInfoRow = [];
|
|
1235
|
+
for (let c = minCol; c <= maxCol; c++) {
|
|
1236
|
+
if (isExistDataInCol(c)) {
|
|
1237
|
+
if (getRangeExistDataInCell(c, r)) {
|
|
1238
|
+
const cellInfo = this.getCellInfo(c, r);
|
|
1239
|
+
cellInfoRow.push(cellInfo);
|
|
1240
|
+
}
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
1243
|
+
cellInfoArray.push(cellInfoRow);
|
|
1244
|
+
}
|
|
1245
|
+
}
|
|
1246
|
+
return cellInfoArray;
|
|
1247
|
+
}
|
|
1248
|
+
measureText(text, font) {
|
|
1249
|
+
return textMeasure.measureText(text, font);
|
|
1250
|
+
}
|
|
1251
|
+
measureTextBounds(attributes) {
|
|
1252
|
+
const text = new WrapText(attributes);
|
|
1253
|
+
return {
|
|
1254
|
+
width: text.AABBBounds.width(),
|
|
1255
|
+
height: text.AABBBounds.height()
|
|
1256
|
+
};
|
|
1257
|
+
}
|
|
1258
|
+
getCustomRender(col, row) {
|
|
1259
|
+
let customRender;
|
|
1260
|
+
if ("body" !== this.getCellType(col, row)) {
|
|
1261
|
+
const define = this.getHeaderDefine(col, row);
|
|
1262
|
+
customRender = null == define ? void 0 : define.headerCustomRender;
|
|
1263
|
+
} else {
|
|
1264
|
+
const define = this.getBodyColumnDefine(col, row);
|
|
1265
|
+
customRender = (null == define ? void 0 : define.customRender) || this.customRender;
|
|
1266
|
+
}
|
|
1267
|
+
return customRender;
|
|
1268
|
+
}
|
|
1269
|
+
getCustomLayout(col, row) {
|
|
1270
|
+
let customLayout;
|
|
1271
|
+
if ("body" !== this.getCellType(col, row)) {
|
|
1272
|
+
const define = this.getHeaderDefine(col, row);
|
|
1273
|
+
customLayout = null == define ? void 0 : define.headerCustomLayout;
|
|
1274
|
+
} else {
|
|
1275
|
+
const define = this.getBodyColumnDefine(col, row);
|
|
1276
|
+
customLayout = null == define ? void 0 : define.customLayout;
|
|
1277
|
+
}
|
|
1278
|
+
return customLayout;
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
//# sourceMappingURL=BaseTable.js.map
|