@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,27 @@
|
|
|
1
|
+
import type { RectProps } from '../ts-types';
|
|
2
|
+
import { Placement } from '../ts-types';
|
|
3
|
+
import type { BaseTooltip } from './BaseTooltip';
|
|
4
|
+
import type { TooltipOptions } from '../ts-types/tooltip';
|
|
5
|
+
import type { BaseTableAPI } from '../ts-types/base-table';
|
|
6
|
+
export declare class TooltipHandler {
|
|
7
|
+
private _table;
|
|
8
|
+
private _tooltipInstances?;
|
|
9
|
+
private _attachInfo?;
|
|
10
|
+
private confine?;
|
|
11
|
+
constructor(table: BaseTableAPI, confine: boolean);
|
|
12
|
+
dispose(): void;
|
|
13
|
+
_bindToCell(col: number, row: number, tooltipOptions?: TooltipOptions): void;
|
|
14
|
+
_move(col: number, row: number, tooltipOptions: TooltipOptions): void;
|
|
15
|
+
moveToPosition(col: number, row: number, position?: {
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
}, referencePosition?: {
|
|
19
|
+
rect: RectProps;
|
|
20
|
+
placement?: Placement;
|
|
21
|
+
}): void;
|
|
22
|
+
_unbindFromCell(): void;
|
|
23
|
+
_isBindCell(col: number, row: number): boolean;
|
|
24
|
+
_bindTableEvent(table: BaseTableAPI): void;
|
|
25
|
+
_getTooltipInstanceInfo(col: number, row: number): BaseTooltip | null;
|
|
26
|
+
isBinded(tooltipOptions: TooltipOptions): boolean;
|
|
27
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
}), exports.TooltipHandler = void 0;
|
|
6
|
+
|
|
7
|
+
const ts_types_1 = require("../ts-types"), Tooltip_1 = require("./Tooltip"), helper_1 = require("../tools/helper"), util_1 = require("../tools/util"), TABLE_EVENT_TYPE_1 = require("../core/TABLE_EVENT_TYPE"), TOOLTIP_INSTANCE_FACTORY = {
|
|
8
|
+
"bubble-tooltip": function(table) {
|
|
9
|
+
return new Tooltip_1.BubbleTooltip(table);
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
class TooltipHandler {
|
|
14
|
+
constructor(table, confine) {
|
|
15
|
+
this._table = table, this._tooltipInstances = {}, this._bindTableEvent(table), this.confine = confine;
|
|
16
|
+
}
|
|
17
|
+
dispose() {
|
|
18
|
+
var _a, _b;
|
|
19
|
+
const tooltipInstances = this._tooltipInstances;
|
|
20
|
+
for (const k in tooltipInstances) null === (_b = null === (_a = tooltipInstances[k]) || void 0 === _a ? void 0 : _a.dispose) || void 0 === _b || _b.call(_a);
|
|
21
|
+
delete this._tooltipInstances, this._attachInfo = null;
|
|
22
|
+
}
|
|
23
|
+
_bindToCell(col, row, tooltipOptions) {
|
|
24
|
+
var _a;
|
|
25
|
+
const info = this._attachInfo, instance = this._getTooltipInstanceInfo(col, row);
|
|
26
|
+
if (!info || instance && info.instance === instance || (null === (_a = info.instance) || void 0 === _a || _a.unbindTooltipElement(),
|
|
27
|
+
this._attachInfo = null), !instance) return;
|
|
28
|
+
if (instance && instance.bindTooltipElement(col, row, tooltipOptions, this.confine)) {
|
|
29
|
+
const range = this._table.getCellRange(col, row);
|
|
30
|
+
this._attachInfo = {
|
|
31
|
+
range: range,
|
|
32
|
+
instance: instance,
|
|
33
|
+
tooltipOptions: tooltipOptions
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
_move(col, row, tooltipOptions) {
|
|
38
|
+
const info = this._attachInfo;
|
|
39
|
+
if (!info || !(0, helper_1.cellInRange)(info.range, col, row)) return;
|
|
40
|
+
const {instance: instance} = info;
|
|
41
|
+
null == instance || instance.moveTooltipElement(col, row, tooltipOptions, this.confine);
|
|
42
|
+
}
|
|
43
|
+
moveToPosition(col, row, position, referencePosition) {
|
|
44
|
+
const info = this._attachInfo;
|
|
45
|
+
if (!info || !(0, helper_1.cellInRange)(info.range, col, row)) return;
|
|
46
|
+
const {instance: instance} = info;
|
|
47
|
+
this._attachInfo.tooltipOptions.position = position, this._attachInfo.tooltipOptions.referencePosition = referencePosition,
|
|
48
|
+
null == instance || instance.locateTooltipElement(col, row, position, referencePosition, this.confine);
|
|
49
|
+
}
|
|
50
|
+
_unbindFromCell() {
|
|
51
|
+
const info = this._attachInfo;
|
|
52
|
+
if (!info) return;
|
|
53
|
+
const {instance: instance} = info;
|
|
54
|
+
null == instance || instance.unbindTooltipElement(), this._attachInfo = null;
|
|
55
|
+
}
|
|
56
|
+
_isBindCell(col, row) {
|
|
57
|
+
const info = this._attachInfo;
|
|
58
|
+
return !!info && (0, helper_1.cellInRange)(info.range, col, row);
|
|
59
|
+
}
|
|
60
|
+
_bindTableEvent(table) {
|
|
61
|
+
table.listen(TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE.MOUSEENTER_CELL, (e => {
|
|
62
|
+
var _a;
|
|
63
|
+
if ((0, util_1.isMobile)()) return;
|
|
64
|
+
const {x1: left, x2: right, y1: top, y2: bottom} = table.stateManeger.menu.bounds;
|
|
65
|
+
if (table.stateManeger.menu.isShow && "number" == typeof e.x && "number" == typeof e.y && e.x > left && e.x < right && e.y > top && e.y < bottom) return;
|
|
66
|
+
const {col: col, row: row} = e;
|
|
67
|
+
if ((!e.related || !this._isBindCell(col, row)) && (null === (_a = table.internalProps.tooltip) || void 0 === _a ? void 0 : _a.isShowOverflowTextTooltip)) {
|
|
68
|
+
const overflowText = table.getCellOverflowText(col, row), headerDescription = table.getHeaderDescription(col, row), rect = table.getCellRangeRelativeRect({
|
|
69
|
+
col: col,
|
|
70
|
+
row: row
|
|
71
|
+
});
|
|
72
|
+
let tooltipOption;
|
|
73
|
+
overflowText && (tooltipOption = {
|
|
74
|
+
content: headerDescription ? `${headerDescription}\n ${overflowText}` : overflowText,
|
|
75
|
+
referencePosition: {
|
|
76
|
+
placement: ts_types_1.Placement.bottom,
|
|
77
|
+
rect: rect
|
|
78
|
+
},
|
|
79
|
+
style: {
|
|
80
|
+
arrowMark: !1
|
|
81
|
+
}
|
|
82
|
+
}), headerDescription && (tooltipOption = {
|
|
83
|
+
content: headerDescription,
|
|
84
|
+
referencePosition: {
|
|
85
|
+
placement: ts_types_1.Placement.bottom,
|
|
86
|
+
rect: rect
|
|
87
|
+
},
|
|
88
|
+
style: {
|
|
89
|
+
arrowMark: !1
|
|
90
|
+
}
|
|
91
|
+
}), tooltipOption && this._bindToCell(e.col, e.row, tooltipOption);
|
|
92
|
+
}
|
|
93
|
+
})), table.listen(TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE.MOUSEMOVE_CELL, (e => {
|
|
94
|
+
var _a, _b;
|
|
95
|
+
if (!(0, util_1.isMobile)()) {
|
|
96
|
+
if (null === (_b = null === (_a = this._attachInfo) || void 0 === _a ? void 0 : _a.tooltipOptions) || void 0 === _b ? void 0 : _b.referencePosition) {
|
|
97
|
+
const position = this._attachInfo.tooltipOptions.referencePosition, {event: event} = e, {left: left, right: right, top: top, bottom: bottom} = position.rect, abstractPos = table._getMouseAbstractPoint(event, !1);
|
|
98
|
+
abstractPos && abstractPos.x >= left - 5 && abstractPos.x <= right + 5 && abstractPos.y >= top - 5 && abstractPos.y <= bottom + 5 || this._unbindFromCell();
|
|
99
|
+
}
|
|
100
|
+
this._attachInfo && table.stateManeger.menu.isShow && this._bindToCell(e.col, e.row);
|
|
101
|
+
}
|
|
102
|
+
})), table.listen(TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE.MOUSELEAVE_CELL, (e => {
|
|
103
|
+
e.related && this._isBindCell(e.related.col, e.related.row) || this._unbindFromCell();
|
|
104
|
+
})), table.listen(TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE.SELECTED_CELL, (e => {
|
|
105
|
+
this._isBindCell(e.col, e.row) && this._unbindFromCell();
|
|
106
|
+
})), table.listen(TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE.SCROLL, (e => {
|
|
107
|
+
var _a;
|
|
108
|
+
const info = this._attachInfo;
|
|
109
|
+
if ((null == info ? void 0 : info.tooltipOptions) && (null === (_a = null == info ? void 0 : info.range) || void 0 === _a ? void 0 : _a.start)) {
|
|
110
|
+
const {col: col, row: row} = info.range.start, rect = table.getCellRangeRelativeRect({
|
|
111
|
+
col: col,
|
|
112
|
+
row: row
|
|
113
|
+
});
|
|
114
|
+
info.tooltipOptions.referencePosition.rect = rect, this._move(info.range.start.col, info.range.start.row, info.tooltipOptions);
|
|
115
|
+
}
|
|
116
|
+
}));
|
|
117
|
+
}
|
|
118
|
+
_getTooltipInstanceInfo(col, row) {
|
|
119
|
+
const table = this._table, tooltipInstances = this._tooltipInstances;
|
|
120
|
+
return tooltipInstances && tooltipInstances["bubble-tooltip"] || tooltipInstances && (tooltipInstances["bubble-tooltip"] = TOOLTIP_INSTANCE_FACTORY["bubble-tooltip"](table));
|
|
121
|
+
}
|
|
122
|
+
isBinded(tooltipOptions) {
|
|
123
|
+
var _a;
|
|
124
|
+
return JSON.stringify(tooltipOptions) === JSON.stringify(null === (_a = this._attachInfo) || void 0 === _a ? void 0 : _a.tooltipOptions);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
exports.TooltipHandler = TooltipHandler;
|
|
129
|
+
//# sourceMappingURL=TooltipHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
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B,IAAI,gBAAgB,CAAC,WAAW,CAAC,CAAC;YACnD,CAAC,gBAAgB,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC,GAAG,wBAAwB,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACvG,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,QAAQ,CAAC,cAA8B;;QACrC,IAAI,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,MAAA,IAAI,CAAC,WAAW,0CAAE,cAAc,CAAC,EAAE;YACvF,OAAO,IAAI,CAAC;SACb;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAhND,wCAgNC","file":"TooltipHandler.js","sourcesContent":["import type { CellRange, RectProps } from '../ts-types';\nimport { Placement } from '../ts-types';\nimport type { BaseTooltip } from './BaseTooltip';\nimport { BubbleTooltip } from './Tooltip';\nimport { cellInRange } from '../tools/helper';\nimport { isMobile } from '../tools/util';\n// import { DG_EVENT_TYPE } from '../core/DG_EVENT_TYPE';\nimport type { TooltipOptions } from '../ts-types/tooltip';\nimport { TABLE_EVENT_TYPE } from '../core/TABLE_EVENT_TYPE';\nimport type { BaseTableAPI } from '../ts-types/base-table';\nconst TOOLTIP_INSTANCE_FACTORY = {\n // tooltip(table: BaseTableAPI): BaseTooltip {\n // return new Tooltip(table);\n // },\n 'bubble-tooltip': function (table: BaseTableAPI): BaseTooltip {\n return new BubbleTooltip(table);\n }\n};\ntype AttachInfo = {\n instance?: BaseTooltip;\n range: CellRange;\n tooltipOptions: TooltipOptions;\n};\n\nexport class TooltipHandler {\n private _table: BaseTableAPI;\n private _tooltipInstances?: { [type: string]: BaseTooltip };\n private _attachInfo?: AttachInfo | null;\n private confine?: boolean; //弹出框是否需要限定在canvas区域\n constructor(table: BaseTableAPI, confine: boolean) {\n this._table = table;\n this._tooltipInstances = {};\n this._bindTableEvent(table);\n this.confine = confine;\n }\n dispose(): void {\n const tooltipInstances = this._tooltipInstances;\n for (const k in tooltipInstances) {\n tooltipInstances[k]?.dispose?.();\n }\n delete this._tooltipInstances;\n this._attachInfo = null;\n }\n _bindToCell(col: number, row: number, tooltipOptions?: TooltipOptions): void {\n const info = this._attachInfo;\n const instance = this._getTooltipInstanceInfo(col, row);\n if (info && (!instance || info.instance !== instance)) {\n info.instance?.unbindTooltipElement();\n this._attachInfo = null;\n }\n if (!instance) {\n return;\n }\n // const { instance, info: tooltipInstanceInfo } = instanceInfo;\n const attach = instance && instance.bindTooltipElement(col, row, tooltipOptions, this.confine);\n if (attach) {\n const range = this._table.getCellRange(col, row);\n this._attachInfo = { range, instance, tooltipOptions };\n }\n }\n _move(col: number, row: number, tooltipOptions: TooltipOptions): void {\n const info = this._attachInfo;\n if (!info || !cellInRange(info.range, col, row)) {\n return;\n }\n const { instance } = info;\n instance?.moveTooltipElement(col, row, tooltipOptions, this.confine);\n }\n moveToPosition(\n col: number,\n row: number,\n position?: { x: number; y: number },\n referencePosition?: {\n rect: RectProps;\n placement?: Placement;\n }\n ): void {\n const info = this._attachInfo;\n if (!info || !cellInRange(info.range, col, row)) {\n return;\n }\n const { instance } = info;\n this._attachInfo.tooltipOptions.position = position;\n this._attachInfo.tooltipOptions.referencePosition = referencePosition;\n instance?.locateTooltipElement(col, row, position, referencePosition, this.confine);\n }\n _unbindFromCell(): void {\n const info = this._attachInfo;\n if (!info) {\n return;\n }\n const { instance } = info;\n instance?.unbindTooltipElement();\n this._attachInfo = null;\n }\n _isBindCell(col: number, row: number): boolean {\n const info = this._attachInfo;\n if (!info) {\n return false;\n }\n return cellInRange(info.range, col, row);\n }\n _bindTableEvent(table: BaseTableAPI): void {\n // (table.options.hover?.isShowTooltip || table.options.tooltip?.isShowOverflowTextTooltip) &&\n table.listen(TABLE_EVENT_TYPE.MOUSEENTER_CELL, e => {\n //移动端不监听mousemove事件 (修改移动端tooltip时加的isMobile判断)\n if (isMobile()) {\n return;\n }\n // dropDownMenu区域不响应\n const { x1: left, x2: right, y1: top, y2: bottom } = table.stateManeger.menu.bounds;\n if (\n table.stateManeger.menu.isShow &&\n typeof e.x === 'number' &&\n typeof e.y === 'number' &&\n e.x > left &&\n e.x < right &&\n e.y > top &&\n e.y < bottom\n ) {\n return;\n }\n const { col, row } = e;\n if (e.related) {\n if (this._isBindCell(col, row)) {\n return;\n }\n }\n if (table.internalProps.tooltip?.isShowOverflowTextTooltip) {\n const overflowText = table.getCellOverflowText(col, row);\n const headerDescription = table.getHeaderDescription(col, row);\n const rect = table.getCellRangeRelativeRect({ col, row });\n let tooltipOption;\n if (overflowText) {\n tooltipOption = {\n content: headerDescription\n ? `${headerDescription}\n ${overflowText}`\n : overflowText,\n referencePosition: {\n placement: Placement.bottom,\n rect\n },\n style: { arrowMark: false }\n };\n }\n if (headerDescription) {\n tooltipOption = {\n content: headerDescription,\n referencePosition: {\n placement: Placement.bottom,\n rect\n },\n style: { arrowMark: false }\n };\n }\n if (tooltipOption) {\n this._bindToCell(e.col, e.row, tooltipOption);\n }\n }\n });\n table.listen(TABLE_EVENT_TYPE.MOUSEMOVE_CELL, e => {\n //移动端不监听mousemove事件 (修改移动端tooltip时加的isMobile判断)\n if (isMobile()) {\n return;\n }\n if (this._attachInfo?.tooltipOptions?.referencePosition) {\n const position = this._attachInfo.tooltipOptions.referencePosition;\n const { event } = e;\n const { left, right, top, bottom } = position.rect;\n const abstractPos = table._getMouseAbstractPoint(event, false);\n if (\n !(\n abstractPos &&\n abstractPos.x >= left - 5 &&\n abstractPos.x <= right + 5 &&\n abstractPos.y >= top - 5 &&\n abstractPos.y <= bottom + 5\n )\n ) {\n // 这里加5px的判断buffer\n this._unbindFromCell();\n }\n }\n // dropDownMenu区域不响应\n if (this._attachInfo && table.stateManeger.menu.isShow) {\n this._bindToCell(e.col, e.row);\n }\n });\n table.listen(TABLE_EVENT_TYPE.MOUSELEAVE_CELL, e => {\n if (e.related) {\n if (this._isBindCell(e.related.col, e.related.row)) {\n return;\n }\n }\n this._unbindFromCell();\n });\n table.listen(TABLE_EVENT_TYPE.SELECTED_CELL, e => {\n if (this._isBindCell(e.col, e.row)) {\n this._unbindFromCell();\n }\n });\n table.listen(TABLE_EVENT_TYPE.SCROLL, e => {\n const info = this._attachInfo;\n if (info?.tooltipOptions && info?.range?.start) {\n const { col, row } = info.range.start;\n const rect = table.getCellRangeRelativeRect({ col, row });\n info.tooltipOptions.referencePosition.rect = rect;\n this._move(info.range.start.col, info.range.start.row, info.tooltipOptions);\n }\n });\n }\n _getTooltipInstanceInfo(col: number, row: number): BaseTooltip | null {\n const table = this._table;\n const tooltipInstances = this._tooltipInstances;\n // const info = getTooltipInstanceInfo(table, col, row, tooltipOptions);\n // if (!info) {\n // return null;\n // }\n const tooltipType = 'bubble-tooltip';\n // const { tooltipType } = info;\n const instance =\n (tooltipInstances && tooltipInstances[tooltipType]) ||\n (tooltipInstances && (tooltipInstances[tooltipType] = TOOLTIP_INSTANCE_FACTORY[tooltipType](table)));\n return instance;\n }\n isBinded(tooltipOptions: TooltipOptions) {\n if (JSON.stringify(tooltipOptions) === JSON.stringify(this._attachInfo?.tooltipOptions)) {\n return true;\n }\n return false;\n }\n}\n"]}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
@keyframes vtable__bubble-tooltip-element--shown-animation {
|
|
2
|
+
0% {
|
|
3
|
+
opacity: 0;
|
|
4
|
+
}
|
|
5
|
+
100% {
|
|
6
|
+
opacity: 1;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
.vtable__bubble-tooltip-element {
|
|
10
|
+
position: absolute;
|
|
11
|
+
|
|
12
|
+
pointer-events: none;
|
|
13
|
+
user-select: none;
|
|
14
|
+
max-width: 300px;
|
|
15
|
+
z-index: 99999;
|
|
16
|
+
|
|
17
|
+
background: #FFFFFF;
|
|
18
|
+
border: 1px solid #E6E8ED;
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
border-radius: 4px;
|
|
21
|
+
box-shadow: 0px 2px 4px rgb(27 31 35 / 8%);
|
|
22
|
+
color: #141414;
|
|
23
|
+
font-size: 13px;
|
|
24
|
+
}
|
|
25
|
+
.vtable__bubble-tooltip-element--hidden {
|
|
26
|
+
opacity: 0;
|
|
27
|
+
/* transform: translate(-50%, -50%); */
|
|
28
|
+
transition: opacity 75ms linear;
|
|
29
|
+
}
|
|
30
|
+
.vtable__bubble-tooltip-element--shown {
|
|
31
|
+
opacity: 1;
|
|
32
|
+
/* transform: translate(-50%, -50%); */
|
|
33
|
+
animation: vtable__bubble-tooltip-element--shown-animation 150ms ease-out;
|
|
34
|
+
}
|
|
35
|
+
.vtable__bubble-tooltip-element__content {
|
|
36
|
+
/* font-size: .75rem; */
|
|
37
|
+
padding: 6px 8px;
|
|
38
|
+
min-height: 1em;
|
|
39
|
+
line-height: 1.5;
|
|
40
|
+
width: 100%;
|
|
41
|
+
display: block;
|
|
42
|
+
white-space: pre-wrap;
|
|
43
|
+
margin: 0;
|
|
44
|
+
box-sizing: border-box;
|
|
45
|
+
overflow: hidden;
|
|
46
|
+
word-wrap: break-word;
|
|
47
|
+
position: relative;
|
|
48
|
+
background-color: #FFF;
|
|
49
|
+
z-index: 2;
|
|
50
|
+
border-radius: 4px
|
|
51
|
+
}
|
|
52
|
+
.vtable__bubble-tooltip-element__triangle {
|
|
53
|
+
/* font-size: .75rem; */
|
|
54
|
+
position: absolute;
|
|
55
|
+
width: 10px;
|
|
56
|
+
height: 10px;
|
|
57
|
+
display: block;
|
|
58
|
+
transform: rotate(45deg);
|
|
59
|
+
transform-origin: 50% 50% 0;
|
|
60
|
+
z-index: 1;
|
|
61
|
+
background-color: #FFF;
|
|
62
|
+
border: 1px solid #E6E8ED;
|
|
63
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { RectProps } from '../../ts-types';
|
|
2
|
+
import { Placement } from '../../ts-types';
|
|
3
|
+
import './BubbleTooltipElement.css';
|
|
4
|
+
import type { TooltipOptions } from '../../ts-types/tooltip';
|
|
5
|
+
import type { BaseTableAPI } from '../../ts-types/base-table';
|
|
6
|
+
export declare class BubbleTooltipElement {
|
|
7
|
+
private _handler;
|
|
8
|
+
private _rootElement?;
|
|
9
|
+
private _messageElement?;
|
|
10
|
+
private _triangleElement?;
|
|
11
|
+
constructor();
|
|
12
|
+
bindToCell(table: BaseTableAPI, col: number, row: number, tooltipInstanceInfo: TooltipOptions, confine: boolean): boolean;
|
|
13
|
+
dispose(): void;
|
|
14
|
+
move(table: BaseTableAPI, col: number, row: number, tooltipOptions?: TooltipOptions, confine?: boolean): void;
|
|
15
|
+
unbindFromCell(): void;
|
|
16
|
+
_canBindToCell(table: BaseTableAPI, col: number, row: number): boolean;
|
|
17
|
+
_bindToCell(table: BaseTableAPI, col: number, row: number, position?: {
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
}, referencePosition?: {
|
|
21
|
+
rect: RectProps;
|
|
22
|
+
placement?: Placement;
|
|
23
|
+
}, confine?: boolean, arrowMark?: boolean): boolean;
|
|
24
|
+
private getComputedPosition;
|
|
25
|
+
private removeStyleFromTriangle;
|
|
26
|
+
_locate(table: BaseTableAPI, col: number, row: number, position?: {
|
|
27
|
+
x: number;
|
|
28
|
+
y: number;
|
|
29
|
+
}, referencePosition?: {
|
|
30
|
+
rect: RectProps;
|
|
31
|
+
placement?: Placement;
|
|
32
|
+
}, confine?: boolean): void;
|
|
33
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
}), exports.BubbleTooltipElement = void 0;
|
|
6
|
+
|
|
7
|
+
const EventHandler_1 = require("../../event/EventHandler"), ts_types_1 = require("../../ts-types"), dom_1 = require("../../tools/dom");
|
|
8
|
+
|
|
9
|
+
require("./BubbleTooltipElement.css");
|
|
10
|
+
|
|
11
|
+
const util_1 = require("../../tools/util"), TOOLTIP_CLASS = "vtable__bubble-tooltip-element", CONTENT_CLASS = `${TOOLTIP_CLASS}__content`, TRIANGLE_CLASS = `${TOOLTIP_CLASS}__triangle`, HIDDEN_CLASS = `${TOOLTIP_CLASS}--hidden`, SHOWN_CLASS = `${TOOLTIP_CLASS}--shown`;
|
|
12
|
+
|
|
13
|
+
class BubbleTooltipElement {
|
|
14
|
+
constructor() {
|
|
15
|
+
this._handler = new EventHandler_1.EventHandler;
|
|
16
|
+
const rootElement = this._rootElement = (0, dom_1.createElement)("div", [ TOOLTIP_CLASS, HIDDEN_CLASS ]), messageElement = (0,
|
|
17
|
+
dom_1.createElement)("span", [ CONTENT_CLASS ]), triangle = (0, dom_1.createElement)("span", [ TRIANGLE_CLASS ]);
|
|
18
|
+
rootElement.appendChild(triangle), rootElement.appendChild(messageElement), this._messageElement = rootElement.querySelector(`.${CONTENT_CLASS}`) || void 0,
|
|
19
|
+
this._triangleElement = rootElement.querySelector(`.${TRIANGLE_CLASS}`) || void 0;
|
|
20
|
+
}
|
|
21
|
+
bindToCell(table, col, row, tooltipInstanceInfo, confine) {
|
|
22
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
23
|
+
const rootElement = this._rootElement, messageElement = this._messageElement, triangle = this._triangleElement;
|
|
24
|
+
if (null == rootElement || rootElement.classList.remove(SHOWN_CLASS), null == rootElement || rootElement.classList.add(HIDDEN_CLASS),
|
|
25
|
+
this._canBindToCell(table, col, row)) {
|
|
26
|
+
messageElement.setAttribute("style", ""), triangle.setAttribute("style", ""), (null == tooltipInstanceInfo ? void 0 : tooltipInstanceInfo.className) && rootElement.classList.add(tooltipInstanceInfo.className),
|
|
27
|
+
(null === (_a = null == tooltipInstanceInfo ? void 0 : tooltipInstanceInfo.style) || void 0 === _a ? void 0 : _a.bgColor) && (messageElement.style.backgroundColor = null === (_b = null == tooltipInstanceInfo ? void 0 : tooltipInstanceInfo.style) || void 0 === _b ? void 0 : _b.bgColor),
|
|
28
|
+
(null === (_c = null == tooltipInstanceInfo ? void 0 : tooltipInstanceInfo.style) || void 0 === _c ? void 0 : _c.bgColor) && (triangle.style.backgroundColor = null === (_d = null == tooltipInstanceInfo ? void 0 : tooltipInstanceInfo.style) || void 0 === _d ? void 0 : _d.bgColor),
|
|
29
|
+
triangle.style.display = !0 === (null === (_e = null == tooltipInstanceInfo ? void 0 : tooltipInstanceInfo.style) || void 0 === _e ? void 0 : _e.arrowMark) ? "block" : "none",
|
|
30
|
+
(null === (_f = null == tooltipInstanceInfo ? void 0 : tooltipInstanceInfo.style) || void 0 === _f ? void 0 : _f.font) && (messageElement.style.font = null === (_g = null == tooltipInstanceInfo ? void 0 : tooltipInstanceInfo.style) || void 0 === _g ? void 0 : _g.font),
|
|
31
|
+
(null === (_h = null == tooltipInstanceInfo ? void 0 : tooltipInstanceInfo.style) || void 0 === _h ? void 0 : _h.color) && (messageElement.style.color = null === (_j = null == tooltipInstanceInfo ? void 0 : tooltipInstanceInfo.style) || void 0 === _j ? void 0 : _j.color),
|
|
32
|
+
(null === (_k = null == tooltipInstanceInfo ? void 0 : tooltipInstanceInfo.style) || void 0 === _k ? void 0 : _k.padding) && (messageElement.style.padding = `${null === (_l = null == tooltipInstanceInfo ? void 0 : tooltipInstanceInfo.style) || void 0 === _l ? void 0 : _l.padding.join("px ")}px`),
|
|
33
|
+
messageElement && (messageElement.textContent = null == tooltipInstanceInfo ? void 0 : tooltipInstanceInfo.content);
|
|
34
|
+
if (this._bindToCell(table, col, row, null == tooltipInstanceInfo ? void 0 : tooltipInstanceInfo.position, null == tooltipInstanceInfo ? void 0 : tooltipInstanceInfo.referencePosition, confine, null === (_m = null == tooltipInstanceInfo ? void 0 : tooltipInstanceInfo.style) || void 0 === _m ? void 0 : _m.arrowMark)) return null == rootElement || rootElement.classList.add(SHOWN_CLASS),
|
|
35
|
+
null == rootElement || rootElement.classList.remove(HIDDEN_CLASS), !0;
|
|
36
|
+
} else this.unbindFromCell();
|
|
37
|
+
return !1;
|
|
38
|
+
}
|
|
39
|
+
dispose() {
|
|
40
|
+
var _a, _b;
|
|
41
|
+
this.unbindFromCell();
|
|
42
|
+
const rootElement = this._rootElement;
|
|
43
|
+
(null == rootElement ? void 0 : rootElement.parentElement) && rootElement.parentElement.removeChild(rootElement),
|
|
44
|
+
null === (_b = null === (_a = this._handler) || void 0 === _a ? void 0 : _a.dispose) || void 0 === _b || _b.call(_a),
|
|
45
|
+
delete this._rootElement, delete this._messageElement;
|
|
46
|
+
}
|
|
47
|
+
move(table, col, row, tooltipOptions, confine) {
|
|
48
|
+
const rootElement = this._rootElement;
|
|
49
|
+
this._canBindToCell(table, col, row) ? (this._bindToCell(table, col, row, null == tooltipOptions ? void 0 : tooltipOptions.position, null == tooltipOptions ? void 0 : tooltipOptions.referencePosition, confine),
|
|
50
|
+
null == rootElement || rootElement.classList.add(SHOWN_CLASS), null == rootElement || rootElement.classList.remove(HIDDEN_CLASS)) : this.unbindFromCell();
|
|
51
|
+
}
|
|
52
|
+
unbindFromCell() {
|
|
53
|
+
const rootElement = this._rootElement;
|
|
54
|
+
(null == rootElement ? void 0 : rootElement.parentElement) && (rootElement.classList.remove(SHOWN_CLASS),
|
|
55
|
+
rootElement.classList.add(HIDDEN_CLASS));
|
|
56
|
+
}
|
|
57
|
+
_canBindToCell(table, col, row) {
|
|
58
|
+
const rect = table.getCellRangeRelativeRect({
|
|
59
|
+
col: col,
|
|
60
|
+
row: row
|
|
61
|
+
}), element = table.getElement(), {bottom: bottom, left: left, right: right} = rect, {frozenRowCount: frozenRowCount, frozenColCount: frozenColCount} = table;
|
|
62
|
+
if (row >= frozenRowCount && frozenRowCount > 0) {
|
|
63
|
+
if (bottom < table.getCellRangeRelativeRect({
|
|
64
|
+
col: col,
|
|
65
|
+
row: frozenRowCount - 1
|
|
66
|
+
}).bottom) return !1;
|
|
67
|
+
} else if (bottom < 0) return !1;
|
|
68
|
+
if (col >= frozenColCount && frozenColCount > 0) {
|
|
69
|
+
if (right < table.getCellRangeRelativeRect({
|
|
70
|
+
col: frozenColCount - 1,
|
|
71
|
+
row: row
|
|
72
|
+
}).right) return !1;
|
|
73
|
+
} else if (left < 0) return !1;
|
|
74
|
+
const {offsetHeight: offsetHeight, offsetWidth: offsetWidth} = element;
|
|
75
|
+
return !(offsetHeight < bottom) && !(offsetWidth < left);
|
|
76
|
+
}
|
|
77
|
+
_bindToCell(table, col, row, position, referencePosition, confine, arrowMark) {
|
|
78
|
+
const rootElement = this._rootElement, rect = table.getCellRangeRelativeRect({
|
|
79
|
+
col: col,
|
|
80
|
+
row: row
|
|
81
|
+
}), element = table.getElement(), containerWidth = table.internalProps.element.offsetWidth, {width: width} = rect;
|
|
82
|
+
if (rootElement) {
|
|
83
|
+
let tooltipY, tooltipX;
|
|
84
|
+
rootElement.parentElement !== element && element.appendChild(rootElement), rootElement.style.left = "0px";
|
|
85
|
+
const maxWidth = Math.min(.8 * containerWidth, 4 * width);
|
|
86
|
+
rootElement.style.maxWidth = `${maxWidth}px`;
|
|
87
|
+
const rootElementWidth = rootElement.clientWidth, rootElementHeight = rootElement.clientHeight;
|
|
88
|
+
if (!position && !referencePosition) return !1;
|
|
89
|
+
{
|
|
90
|
+
const tooltipPosition = this.getComputedPosition(table, col, row, position, referencePosition, confine, arrowMark);
|
|
91
|
+
tooltipX = tooltipPosition.x, tooltipY = tooltipPosition.y;
|
|
92
|
+
}
|
|
93
|
+
rootElement.style.left = `${tooltipX}px`, rootElement.style.top = `${tooltipY}px`,
|
|
94
|
+
(0, util_1.isMobile)() && (rootElement.style.fontSize = "11px");
|
|
95
|
+
const {x1: menuLeft, x2: menuRight, y1: menuTop, y2: menuBottom} = table.stateManeger.menu.bounds, tooltipLeft = tooltipX, tooltipRight = tooltipLeft + rootElementWidth, tooltipTop = tooltipY, tooltipBottom = tooltipLeft + rootElementHeight;
|
|
96
|
+
return !(table.stateManeger.menu.isShow && menuLeft < tooltipRight && menuRight > tooltipLeft && menuBottom > tooltipTop && menuTop < tooltipBottom);
|
|
97
|
+
}
|
|
98
|
+
return !1;
|
|
99
|
+
}
|
|
100
|
+
getComputedPosition(table, col, row, position, referencePosition, confine, arrowMark) {
|
|
101
|
+
var _a;
|
|
102
|
+
const rootElement = this._rootElement, rect = table.getCellRangeRelativeRect({
|
|
103
|
+
col: col,
|
|
104
|
+
row: row
|
|
105
|
+
}), {width: containerWidth, height: containerHeight} = table.internalProps.element.getBoundingClientRect(), {width: width} = rect;
|
|
106
|
+
let tooltipY, tooltipX;
|
|
107
|
+
const maxWidth = Math.min(.8 * containerWidth, 4 * width);
|
|
108
|
+
rootElement.style.maxWidth = `${maxWidth}px`;
|
|
109
|
+
const rootElementWidth = rootElement.clientWidth, rootElementHeight = rootElement.clientHeight, triangleHeight = arrowMark ? 6 : 0;
|
|
110
|
+
if (position) tooltipX = position.x, tooltipY = position.y + triangleHeight, this._triangleElement.style.left = "50%",
|
|
111
|
+
this._triangleElement.style.marginLeft = "-5px", this._triangleElement.style.top = "-5px"; else if (referencePosition) {
|
|
112
|
+
let placement = null !== (_a = referencePosition.placement) && void 0 !== _a ? _a : ts_types_1.Placement.bottom;
|
|
113
|
+
const referenceXMiddle = referencePosition.rect.left + referencePosition.rect.width / 2 + table.tableX, referenceYMiddle = referencePosition.rect.top + referencePosition.rect.height / 2 + table.tableY, referenceTop = referencePosition.rect.top + table.tableY, referenceBottom = referencePosition.rect.bottom + table.tableY, referenceLeft = referencePosition.rect.left + table.tableX, referenceRight = referencePosition.rect.right + table.tableX;
|
|
114
|
+
let callCount = 0;
|
|
115
|
+
const adjustPosition = () => {
|
|
116
|
+
callCount++, callCount >= 4 || (this.removeStyleFromTriangle(), placement === ts_types_1.Placement.top ? (tooltipX = referenceXMiddle - rootElementWidth / 2,
|
|
117
|
+
tooltipY = referenceTop - rootElementHeight - triangleHeight, this._triangleElement.style.left = "50%",
|
|
118
|
+
this._triangleElement.style.marginLeft = "-5px", this._triangleElement.style.bottom = "-5px",
|
|
119
|
+
confine && tooltipY < 0 && (placement = ts_types_1.Placement.right, adjustPosition())) : placement === ts_types_1.Placement.bottom ? (tooltipX = referenceXMiddle - rootElementWidth / 2,
|
|
120
|
+
tooltipY = referenceBottom + triangleHeight, this._triangleElement.style.left = "50%",
|
|
121
|
+
this._triangleElement.style.marginLeft = "-5px", this._triangleElement.style.top = "-5px",
|
|
122
|
+
confine && tooltipY + rootElementHeight > containerHeight && (placement = ts_types_1.Placement.left,
|
|
123
|
+
adjustPosition())) : placement === ts_types_1.Placement.left ? (tooltipY = referenceYMiddle - rootElementHeight / 2,
|
|
124
|
+
tooltipX = referenceLeft - rootElementWidth - triangleHeight, this._triangleElement.style.top = "50%",
|
|
125
|
+
this._triangleElement.style.marginTop = "-5px", this._triangleElement.style.right = "-5px",
|
|
126
|
+
confine && tooltipX < 0 && (placement = ts_types_1.Placement.top, adjustPosition())) : placement === ts_types_1.Placement.right && (tooltipY = referenceYMiddle - rootElementHeight / 2,
|
|
127
|
+
tooltipX = referenceRight + triangleHeight, this._triangleElement.style.top = "50%",
|
|
128
|
+
this._triangleElement.style.marginTop = "-5px", this._triangleElement.style.left = "-5px",
|
|
129
|
+
confine && tooltipX + rootElementWidth > containerWidth && (placement = ts_types_1.Placement.bottom,
|
|
130
|
+
adjustPosition())));
|
|
131
|
+
};
|
|
132
|
+
adjustPosition();
|
|
133
|
+
}
|
|
134
|
+
return confine && (tooltipX < 0 ? tooltipX = 0 : tooltipX + rootElement.offsetWidth > containerWidth && (tooltipX = containerWidth - rootElement.offsetWidth)),
|
|
135
|
+
{
|
|
136
|
+
x: tooltipX,
|
|
137
|
+
y: tooltipY
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
removeStyleFromTriangle() {
|
|
141
|
+
this._triangleElement.style.left = "", this._triangleElement.style.right = "", this._triangleElement.style.top = "",
|
|
142
|
+
this._triangleElement.style.bottom = "", this._triangleElement.style.marginLeft = "",
|
|
143
|
+
this._triangleElement.style.marginTop = "";
|
|
144
|
+
}
|
|
145
|
+
_locate(table, col, row, position, referencePosition, confine) {
|
|
146
|
+
const tooltipPosition = this.getComputedPosition(table, col, row, position, referencePosition, confine), tooltipX = tooltipPosition.x, tooltipY = tooltipPosition.y;
|
|
147
|
+
this._rootElement.style.left = `${tooltipX}px`, this._rootElement.style.top = `${tooltipY}px`;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
exports.BubbleTooltipElement = BubbleTooltipElement;
|
|
152
|
+
//# sourceMappingURL=BubbleTooltipElement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["tooltip/logic/BubbleTooltipElement.ts"],"names":[],"mappings":";;;AAAA,2DAAwD;AAExD,6CAA2C;AAC3C,yCAAgD;AAChD,sCAAoC;AACpC,2CAA4C;AAI5C,MAAM,aAAa,GAAG,gCAAgC,CAAC;AACvD,MAAM,aAAa,GAAG,GAAG,aAAa,WAAW,CAAC;AAClD,MAAM,cAAc,GAAG,GAAG,aAAa,YAAY,CAAC;AACpD,MAAM,YAAY,GAAG,GAAG,aAAa,UAAU,CAAC;AAChD,MAAM,WAAW,GAAG,GAAG,aAAa,SAAS,CAAC;AAE9C,MAAa,oBAAoB;IAK/B;QACE,IAAI,CAAC,QAAQ,GAAG,IAAI,2BAAY,EAAE,CAAC;QACnC,MAAM,WAAW,GAAG,CAAC,IAAI,CAAC,YAAY,GAAG,IAAA,mBAAa,EAAC,KAAK,EAAE,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;QAC9F,MAAM,cAAc,GAAG,IAAA,mBAAa,EAAC,MAAM,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;QAC9D,MAAM,QAAQ,GAAG,IAAA,mBAAa,EAAC,MAAM,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC;QACzD,WAAW,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAClC,WAAW,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;QACxC,IAAI,CAAC,eAAe,GAAgB,WAAW,CAAC,aAAa,CAAC,IAAI,aAAa,EAAE,CAAC,IAAI,SAA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,GAAG,EAAE,CAAC;QAC5C,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,SAAS,GAAG,EAAE,CAAC;IAC7C,CAAC;IACD,OAAO,CACL,KAAmB,EACnB,GAAW,EACX,GAAW,EACX,QAAmC,EACnC,iBAGC,EACD,OAAiB;QAEjB,MAAM,eAAe,GAAG,IAAI,CAAC,mBAAmB,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,iBAAiB,EAAE,OAAO,CAAC,CAAC;QACxG,MAAM,QAAQ,GAAG,eAAe,CAAC,CAAC,CAAC;QACnC,MAAM,QAAQ,GAAG,eAAe,CAAC,CAAC,CAAC;QACnC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,GAAG,GAAG,QAAQ,IAAI,CAAC;QAC/C,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,QAAQ,IAAI,CAAC;IAChD,CAAC;CACF;AApUD,oDAoUC","file":"BubbleTooltipElement.js","sourcesContent":["import { EventHandler } from '../../event/EventHandler';\nimport type { RectProps } from '../../ts-types';\nimport { Placement } from '../../ts-types';\nimport { createElement } from '../../tools/dom';\nimport './BubbleTooltipElement.css';\nimport { isMobile } from '../../tools/util';\nimport type { TooltipOptions } from '../../ts-types/tooltip';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\n\nconst TOOLTIP_CLASS = 'vtable__bubble-tooltip-element';\nconst CONTENT_CLASS = `${TOOLTIP_CLASS}__content`;\nconst TRIANGLE_CLASS = `${TOOLTIP_CLASS}__triangle`;\nconst HIDDEN_CLASS = `${TOOLTIP_CLASS}--hidden`;\nconst SHOWN_CLASS = `${TOOLTIP_CLASS}--shown`;\n\nexport class BubbleTooltipElement {\n private _handler: EventHandler;\n private _rootElement?: HTMLElement;\n private _messageElement?: HTMLElement;\n private _triangleElement?: HTMLElement;\n constructor() {\n this._handler = new EventHandler();\n const rootElement = (this._rootElement = createElement('div', [TOOLTIP_CLASS, HIDDEN_CLASS]));\n const messageElement = createElement('span', [CONTENT_CLASS]);\n const triangle = createElement('span', [TRIANGLE_CLASS]);\n rootElement.appendChild(triangle);\n rootElement.appendChild(messageElement);\n this._messageElement = <HTMLElement>rootElement.querySelector(`.${CONTENT_CLASS}`) || undefined;\n this._triangleElement = <HTMLElement>rootElement.querySelector(`.${TRIANGLE_CLASS}`) || undefined;\n }\n bindToCell(\n table: BaseTableAPI,\n col: number,\n row: number,\n tooltipInstanceInfo: TooltipOptions,\n confine: boolean\n ): boolean {\n const rootElement = this._rootElement;\n const messageElement = this._messageElement;\n const triangle = this._triangleElement;\n\n rootElement?.classList.remove(SHOWN_CLASS);\n rootElement?.classList.add(HIDDEN_CLASS);\n if (this._canBindToCell(table, col, row)) {\n //设置style及类名\n messageElement.setAttribute('style', '');\n triangle.setAttribute('style', '');\n tooltipInstanceInfo?.className && rootElement.classList.add(tooltipInstanceInfo.className);\n tooltipInstanceInfo?.style?.bgColor &&\n (messageElement.style.backgroundColor = tooltipInstanceInfo?.style?.bgColor);\n tooltipInstanceInfo?.style?.bgColor && (triangle.style.backgroundColor = tooltipInstanceInfo?.style?.bgColor);\n triangle.style.display = tooltipInstanceInfo?.style?.arrowMark === true ? 'block' : 'none';\n tooltipInstanceInfo?.style?.font && (messageElement.style.font = tooltipInstanceInfo?.style?.font);\n tooltipInstanceInfo?.style?.color && (messageElement.style.color = tooltipInstanceInfo?.style?.color);\n tooltipInstanceInfo?.style?.padding &&\n (messageElement.style.padding = `${tooltipInstanceInfo?.style?.padding.join('px ')}px`);\n messageElement && (messageElement.textContent = tooltipInstanceInfo?.content);\n const binded = this._bindToCell(\n table,\n col,\n row,\n tooltipInstanceInfo?.position,\n tooltipInstanceInfo?.referencePosition,\n confine,\n tooltipInstanceInfo?.style?.arrowMark\n );\n if (binded) {\n rootElement?.classList.add(SHOWN_CLASS);\n rootElement?.classList.remove(HIDDEN_CLASS);\n return true;\n }\n } else {\n this.unbindFromCell();\n }\n return false;\n }\n dispose(): void {\n this.unbindFromCell();\n\n const rootElement = this._rootElement;\n if (rootElement?.parentElement) {\n rootElement.parentElement.removeChild(rootElement);\n }\n\n this._handler?.dispose?.();\n delete this._rootElement;\n delete this._messageElement;\n }\n move(table: BaseTableAPI, col: number, row: number, tooltipOptions?: TooltipOptions, confine?: boolean): void {\n const rootElement = this._rootElement;\n if (this._canBindToCell(table, col, row)) {\n this._bindToCell(table, col, row, tooltipOptions?.position, tooltipOptions?.referencePosition, confine);\n rootElement?.classList.add(SHOWN_CLASS);\n rootElement?.classList.remove(HIDDEN_CLASS);\n } else {\n this.unbindFromCell();\n }\n }\n unbindFromCell(): void {\n const rootElement = this._rootElement;\n if (rootElement?.parentElement) {\n rootElement.classList.remove(SHOWN_CLASS);\n rootElement.classList.add(HIDDEN_CLASS);\n }\n }\n _canBindToCell(table: BaseTableAPI, col: number, row: number): boolean {\n const rect = table.getCellRangeRelativeRect({ col, row });\n const element = table.getElement();\n const { bottom, left, right } = rect;\n const { frozenRowCount, frozenColCount } = table;\n if (row >= frozenRowCount && frozenRowCount > 0) {\n const frozenRect = table.getCellRangeRelativeRect({ col, row: frozenRowCount - 1 });\n if (bottom < frozenRect.bottom) {\n // 范围外\n return false;\n }\n } else if (bottom < 0) {\n // 范围外\n return false;\n }\n if (col >= frozenColCount && frozenColCount > 0) {\n const frozenRect = table.getCellRangeRelativeRect({ col: frozenColCount - 1, row });\n if (right < frozenRect.right) {\n //整个是被冻结列盖住的 不需要提示toolTip\n return false;\n }\n } else if (left < 0) {\n return false;\n }\n const { offsetHeight, offsetWidth } = element;\n if (offsetHeight < bottom) {\n return false;\n }\n if (offsetWidth < left) {\n return false;\n }\n return true;\n }\n _bindToCell(\n table: BaseTableAPI,\n col: number,\n row: number,\n position?: { x: number; y: number },\n referencePosition?: { rect: RectProps; placement?: Placement },\n confine?: boolean,\n arrowMark?: boolean\n ): boolean {\n const rootElement = this._rootElement;\n const rect = table.getCellRangeRelativeRect({ col, row });\n const element = table.getElement();\n const containerWidth = table.internalProps.element.offsetWidth;\n const { width } = rect;\n if (rootElement) {\n if (rootElement.parentElement !== element) {\n element.appendChild(rootElement);\n }\n rootElement.style.left = `0px`;\n // 边界碰撞检测\n let tooltipY: number;\n let tooltipX: number;\n //设置最宽尺寸\n const maxWidth = Math.min(containerWidth * 0.8, width * 4);\n rootElement.style.maxWidth = `${maxWidth}px`;\n //计算弹出框的宽度\n const rootElementWidth = rootElement.clientWidth; //Math.min(Math.max(rootElement.clientWidth, width), maxWidth);\n const rootElementHeight = rootElement.clientHeight;\n if (position || referencePosition) {\n const tooltipPosition = this.getComputedPosition(\n table,\n col,\n row,\n position,\n referencePosition,\n confine,\n arrowMark\n );\n tooltipX = tooltipPosition.x;\n tooltipY = tooltipPosition.y;\n } else {\n return false;\n }\n\n rootElement.style.left = `${tooltipX}px`;\n rootElement.style.top = `${tooltipY}px`;\n // rootElement.style.width=rootElementWidth+'px';\n if (isMobile()) {\n rootElement.style.fontSize = '11px';\n }\n\n // 判断当前tooltip范围是否与tooltip重合\n const { x1: menuLeft, x2: menuRight, y1: menuTop, y2: menuBottom } = table.stateManeger.menu.bounds;\n const tooltipLeft = tooltipX;\n const tooltipRight = tooltipLeft + rootElementWidth;\n const tooltipTop = tooltipY;\n const tooltipBottom = tooltipLeft + rootElementHeight;\n if (\n table.stateManeger.menu.isShow &&\n menuLeft < tooltipRight &&\n menuRight > tooltipLeft &&\n menuBottom > tooltipTop &&\n menuTop < tooltipBottom\n ) {\n return false;\n }\n return true;\n }\n return false;\n }\n private getComputedPosition(\n table: BaseTableAPI,\n col: number,\n row: number,\n position?: { x: number; y: number },\n referencePosition?: { rect: RectProps; placement?: Placement },\n confine?: boolean,\n arrowMark?: boolean\n ) {\n const rootElement = this._rootElement;\n const rect = table.getCellRangeRelativeRect({ col, row });\n const { width: containerWidth, height: containerHeight } = table.internalProps.element.getBoundingClientRect();\n const { width } = rect;\n // 边界碰撞检测\n let tooltipY: number;\n let tooltipX: number;\n //设置最宽尺寸\n const maxWidth = Math.min(containerWidth * 0.8, width * 4);\n rootElement.style.maxWidth = `${maxWidth}px`;\n //计算弹出框的宽度\n const rootElementWidth = rootElement.clientWidth; //Math.min(Math.max(rootElement.clientWidth, width), maxWidth);\n const rootElementHeight = rootElement.clientHeight;\n // this._triangleElement.setAttribute('style', '');\n const triangleHeight = arrowMark ? 6 : 0;\n if (position) {\n tooltipX = position.x;\n tooltipY = position.y + triangleHeight;\n this._triangleElement.style.left = '50%';\n this._triangleElement.style.marginLeft = '-5px';\n this._triangleElement.style.top = '-5px';\n } else if (referencePosition) {\n let placement = referencePosition.placement ?? Placement.bottom;\n const referenceXMiddle = referencePosition.rect.left + referencePosition.rect.width / 2 + (table as any).tableX;\n const referenceYMiddle = referencePosition.rect.top + referencePosition.rect.height / 2 + (table as any).tableY;\n const referenceTop = referencePosition.rect.top + (table as any).tableY;\n const referenceBottom = referencePosition.rect.bottom + (table as any).tableY;\n const referenceLeft = referencePosition.rect.left + (table as any).tableX;\n const referenceRight = referencePosition.rect.right + (table as any).tableX;\n\n let callCount = 0;\n /** 根据placement计算弹出框的位置 躲避策略[dom的这块先去除 dom可以超出显示]:根据顺时针方向依次检测placement */\n const adjustPosition = () => {\n callCount++;\n if (callCount >= 4) {\n return;\n }\n this.removeStyleFromTriangle();\n if (placement === Placement.top) {\n tooltipX = referenceXMiddle - rootElementWidth / 2;\n tooltipY = referenceTop - rootElementHeight - triangleHeight;\n this._triangleElement.style.left = '50%';\n this._triangleElement.style.marginLeft = '-5px';\n this._triangleElement.style.bottom = '-5px';\n\n // 判断如果超出左右范围则靠边显示\n if (confine && tooltipY < 0) {\n placement = Placement.right;\n adjustPosition();\n }\n } else if (placement === Placement.bottom) {\n tooltipX = referenceXMiddle - rootElementWidth / 2;\n tooltipY = referenceBottom + triangleHeight;\n this._triangleElement.style.left = '50%';\n this._triangleElement.style.marginLeft = '-5px';\n this._triangleElement.style.top = '-5px';\n if (confine && tooltipY + rootElementHeight > containerHeight) {\n placement = Placement.left;\n adjustPosition();\n }\n } else if (placement === Placement.left) {\n tooltipY = referenceYMiddle - rootElementHeight / 2;\n tooltipX = referenceLeft - rootElementWidth - triangleHeight;\n this._triangleElement.style.top = '50%';\n this._triangleElement.style.marginTop = '-5px';\n this._triangleElement.style.right = '-5px';\n if (confine && tooltipX < 0) {\n placement = Placement.top;\n adjustPosition();\n }\n } else if (placement === Placement.right) {\n tooltipY = referenceYMiddle - rootElementHeight / 2;\n tooltipX = referenceRight + triangleHeight;\n this._triangleElement.style.top = '50%';\n this._triangleElement.style.marginTop = '-5px';\n this._triangleElement.style.left = '-5px';\n if (confine && tooltipX + rootElementWidth > containerWidth) {\n placement = Placement.bottom;\n adjustPosition();\n }\n }\n };\n adjustPosition();\n }\n // 判断如果超出左右范围则靠边显示\n if (confine) {\n if (tooltipX < 0) {\n tooltipX = 0;\n } else if (tooltipX + rootElement.offsetWidth > containerWidth) {\n tooltipX = containerWidth - rootElement.offsetWidth;\n }\n }\n return {\n x: tooltipX,\n y: tooltipY\n };\n }\n private removeStyleFromTriangle() {\n this._triangleElement.style.left = '';\n this._triangleElement.style.right = '';\n this._triangleElement.style.top = '';\n this._triangleElement.style.bottom = '';\n this._triangleElement.style.marginLeft = '';\n this._triangleElement.style.marginTop = '';\n }\n _locate(\n table: BaseTableAPI,\n col: number,\n row: number,\n position?: { x: number; y: number },\n referencePosition?: {\n rect: RectProps;\n placement?: Placement;\n },\n confine?: boolean\n ) {\n const tooltipPosition = this.getComputedPosition(table, col, row, position, referencePosition, confine);\n const tooltipX = tooltipPosition.x;\n const tooltipY = tooltipPosition.y;\n this._rootElement.style.left = `${tooltipX}px`;\n this._rootElement.style.top = `${tooltipY}px`;\n }\n}\n"]}
|