@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,211 @@
|
|
|
1
|
+
import { createArc, createCircle, createRect } from "@visactor/vrender";
|
|
2
|
+
|
|
3
|
+
import { isFunction, isString } from "../../tools/util";
|
|
4
|
+
|
|
5
|
+
import { Group } from "../graphic/group";
|
|
6
|
+
|
|
7
|
+
import { Icon } from "../graphic/icon";
|
|
8
|
+
|
|
9
|
+
import { WrapText } from "../graphic/text";
|
|
10
|
+
|
|
11
|
+
export function dealWithCustom(customLayout, customRender, col, row, width, height, autoWidth, autoHeight, table) {
|
|
12
|
+
let expectedWidth, expectedHeight, customElements, elementsGroup, renderDefault = !0;
|
|
13
|
+
if ("function" == typeof customLayout) {
|
|
14
|
+
const customRenderObj = customLayout({
|
|
15
|
+
col: col,
|
|
16
|
+
row: row,
|
|
17
|
+
dataValue: table.getCellOriginValue(col, row),
|
|
18
|
+
value: table.getCellValue(col, row) || "",
|
|
19
|
+
rect: {
|
|
20
|
+
left: 0,
|
|
21
|
+
top: 0,
|
|
22
|
+
right: width,
|
|
23
|
+
bottom: height,
|
|
24
|
+
width: width,
|
|
25
|
+
height: height
|
|
26
|
+
},
|
|
27
|
+
table: table
|
|
28
|
+
});
|
|
29
|
+
customElements = customRenderObj.rootContainer.getElements(void 0, !1, !1), renderDefault = customRenderObj.renderDefault;
|
|
30
|
+
} else if ("function" == typeof customRender) {
|
|
31
|
+
const customRenderObj = customRender({
|
|
32
|
+
col: col,
|
|
33
|
+
row: row,
|
|
34
|
+
dataValue: table.getCellOriginValue(col, row),
|
|
35
|
+
value: table.getCellValue(col, row) || "",
|
|
36
|
+
rect: {
|
|
37
|
+
left: 0,
|
|
38
|
+
top: 0,
|
|
39
|
+
right: width,
|
|
40
|
+
bottom: height,
|
|
41
|
+
width: width,
|
|
42
|
+
height: height
|
|
43
|
+
},
|
|
44
|
+
table: table
|
|
45
|
+
});
|
|
46
|
+
customElements = customRenderObj.elements, renderDefault = customRenderObj.renderDefault,
|
|
47
|
+
expectedWidth = customRenderObj.expectedWidth, expectedHeight = customRenderObj.expectedHeight;
|
|
48
|
+
} else customRender && (expectedWidth = customRender.expectedWidth, expectedHeight = customRender.expectedHeight,
|
|
49
|
+
customElements = customRender.elements, renderDefault = customRender.renderDefault);
|
|
50
|
+
if (customElements) {
|
|
51
|
+
elementsGroup = adjustElementToGroup(customElements, autoWidth ? expectedWidth : width, autoHeight ? expectedHeight : height, table.getCellValue(col, row));
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
elementsGroup: elementsGroup,
|
|
55
|
+
renderDefault: renderDefault
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function adjustElementToGroup(elements, width, height, value) {
|
|
60
|
+
const customGroup = new Group({
|
|
61
|
+
x: 0,
|
|
62
|
+
y: 0,
|
|
63
|
+
width: width,
|
|
64
|
+
height: height,
|
|
65
|
+
pickable: !1
|
|
66
|
+
});
|
|
67
|
+
customGroup.name = "custom-container";
|
|
68
|
+
return adjustElementsPos(elements, width, height, value).forEach((element => {
|
|
69
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1;
|
|
70
|
+
switch (element.type) {
|
|
71
|
+
case "arc":
|
|
72
|
+
const arc = createArc({
|
|
73
|
+
x: element.x,
|
|
74
|
+
y: element.y,
|
|
75
|
+
dx: null !== (_a = element.dx) && void 0 !== _a ? _a : 0,
|
|
76
|
+
dy: null !== (_b = element.dy) && void 0 !== _b ? _b : 0,
|
|
77
|
+
fill: !!element.fillColor,
|
|
78
|
+
fillColor: element.fillColor,
|
|
79
|
+
stroke: !!element.strokeColor,
|
|
80
|
+
strokeColor: element.strokeColor,
|
|
81
|
+
outerRadius: element.radius,
|
|
82
|
+
startAngle: element.startAngle,
|
|
83
|
+
endAngle: element.endAngle,
|
|
84
|
+
pickable: !!element.clickable,
|
|
85
|
+
cursor: element.cursor
|
|
86
|
+
});
|
|
87
|
+
customGroup.appendChild(arc);
|
|
88
|
+
break;
|
|
89
|
+
|
|
90
|
+
case "text":
|
|
91
|
+
if (element.background) {
|
|
92
|
+
const expandX = null !== (_d = null === (_c = element.background) || void 0 === _c ? void 0 : _c.expandX) && void 0 !== _d ? _d : 0, expandY = null !== (_f = null === (_e = element.background) || void 0 === _e ? void 0 : _e.expandY) && void 0 !== _f ? _f : 0, textBackRect = createRect({
|
|
93
|
+
x: element.x - expandX,
|
|
94
|
+
y: element.y - expandY,
|
|
95
|
+
dx: null !== (_g = element.dx) && void 0 !== _g ? _g : 0,
|
|
96
|
+
dy: null !== (_h = element.dy) && void 0 !== _h ? _h : 0,
|
|
97
|
+
width: element.width + 2 * expandX,
|
|
98
|
+
height: element.height + 2 * expandY,
|
|
99
|
+
borderRadius: null !== (_k = null === (_j = element.background) || void 0 === _j ? void 0 : _j.borderRadius) && void 0 !== _k ? _k : 0,
|
|
100
|
+
fill: !0,
|
|
101
|
+
fillColor: null !== (_m = null === (_l = element.background) || void 0 === _l ? void 0 : _l.fillColor) && void 0 !== _m ? _m : "#888"
|
|
102
|
+
});
|
|
103
|
+
customGroup.appendChild(textBackRect);
|
|
104
|
+
}
|
|
105
|
+
const text = new WrapText(Object.assign({
|
|
106
|
+
fill: !!element.fillColor,
|
|
107
|
+
stroke: !!element.strokeColor,
|
|
108
|
+
pickable: !!element.clickable
|
|
109
|
+
}, element));
|
|
110
|
+
customGroup.appendChild(text);
|
|
111
|
+
break;
|
|
112
|
+
|
|
113
|
+
case "rect":
|
|
114
|
+
const rect = createRect({
|
|
115
|
+
x: element.x,
|
|
116
|
+
y: element.y,
|
|
117
|
+
dx: null !== (_o = element.dx) && void 0 !== _o ? _o : 0,
|
|
118
|
+
dy: null !== (_p = element.dy) && void 0 !== _p ? _p : 0,
|
|
119
|
+
width: element.width,
|
|
120
|
+
height: element.height,
|
|
121
|
+
borderRadius: element.radius,
|
|
122
|
+
fill: !!element.fillColor,
|
|
123
|
+
fillColor: element.fillColor,
|
|
124
|
+
stroke: !!element.strokeColor,
|
|
125
|
+
strokeColor: element.strokeColor,
|
|
126
|
+
pickable: !!element.clickable,
|
|
127
|
+
cursor: element.cursor
|
|
128
|
+
});
|
|
129
|
+
customGroup.appendChild(rect);
|
|
130
|
+
break;
|
|
131
|
+
|
|
132
|
+
case "circle":
|
|
133
|
+
const circle = createCircle({
|
|
134
|
+
x: element.x,
|
|
135
|
+
y: element.y,
|
|
136
|
+
dx: null !== (_q = element.dx) && void 0 !== _q ? _q : 0,
|
|
137
|
+
dy: null !== (_r = element.dy) && void 0 !== _r ? _r : 0,
|
|
138
|
+
radius: element.radius,
|
|
139
|
+
fill: !!element.fillColor,
|
|
140
|
+
fillColor: element.fillColor,
|
|
141
|
+
stroke: !!element.strokeColor,
|
|
142
|
+
strokeColor: element.strokeColor,
|
|
143
|
+
pickable: !!element.clickable,
|
|
144
|
+
cursor: element.cursor
|
|
145
|
+
});
|
|
146
|
+
customGroup.appendChild(circle);
|
|
147
|
+
break;
|
|
148
|
+
|
|
149
|
+
case "icon":
|
|
150
|
+
const icon = new Icon({
|
|
151
|
+
x: element.x,
|
|
152
|
+
y: element.y,
|
|
153
|
+
dx: null !== (_s = element.dx) && void 0 !== _s ? _s : 0,
|
|
154
|
+
dy: null !== (_t = element.dy) && void 0 !== _t ? _t : 0,
|
|
155
|
+
width: element.width,
|
|
156
|
+
height: element.height,
|
|
157
|
+
image: element.svg,
|
|
158
|
+
backgroundWidth: element.hover ? null !== (_u = element.hover.width) && void 0 !== _u ? _u : element.width : void 0,
|
|
159
|
+
backgroundHeight: element.hover ? null !== (_v = element.hover.width) && void 0 !== _v ? _v : element.width : void 0,
|
|
160
|
+
backgroundColor: element.hover ? null !== (_w = element.hover.bgColor) && void 0 !== _w ? _w : "rgba(22,44,66,0.2)" : void 0,
|
|
161
|
+
pickable: !!element.clickable,
|
|
162
|
+
cursor: element.cursor
|
|
163
|
+
});
|
|
164
|
+
icon.role = "icon-custom", customGroup.appendChild(icon);
|
|
165
|
+
break;
|
|
166
|
+
|
|
167
|
+
case "image":
|
|
168
|
+
const image = new Icon({
|
|
169
|
+
x: element.x,
|
|
170
|
+
y: element.y,
|
|
171
|
+
dx: null !== (_x = element.dx) && void 0 !== _x ? _x : 0,
|
|
172
|
+
dy: null !== (_y = element.dy) && void 0 !== _y ? _y : 0,
|
|
173
|
+
width: element.width,
|
|
174
|
+
height: element.height,
|
|
175
|
+
image: element.src,
|
|
176
|
+
backgroundWidth: element.hover ? null !== (_z = element.hover.width) && void 0 !== _z ? _z : element.width : void 0,
|
|
177
|
+
backgroundHeight: element.hover ? null !== (_0 = element.hover.width) && void 0 !== _0 ? _0 : element.width : void 0,
|
|
178
|
+
backgroundColor: element.hover ? null !== (_1 = element.hover.bgColor) && void 0 !== _1 ? _1 : "rgba(22,44,66,0.2)" : void 0,
|
|
179
|
+
pickable: !!element.clickable,
|
|
180
|
+
cursor: element.cursor,
|
|
181
|
+
shape: element.shape
|
|
182
|
+
});
|
|
183
|
+
image.role = "image-custom", customGroup.appendChild(image);
|
|
184
|
+
}
|
|
185
|
+
})), customGroup;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
function adjustElementsPos(originalElements, width, height, value) {
|
|
189
|
+
const result = [], borderLineWidths = [ 0, 0, 0, 0 ];
|
|
190
|
+
for (let i = 0; i < originalElements.length; i++) {
|
|
191
|
+
const originalElement = originalElements[i], element = Object.assign({}, originalElement);
|
|
192
|
+
for (const name in element) element.hasOwnProperty(name) && isFunction(element[name]) && (element[name] = element[name](value));
|
|
193
|
+
element.x = isString(element.x) ? transformString(element.x, width - borderLineWidths[1]) : Number(element.x),
|
|
194
|
+
element.y = isString(element.y) ? transformString(element.y, height - borderLineWidths[2]) : Number(element.y),
|
|
195
|
+
"width" in element && (element.width = isString(element.width) ? transformString(element.width, width - borderLineWidths[1]) : Number(element.width)),
|
|
196
|
+
"height" in element && (element.height = isString(element.height) ? transformString(element.height, height - borderLineWidths[2]) : Number(element.height)),
|
|
197
|
+
"radius" in element && (element.radius = isString(element.radius) ? transformString(element.radius, Math.min(width - borderLineWidths[1], height - borderLineWidths[2])) : Number(element.radius)),
|
|
198
|
+
"hover" in element && (element.hover.x = isString(element.hover.x) ? transformString(element.hover.x, width - borderLineWidths[1]) : Number(element.hover.x),
|
|
199
|
+
element.hover.y = isString(element.hover.y) ? transformString(element.hover.y, height - borderLineWidths[2]) : Number(element.hover.y),
|
|
200
|
+
element.hover.width = isString(element.hover.width) ? transformString(element.hover.width, width - borderLineWidths[1]) : Number(element.hover.width),
|
|
201
|
+
element.hover.height = isString(element.hover.height) ? transformString(element.hover.height, height - borderLineWidths[2]) : Number(element.hover.height),
|
|
202
|
+
element.hover.x += 0, element.hover.y += 0), element.x = element.x + 0, element.y = element.y + 0,
|
|
203
|
+
result.push(element);
|
|
204
|
+
}
|
|
205
|
+
return result;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
function transformString(str, size) {
|
|
209
|
+
return str.endsWith("px") ? parseInt(str, 10) : str.endsWith("%") && size ? parseInt(str, 10) / 100 * size : parseInt(str, 10);
|
|
210
|
+
}
|
|
211
|
+
//# sourceMappingURL=custom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["scenegraph/component/custom.ts"],"names":[],"mappings":"AACA,OAAO,EAA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\nimport { createArc, createCircle, createRect, TextAlignType, TextBaselineType } from '@visactor/vrender';\nimport { isFunction, isString } from '../../tools/util';\nimport type {\n ICustomLayout,\n ICustomRender,\n ICustomRenderElement,\n ICustomRenderElements,\n ICustomRenderFuc,\n ICustomRenderObj\n} from '../../ts-types';\nimport { Group } from '../graphic/group';\nimport { Icon } from '../graphic/icon';\nimport { WrapText } from '../graphic/text';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\n\nexport function dealWithCustom(\n customLayout: ICustomLayout,\n customRender: ICustomRender,\n col: number,\n row: number,\n width: number,\n height: number,\n autoWidth: boolean,\n autoHeight: boolean,\n table: BaseTableAPI\n) {\n let renderDefault = true;\n let expectedWidth: number;\n let expectedHeight: number;\n let customElements;\n if (typeof customLayout === 'function') {\n const arg = {\n col,\n row,\n dataValue: table.getCellOriginValue(col, row),\n value: table.getCellValue(col, row) || '',\n rect: {\n left: 0,\n top: 0,\n right: width,\n bottom: height,\n width,\n height\n },\n table\n };\n const customRenderObj = customLayout(arg);\n // expectedWidth = customRenderObj.expectedWidth;\n // expectedHeight = customRenderObj.expectedHeight;\n customElements = customRenderObj.rootContainer.getElements(undefined, false, false);\n renderDefault = customRenderObj.renderDefault;\n } else if (typeof customRender === 'function') {\n const arg = {\n col,\n row,\n dataValue: table.getCellOriginValue(col, row),\n value: table.getCellValue(col, row) || '',\n rect: {\n left: 0,\n top: 0,\n right: width,\n bottom: height,\n width,\n height\n },\n table\n };\n const customRenderObj = customRender(arg);\n customElements = customRenderObj.elements;\n renderDefault = customRenderObj.renderDefault;\n expectedWidth = customRenderObj.expectedWidth;\n expectedHeight = customRenderObj.expectedHeight;\n } else if (customRender) {\n expectedWidth = customRender.expectedWidth;\n expectedHeight = customRender.expectedHeight;\n customElements = customRender.elements;\n renderDefault = customRender.renderDefault;\n }\n\n let elementsGroup: Group;\n if (customElements) {\n const value = table.getCellValue(col, row);\n elementsGroup = adjustElementToGroup(\n customElements,\n autoWidth ? expectedWidth : width,\n autoHeight ? expectedHeight : height,\n value\n );\n }\n\n return {\n elementsGroup,\n renderDefault\n };\n}\n\nfunction adjustElementToGroup(\n elements: ICustomRenderElements,\n width: number,\n height: number,\n value: any\n): Group | undefined {\n const customGroup = new Group({\n x: 0,\n y: 0,\n width,\n height,\n pickable: false\n });\n customGroup.name = 'custom-container';\n\n const elementsAdjusted = adjustElementsPos(elements, width, height, value);\n elementsAdjusted.forEach(element => {\n switch (element.type) {\n case 'arc':\n const arc = createArc({\n x: element.x as number,\n y: element.y as number,\n dx: (element.dx ?? 0) as number,\n dy: (element.dy ?? 0) as number,\n fill: !!element.fillColor,\n fillColor: element.fillColor as string,\n stroke: !!element.strokeColor,\n strokeColor: element.strokeColor as string,\n outerRadius: element.radius as number,\n startAngle: element.startAngle as number,\n endAngle: element.endAngle as number,\n pickable: !!element.clickable,\n cursor: element.cursor as Cursor\n });\n customGroup.appendChild(arc);\n break;\n case 'text':\n if (element.background) {\n const expandX = element.background?.expandX ?? 0;\n const expandY = element.background?.expandY ?? 0;\n const textBackRect = createRect({\n x: (element.x as number) - expandX,\n y: (element.y as number) - expandY,\n dx: (element.dx ?? 0) as number,\n dy: (element.dy ?? 0) as number,\n width: element.width + expandX * 2,\n height: element.height + expandY * 2,\n borderRadius: element.background?.borderRadius ?? 0,\n fill: true,\n fillColor: element.background?.fillColor ?? '#888'\n });\n customGroup.appendChild(textBackRect);\n }\n const text = new WrapText(\n Object.assign(\n {\n fill: !!element.fillColor,\n stroke: !!element.strokeColor,\n pickable: !!element.clickable\n },\n element as any\n )\n );\n customGroup.appendChild(text);\n break;\n case 'rect':\n const rect = createRect({\n x: element.x as number,\n y: element.y as number,\n dx: (element.dx ?? 0) as number,\n dy: (element.dy ?? 0) as number,\n width: element.width as number,\n height: element.height as number,\n borderRadius: element.radius as number,\n fill: !!element.fillColor,\n fillColor: element.fillColor as string,\n stroke: !!element.strokeColor,\n strokeColor: element.strokeColor as string,\n pickable: !!element.clickable,\n cursor: element.cursor as Cursor\n });\n customGroup.appendChild(rect);\n break;\n case 'circle':\n const circle = createCircle({\n x: element.x as number,\n y: element.y as number,\n dx: (element.dx ?? 0) as number,\n dy: (element.dy ?? 0) as number,\n radius: element.radius as number,\n fill: !!element.fillColor,\n fillColor: element.fillColor as string,\n stroke: !!element.strokeColor,\n strokeColor: element.strokeColor as string,\n pickable: !!element.clickable,\n cursor: element.cursor as Cursor\n });\n customGroup.appendChild(circle);\n break;\n case 'icon':\n const icon = new Icon({\n x: element.x as number,\n y: element.y as number,\n dx: (element.dx ?? 0) as number,\n dy: (element.dy ?? 0) as number,\n width: element.width as number,\n height: element.height as number,\n image: element.svg as string,\n backgroundWidth: element.hover ? ((element.hover.width ?? element.width) as number) : undefined,\n backgroundHeight: element.hover ? ((element.hover.width ?? element.width) as number) : undefined,\n backgroundColor: element.hover ? element.hover.bgColor ?? 'rgba(22,44,66,0.2)' : undefined,\n pickable: !!element.clickable,\n cursor: element.cursor as Cursor\n });\n icon.role = 'icon-custom';\n customGroup.appendChild(icon);\n break;\n case 'image':\n const image = new Icon({\n x: element.x as number,\n y: element.y as number,\n dx: (element.dx ?? 0) as number,\n dy: (element.dy ?? 0) as number,\n width: element.width as number,\n height: element.height as number,\n image: element.src as string,\n backgroundWidth: element.hover ? ((element.hover.width ?? element.width) as number) : undefined,\n backgroundHeight: element.hover ? ((element.hover.width ?? element.width) as number) : undefined,\n backgroundColor: element.hover ? element.hover.bgColor ?? 'rgba(22,44,66,0.2)' : undefined,\n pickable: !!element.clickable,\n cursor: element.cursor as Cursor,\n shape: element.shape\n });\n image.role = 'image-custom';\n customGroup.appendChild(image);\n break;\n }\n });\n\n return customGroup;\n}\n\nfunction adjustElementsPos(\n originalElements: ICustomRenderElements,\n // rect: RectProps,\n width: number,\n height: number,\n // borderLineWidths: number[],\n value: any\n): ICustomRenderElements {\n const result: ICustomRenderElements = [];\n // const { left, top, width, height } = rect;\n const left = 0;\n const top = 0;\n const borderLineWidths = [0, 0, 0, 0];\n\n for (let i = 0; i < originalElements.length; i++) {\n const originalElement = originalElements[i];\n const element = Object.assign({}, originalElement);\n // 执行相关函数\n for (const name in element) {\n if (element.hasOwnProperty(name) && isFunction(element[name])) {\n element[name] = (element[name] as Function)(value);\n }\n }\n\n // 转换字符串值(百分比、px)\n element.x = isString(element.x)\n ? transformString(element.x as string, width - borderLineWidths[1])\n : Number(element.x);\n element.y = isString(element.y)\n ? transformString(element.y as string, height - borderLineWidths[2])\n : Number(element.y);\n if ('width' in element) {\n element.width = isString(element.width)\n ? transformString(element.width as string, width - borderLineWidths[1])\n : Number(element.width);\n }\n if ('height' in element) {\n element.height = isString(element.height)\n ? transformString(element.height as string, height - borderLineWidths[2])\n : Number(element.height);\n }\n if ('radius' in element) {\n element.radius = isString(element.radius)\n ? transformString(element.radius as string, Math.min(width - borderLineWidths[1], height - borderLineWidths[2]))\n : Number(element.radius);\n }\n if ('hover' in element) {\n // 转换字符串值(百分比、px)\n element.hover.x = isString(element.hover.x)\n ? transformString(element.hover.x as string, width - borderLineWidths[1])\n : Number(element.hover.x);\n element.hover.y = isString(element.hover.y)\n ? transformString(element.hover.y as string, height - borderLineWidths[2])\n : Number(element.hover.y);\n element.hover.width = isString(element.hover.width)\n ? transformString(element.hover.width as string, width - borderLineWidths[1])\n : Number(element.hover.width);\n\n element.hover.height = isString(element.hover.height)\n ? transformString(element.hover.height as string, height - borderLineWidths[2])\n : Number(element.hover.height);\n element.hover.x += left;\n element.hover.y += top;\n }\n // 矫正位置\n element.x = element.x + left;\n element.y = element.y + top;\n\n result.push(element as unknown as ICustomRenderElement);\n }\n\n return result;\n}\n\nfunction transformString(str: string, size?: number): number {\n if (str.endsWith('px')) {\n return parseInt(str, 10);\n } else if (str.endsWith('%') && size) {\n return (parseInt(str, 10) / 100) * size;\n }\n return parseInt(str, 10);\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Icon } from '../graphic/icon';
|
|
2
|
+
import type { Group } from '../graphic/group';
|
|
3
|
+
import type { Scenegraph } from '../scenegraph';
|
|
4
|
+
export declare class DrillIcon {
|
|
5
|
+
icon: Icon;
|
|
6
|
+
constructor();
|
|
7
|
+
appand(parent: Group): void;
|
|
8
|
+
update(visible: boolean, x: number, y: number, drillDown: boolean, drillUp: boolean, scene: Scenegraph): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Icon } from "../graphic/icon";
|
|
2
|
+
|
|
3
|
+
import * as icons from "../../icons";
|
|
4
|
+
|
|
5
|
+
const regedIcons = icons.get();
|
|
6
|
+
|
|
7
|
+
export class DrillIcon {
|
|
8
|
+
constructor() {
|
|
9
|
+
const iconOption = regedIcons.drillDown;
|
|
10
|
+
this.icon = new Icon({
|
|
11
|
+
x: -1e3,
|
|
12
|
+
y: -1e3,
|
|
13
|
+
image: iconOption.svg,
|
|
14
|
+
width: iconOption.width,
|
|
15
|
+
height: iconOption.height,
|
|
16
|
+
dx: -iconOption.width / 2,
|
|
17
|
+
dy: -iconOption.height / 2,
|
|
18
|
+
visible: !1,
|
|
19
|
+
funcType: iconOption.funcType,
|
|
20
|
+
cursor: iconOption.cursor
|
|
21
|
+
}), this.icon.role = "icon-drill";
|
|
22
|
+
}
|
|
23
|
+
appand(parent) {
|
|
24
|
+
parent.appendChild(this.icon);
|
|
25
|
+
}
|
|
26
|
+
update(visible, x, y, drillDown, drillUp, scene) {
|
|
27
|
+
if (!visible || drillDown && drillUp) return this.icon.setAttributes({
|
|
28
|
+
x: -1e3,
|
|
29
|
+
y: -1e3,
|
|
30
|
+
visible: !1
|
|
31
|
+
}), void scene.updateNextFrame();
|
|
32
|
+
const drillDownOption = regedIcons.drillDown, drillUpOption = regedIcons.drillUp;
|
|
33
|
+
this.icon.setAttributes({
|
|
34
|
+
x: x,
|
|
35
|
+
y: y,
|
|
36
|
+
image: drillDown ? drillDownOption.svg : drillUpOption.svg,
|
|
37
|
+
visible: !0
|
|
38
|
+
}), this.icon.loadImage(this.icon.attribute.image), scene.updateNextFrame();
|
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I;gBACR,OAAO,EAAE,KAAK;aACf,CAAC,CAAC;YACH,KAAK,CAAC,eAAe,EAAE,CAAC;YACxB,OAAO;SACR;QAED,MAAM,eAAe,GAAG,UAAU,CAAC,SAAoB,CAAC;QACxD,MAAM,aAAa,GAAG,UAAU,CAAC,OAAkB,CAAC;QACpD,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC;YACtB,CAAC;YACD,CAAC;YACD,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,aAAa,CAAC,GAAG;YAC1D,OAAO,EAAE,IAAI;SACd,CAAC,CAAC;QACH,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAC/C,KAAK,CAAC,eAAe,EAAE,CAAC;IAC1B,CAAC;CACF","file":"drill-icon.js","sourcesContent":["import type { Cursor } from '@visactor/vrender';\nimport { Icon } from '../graphic/icon';\nimport * as icons from '../../icons';\nimport type { SvgIcon } from '../../ts-types';\nimport type { Group } from '../graphic/group';\nimport type { Scenegraph } from '../scenegraph';\n\nconst regedIcons = icons.get();\n\nexport class DrillIcon {\n icon: Icon;\n\n constructor() {\n const iconOption = regedIcons.drillDown as SvgIcon;\n this.icon = new Icon({\n x: -1000,\n y: -1000,\n image: iconOption.svg,\n width: iconOption.width,\n height: iconOption.height,\n dx: -iconOption.width / 2,\n dy: -iconOption.height / 2,\n visible: false,\n funcType: iconOption.funcType,\n cursor: iconOption.cursor as Cursor\n });\n this.icon.role = 'icon-drill';\n }\n\n appand(parent: Group) {\n parent.appendChild(this.icon);\n }\n\n update(visible: boolean, x: number, y: number, drillDown: boolean, drillUp: boolean, scene: Scenegraph) {\n if (!visible || (drillDown && drillUp)) {\n this.icon.setAttributes({\n x: -1000,\n y: -1000,\n visible: false\n });\n scene.updateNextFrame();\n return;\n }\n\n const drillDownOption = regedIcons.drillDown as SvgIcon;\n const drillUpOption = regedIcons.drillUp as SvgIcon;\n this.icon.setAttributes({\n x,\n y,\n image: drillDown ? drillDownOption.svg : drillUpOption.svg,\n visible: true\n });\n this.icon.loadImage(this.icon.attribute.image);\n scene.updateNextFrame();\n }\n}\n"]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { IGroup } from '@visactor/vrender';
|
|
2
|
+
import type { MenuListItem } from '../../ts-types';
|
|
3
|
+
import { Group } from '../graphic/group';
|
|
4
|
+
import type { BaseTableAPI } from '../../ts-types/base-table';
|
|
5
|
+
export declare enum MenuType {
|
|
6
|
+
'dropDown' = "dropDown",
|
|
7
|
+
'contextmenu' = "contextmenu",
|
|
8
|
+
'custom' = "custom"
|
|
9
|
+
}
|
|
10
|
+
type MenuInfo = MenuListItem[];
|
|
11
|
+
export declare class MenuHandler {
|
|
12
|
+
private _table;
|
|
13
|
+
private _menuInstance;
|
|
14
|
+
private _menuInfo;
|
|
15
|
+
constructor(table: BaseTableAPI);
|
|
16
|
+
bindTableComponent(componentGroup: Group): void;
|
|
17
|
+
dispose(): void;
|
|
18
|
+
attach(x: number, y: number, col: number, row: number, type: MenuType, menuInfo?: MenuInfo): void;
|
|
19
|
+
updateMenuInfo(col: number, row: number, type: MenuType, menuInfo: MenuListItem[], highlightIndex: number): void;
|
|
20
|
+
checkDropDownMenuChange(col: number, row: number): boolean;
|
|
21
|
+
checkContextMenuChange(x: number, y: number): boolean;
|
|
22
|
+
updateMenuInstance(menuInfo: MenuInfo, highlightIndex: number): void;
|
|
23
|
+
updatePosition(x: number, y: number): void;
|
|
24
|
+
addToScene(): void;
|
|
25
|
+
detach(): void;
|
|
26
|
+
getMenuInfo(col: number, row: number, type: MenuType): {
|
|
27
|
+
menuInfo: MenuListItem[];
|
|
28
|
+
highlightIndex: number;
|
|
29
|
+
};
|
|
30
|
+
bindEvent(): void;
|
|
31
|
+
getEventInfo(target: IGroup): {
|
|
32
|
+
col: number;
|
|
33
|
+
row: number;
|
|
34
|
+
menuKey: string;
|
|
35
|
+
dropDownIndex: number;
|
|
36
|
+
text: string;
|
|
37
|
+
highlight: boolean;
|
|
38
|
+
};
|
|
39
|
+
get bounds(): import("@visactor/vutils").IBounds;
|
|
40
|
+
}
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { Text } from "@visactor/vrender";
|
|
2
|
+
|
|
3
|
+
import { TABLE_EVENT_TYPE } from "../../core/TABLE_EVENT_TYPE";
|
|
4
|
+
|
|
5
|
+
import { Group } from "../graphic/group";
|
|
6
|
+
|
|
7
|
+
import { Icon } from "../graphic/icon";
|
|
8
|
+
|
|
9
|
+
export var MenuType;
|
|
10
|
+
|
|
11
|
+
!function(MenuType) {
|
|
12
|
+
MenuType.dropDown = "dropDown", MenuType.contextmenu = "contextmenu", MenuType.custom = "custom";
|
|
13
|
+
}(MenuType || (MenuType = {}));
|
|
14
|
+
|
|
15
|
+
const menuStyle = {
|
|
16
|
+
fontSize: 12,
|
|
17
|
+
color: "#000",
|
|
18
|
+
highlightColor: "#2E68CF",
|
|
19
|
+
hoverBgColor: "#EEE",
|
|
20
|
+
lineHeight: 30,
|
|
21
|
+
bgColor: "#FFF",
|
|
22
|
+
borderRadius: 4,
|
|
23
|
+
borderWidth: .5,
|
|
24
|
+
borderColor: "#CCC",
|
|
25
|
+
menuPadding: 6,
|
|
26
|
+
menuItemPadding: 9,
|
|
27
|
+
maxLineWidth: 200
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export class MenuHandler {
|
|
31
|
+
constructor(table) {
|
|
32
|
+
this._table = table, this._menuInstance = new Group({
|
|
33
|
+
x: 0,
|
|
34
|
+
y: 0,
|
|
35
|
+
fill: !0,
|
|
36
|
+
fillColor: menuStyle.bgColor,
|
|
37
|
+
stroke: !0,
|
|
38
|
+
strokeColor: menuStyle.borderColor,
|
|
39
|
+
borderRadius: menuStyle.borderRadius,
|
|
40
|
+
lineWidth: menuStyle.borderWidth
|
|
41
|
+
}), this._menuInfo = {
|
|
42
|
+
x: -1,
|
|
43
|
+
y: -1,
|
|
44
|
+
col: -1,
|
|
45
|
+
row: -1,
|
|
46
|
+
type: MenuType.dropDown,
|
|
47
|
+
menuInfo: [],
|
|
48
|
+
highlightIndex: -1
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
bindTableComponent(componentGroup) {
|
|
52
|
+
componentGroup.appendChild(this._menuInstance), this.bindEvent();
|
|
53
|
+
}
|
|
54
|
+
dispose() {}
|
|
55
|
+
attach(x, y, col, row, type, menuInfo) {
|
|
56
|
+
if (type === MenuType.dropDown && this.checkDropDownMenuChange(col, row)) {
|
|
57
|
+
const tableMenuInfo = this.getMenuInfo(col, row, type);
|
|
58
|
+
if (!tableMenuInfo) return;
|
|
59
|
+
const {menuInfo: menuInfo, highlightIndex: highlightIndex} = tableMenuInfo;
|
|
60
|
+
this.updateMenuInfo(col, row, type, menuInfo, highlightIndex), this.updateMenuInstance(menuInfo, highlightIndex);
|
|
61
|
+
} else if (type === MenuType.contextmenu && this.checkContextMenuChange(x, y)) {
|
|
62
|
+
const tableMenuInfo = this.getMenuInfo(col, row, type);
|
|
63
|
+
if (!tableMenuInfo) return;
|
|
64
|
+
const {menuInfo: menuInfo, highlightIndex: highlightIndex} = tableMenuInfo;
|
|
65
|
+
this.updateMenuInfo(col, row, type, menuInfo, highlightIndex), this.updateMenuInstance(menuInfo, highlightIndex);
|
|
66
|
+
}
|
|
67
|
+
this.updatePosition(x - this._table.scenegraph.x, y - this._table.scenegraph.y),
|
|
68
|
+
this.addToScene();
|
|
69
|
+
}
|
|
70
|
+
updateMenuInfo(col, row, type, menuInfo, highlightIndex) {
|
|
71
|
+
this._menuInfo.col = col, this._menuInfo.row = row, this._menuInfo.type = type,
|
|
72
|
+
this._menuInfo.menuInfo = menuInfo, this._menuInfo.highlightIndex = highlightIndex;
|
|
73
|
+
}
|
|
74
|
+
checkDropDownMenuChange(col, row) {
|
|
75
|
+
const {type: type, col: curCol, row: curRow} = this._menuInfo;
|
|
76
|
+
return type !== MenuType.dropDown || col !== curCol || row !== curRow;
|
|
77
|
+
}
|
|
78
|
+
checkContextMenuChange(x, y) {
|
|
79
|
+
var _a;
|
|
80
|
+
const {type: type, menuInfo: menuInfo} = this._menuInfo;
|
|
81
|
+
return type !== MenuType.contextmenu || menuInfo !== (null === (_a = this._table.internalProps.menu) || void 0 === _a ? void 0 : _a.contextMenuItems);
|
|
82
|
+
}
|
|
83
|
+
updateMenuInstance(menuInfo, highlightIndex) {
|
|
84
|
+
this._menuInstance.removeAllChild();
|
|
85
|
+
let y = menuStyle.menuPadding;
|
|
86
|
+
const x = menuStyle.menuPadding;
|
|
87
|
+
let maxWidth = 0;
|
|
88
|
+
menuInfo.forEach(((item, index) => {
|
|
89
|
+
var _a, _b;
|
|
90
|
+
const isisHighlight = highlightIndex === index;
|
|
91
|
+
let icon, text;
|
|
92
|
+
"string" == typeof item ? text = item : "object" == typeof item && (text = item.text,
|
|
93
|
+
icon = isisHighlight ? item.selectedIcon : item.icon);
|
|
94
|
+
const group = new Group({
|
|
95
|
+
y: y,
|
|
96
|
+
x: x,
|
|
97
|
+
height: menuStyle.lineHeight,
|
|
98
|
+
fill: !0,
|
|
99
|
+
fillColor: menuStyle.bgColor
|
|
100
|
+
});
|
|
101
|
+
group.role = "menu-item", this._menuInstance.appendChild(group), group.stateProxy = stateName => "hover" === stateName ? {
|
|
102
|
+
fillColor: menuStyle.hoverBgColor
|
|
103
|
+
} : {
|
|
104
|
+
fillColor: menuStyle.bgColor
|
|
105
|
+
}, group.addEventListener("pointerenter", (e => {
|
|
106
|
+
group.addState("hover", !0, !1), this._table.scenegraph.updateNextFrame();
|
|
107
|
+
})), group.addEventListener("pointerleave", (e => {
|
|
108
|
+
group.removeState("hover", !1), this._table.scenegraph.updateNextFrame();
|
|
109
|
+
}));
|
|
110
|
+
const textMark = new Text({
|
|
111
|
+
x: menuStyle.menuItemPadding,
|
|
112
|
+
y: menuStyle.menuItemPadding,
|
|
113
|
+
fill: !0,
|
|
114
|
+
fillColor: isisHighlight ? menuStyle.highlightColor : menuStyle.color,
|
|
115
|
+
text: text,
|
|
116
|
+
textBaseline: "top",
|
|
117
|
+
fontSize: menuStyle.fontSize,
|
|
118
|
+
pickable: !1,
|
|
119
|
+
maxLineWidth: menuStyle.maxLineWidth,
|
|
120
|
+
ellipsis: "…"
|
|
121
|
+
});
|
|
122
|
+
if (group.addChild(textMark), icon) {
|
|
123
|
+
textMark.AABBBounds.height();
|
|
124
|
+
const iconWidth = null !== (_a = icon.width) && void 0 !== _a ? _a : 16, iconHeight = null !== (_b = icon.height) && void 0 !== _b ? _b : 16, iconMark = new Icon({
|
|
125
|
+
x: menuStyle.menuItemPadding,
|
|
126
|
+
y: (menuStyle.lineHeight - iconHeight) / 2,
|
|
127
|
+
width: iconWidth,
|
|
128
|
+
height: iconHeight,
|
|
129
|
+
image: icon.svg,
|
|
130
|
+
pickable: !1
|
|
131
|
+
});
|
|
132
|
+
iconMark.role = "menu-icon", group.insertBefore(iconMark, textMark), textMark.setAttribute("x", iconWidth + menuStyle.menuItemPadding);
|
|
133
|
+
}
|
|
134
|
+
maxWidth = Math.max(group.AABBBounds.width(), maxWidth), y += menuStyle.lineHeight;
|
|
135
|
+
})), this._menuInstance.setAttributes({
|
|
136
|
+
width: maxWidth + 2 * menuStyle.menuItemPadding + 2 * menuStyle.menuPadding,
|
|
137
|
+
height: y + menuStyle.menuPadding
|
|
138
|
+
}), this._menuInstance.forEachChildren((itemGroup => {
|
|
139
|
+
itemGroup.setAttribute("width", maxWidth + 2 * menuStyle.menuItemPadding);
|
|
140
|
+
}));
|
|
141
|
+
}
|
|
142
|
+
updatePosition(x, y) {
|
|
143
|
+
this._menuInstance.setAttributes({
|
|
144
|
+
x: this._menuInfo.type === MenuType.dropDown ? x - this._menuInstance.attribute.width : x,
|
|
145
|
+
y: y
|
|
146
|
+
}), this._menuInfo.x = MenuType.dropDown ? x - this._menuInstance.attribute.width : x,
|
|
147
|
+
this._menuInfo.y = y;
|
|
148
|
+
}
|
|
149
|
+
addToScene() {
|
|
150
|
+
this._table.scenegraph.updateNextFrame();
|
|
151
|
+
}
|
|
152
|
+
detach() {
|
|
153
|
+
this._menuInstance.setAttributes({
|
|
154
|
+
x: -1e3,
|
|
155
|
+
y: -1e3
|
|
156
|
+
}), this._table.scenegraph.updateNextFrame();
|
|
157
|
+
}
|
|
158
|
+
getMenuInfo(col, row, type) {
|
|
159
|
+
var _a;
|
|
160
|
+
if (type === MenuType.dropDown) {
|
|
161
|
+
const {dropDownMenu: dropDownMenu = this._table.globalDropDownMenu, pivotInfo: pivotInfo} = this._table._getHeaderLayoutMap(col, row);
|
|
162
|
+
let highlightIndex = -1;
|
|
163
|
+
if (Array.isArray(dropDownMenu)) for (let i = 0; i < dropDownMenu.length; i++) if (this._table._dropDownMenuIsHighlight(col, row, i)) {
|
|
164
|
+
highlightIndex = i;
|
|
165
|
+
break;
|
|
166
|
+
}
|
|
167
|
+
return {
|
|
168
|
+
menuInfo: dropDownMenu,
|
|
169
|
+
highlightIndex: highlightIndex
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
if (type === MenuType.contextmenu) {
|
|
173
|
+
const contextmenu = null === (_a = this._table.internalProps.menu) || void 0 === _a ? void 0 : _a.contextMenuItems;
|
|
174
|
+
let menuInfo;
|
|
175
|
+
if (Array.isArray(contextmenu)) menuInfo = contextmenu; else if ("function" == typeof contextmenu) {
|
|
176
|
+
const {field: field} = this._table.isHeader(col, row) ? this._table.getHeaderDefine(col, row) : this._table.getBodyColumnDefine(col, row);
|
|
177
|
+
menuInfo = contextmenu(field, row);
|
|
178
|
+
}
|
|
179
|
+
return {
|
|
180
|
+
menuInfo: menuInfo,
|
|
181
|
+
highlightIndex: -1
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
bindEvent() {
|
|
186
|
+
this._menuInstance.addEventListener("click", (e => {
|
|
187
|
+
const {target: target} = e;
|
|
188
|
+
if (target && "menu-item" === target.role) {
|
|
189
|
+
const resultMenuInfo = this.getEventInfo(target), resultTableInfo = this._table.getMenuInfo(this._menuInfo.col, this._menuInfo.row, this._menuInfo.type), result = Object.assign(resultMenuInfo, resultTableInfo);
|
|
190
|
+
this._table.fireListeners(TABLE_EVENT_TYPE.DROPDOWNMENU_CLICK, result);
|
|
191
|
+
}
|
|
192
|
+
}));
|
|
193
|
+
}
|
|
194
|
+
getEventInfo(target) {
|
|
195
|
+
const parent = target.parent;
|
|
196
|
+
let index = 0;
|
|
197
|
+
parent.forEachChildren(((child, i) => child === target && (index = i - 1, !0)));
|
|
198
|
+
const text = "string" == typeof this._menuInfo.menuInfo[index] ? this._menuInfo.menuInfo[index] : this._menuInfo.menuInfo[index].text, menuKey = "string" == typeof this._menuInfo.menuInfo[index] ? text : this._menuInfo.menuInfo[index].menuKey || text;
|
|
199
|
+
return {
|
|
200
|
+
col: this._menuInfo.col,
|
|
201
|
+
row: this._menuInfo.row,
|
|
202
|
+
dropDownIndex: index,
|
|
203
|
+
highlight: index === this._menuInfo.highlightIndex,
|
|
204
|
+
text: text,
|
|
205
|
+
menuKey: menuKey
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
get bounds() {
|
|
209
|
+
return this._menuInstance.globalAABBBounds;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
//# sourceMappingURL=menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["scenegraph/component/menu.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AASvC,MAAM,CAAN,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,iCAAuB,CAAA;IACvB,uCAA6B,CAAA;IAC7B,6BAAmB,CAAA;A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AAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,eAAe,CAAC,CAAC,KAAa,EAAE,CAAS,EAAE,EAAE;YAClD,IAAI,KAAK,KAAK,MAAM,EAAE;gBACpB,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC;gBACd,OAAO,IAAI,CAAC;aACb;YACD,OAAO,KAAK,CAAC;QACf,CAAC,CAAC,CAAC;QAEH,MAAM,IAAI,GACR,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,QAAQ;YAChD,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC;YAChC,CAAC,CAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAS,CAAC,IAAI,CAAC;QACnD,MAAM,OAAO,GACX,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,QAAQ;YAChD,CAAC,CAAC,IAAI;YACN,CAAC,CAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAS,CAAC,OAAO,IAAI,IAAI,CAAC;QAE9D,OAAO;YACL,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG;YACvB,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG;YACvB,aAAa,EAAE,KAAK;YACpB,SAAS,EAAE,KAAK,KAAK,IAAI,CAAC,SAAS,CAAC,cAAc;YAClD,IAAI;YACJ,OAAO;SACR,CAAC;IACJ,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,aAAa,CAAC,gBAAgB,CAAC;IAC7C,CAAC;CACF","file":"menu.js","sourcesContent":["import type { FederatedEvent, IGroup } from '@visactor/vrender';\nimport { createRect, Text } from '@visactor/vrender';\nimport { TABLE_EVENT_TYPE } from '../../core/TABLE_EVENT_TYPE';\nimport type { MenuListItem } from '../../ts-types';\nimport { Group } from '../graphic/group';\nimport { Icon } from '../graphic/icon';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\n\n/**\n * 菜单类型\n * dropDown 下拉菜单\n * contextmenu 右键菜单\n * custom 自定义菜单\n */\nexport enum MenuType {\n 'dropDown' = 'dropDown',\n 'contextmenu' = 'contextmenu',\n 'custom' = 'custom'\n}\n\ntype MenuInfo = MenuListItem[];\n\nconst menuStyle = {\n fontSize: 12,\n color: '#000',\n highlightColor: '#2E68CF',\n hoverBgColor: '#EEE',\n lineHeight: 12 + 9 + 9,\n bgColor: '#FFF',\n borderRadius: 4,\n borderWidth: 0.5,\n borderColor: '#CCC',\n menuPadding: 6,\n menuItemPadding: 9,\n maxLineWidth: 200\n};\n\nexport class MenuHandler {\n private _table: BaseTableAPI;\n private _menuInstance: IGroup;\n private _menuInfo: {\n x: number;\n y: number;\n col: number;\n row: number;\n type: MenuType;\n menuInfo: MenuListItem[];\n highlightIndex: number;\n };\n // private _attachInfo?: AttachInfo | null;\n\n constructor(table: BaseTableAPI) {\n this._table = table;\n this._menuInstance = new Group({\n x: 0,\n y: 0,\n // visible: false,\n fill: true,\n fillColor: menuStyle.bgColor,\n stroke: true,\n strokeColor: menuStyle.borderColor,\n borderRadius: menuStyle.borderRadius,\n lineWidth: menuStyle.borderWidth\n });\n this._menuInfo = {\n x: -1,\n y: -1,\n col: -1,\n row: -1,\n type: MenuType.dropDown,\n menuInfo: [],\n highlightIndex: -1\n };\n\n // this._menuInstance.setTheme({\n // rect: {\n // width: 100,\n // },\n // });\n\n // 绑定事件\n // this._bindTableEvent(table);\n }\n\n bindTableComponent(componentGroup: Group) {\n componentGroup.appendChild(this._menuInstance);\n\n this.bindEvent();\n }\n\n dispose() {\n // do nothing\n }\n\n attach(x: number, y: number, col: number, row: number, type: MenuType, menuInfo?: MenuInfo) {\n if (type === MenuType.dropDown && this.checkDropDownMenuChange(col, row)) {\n // 菜单内容变化,更新菜单Group\n const tableMenuInfo = this.getMenuInfo(col, row, type);\n if (!tableMenuInfo) {\n return;\n }\n const { menuInfo, highlightIndex } = tableMenuInfo;\n this.updateMenuInfo(col, row, type, menuInfo, highlightIndex);\n this.updateMenuInstance(menuInfo, highlightIndex);\n // this.updatePosition(x - this._table.scenegraph.x, y - this._table.scenegraph.y);\n } else if (type === MenuType.contextmenu) {\n if (this.checkContextMenuChange(x, y)) {\n const tableMenuInfo = this.getMenuInfo(col, row, type);\n if (!tableMenuInfo) {\n return;\n }\n const { menuInfo, highlightIndex } = tableMenuInfo;\n this.updateMenuInfo(col, row, type, menuInfo, highlightIndex);\n this.updateMenuInstance(menuInfo, highlightIndex);\n }\n }\n this.updatePosition(x - this._table.scenegraph.x, y - this._table.scenegraph.y);\n\n this.addToScene();\n }\n\n updateMenuInfo(col: number, row: number, type: MenuType, menuInfo: MenuListItem[], highlightIndex: number) {\n this._menuInfo.col = col;\n this._menuInfo.row = row;\n this._menuInfo.type = type;\n this._menuInfo.menuInfo = menuInfo;\n this._menuInfo.highlightIndex = highlightIndex;\n }\n\n checkDropDownMenuChange(col: number, row: number) {\n const { type, col: curCol, row: curRow } = this._menuInfo;\n if (type === MenuType.dropDown && col === curCol && row === curRow) {\n return false;\n }\n return true;\n }\n\n checkContextMenuChange(x: number, y: number) {\n const { type, menuInfo } = this._menuInfo;\n if (type === MenuType.contextmenu && menuInfo === this._table.internalProps.menu?.contextMenuItems) {\n return false;\n }\n return true;\n }\n\n updateMenuInstance(menuInfo: MenuInfo, highlightIndex: number) {\n // 清空Mark\n this._menuInstance.removeAllChild();\n\n // menu padding\n let y = menuStyle.menuPadding;\n const x = menuStyle.menuPadding;\n let maxWidth = 0;\n menuInfo.forEach((item, index) => {\n const isisHighlight = highlightIndex === index;\n let icon;\n let text;\n if (typeof item === 'string') {\n text = item;\n } else if (typeof item === 'object') {\n text = item.text;\n if (isisHighlight) {\n icon = item.selectedIcon;\n } else {\n icon = item.icon;\n }\n }\n\n const group = new Group({\n y,\n x,\n // childrenPickable: false,\n height: menuStyle.lineHeight,\n fill: true,\n fillColor: menuStyle.bgColor\n });\n group.role = 'menu-item';\n this._menuInstance.appendChild(group);\n\n // 处理背景hover效果\n group.stateProxy = (stateName: string) => {\n if (stateName === 'hover') {\n return {\n fillColor: menuStyle.hoverBgColor\n };\n }\n return {\n fillColor: menuStyle.bgColor\n };\n };\n group.addEventListener('pointerenter', (e: FederatedEvent) => {\n group.addState('hover', true, false);\n this._table.scenegraph.updateNextFrame();\n });\n group.addEventListener('pointerleave', (e: FederatedEvent) => {\n group.removeState('hover', false);\n this._table.scenegraph.updateNextFrame();\n });\n\n const textMark = new Text({\n x: menuStyle.menuItemPadding,\n y: menuStyle.menuItemPadding,\n fill: true,\n fillColor: isisHighlight ? menuStyle.highlightColor : menuStyle.color,\n text,\n textBaseline: 'top',\n fontSize: menuStyle.fontSize,\n pickable: false,\n maxLineWidth: menuStyle.maxLineWidth,\n ellipsis: '…'\n // lineHeight: menuStyle.lineHeight,\n });\n group.addChild(textMark);\n\n if (icon) {\n const textHeight = textMark.AABBBounds.height();\n const iconWidth = icon.width ?? 16;\n const iconHeight = icon.height ?? 16;\n const iconMark = new Icon({\n x: menuStyle.menuItemPadding,\n y: (menuStyle.lineHeight - iconHeight) / 2,\n width: iconWidth,\n height: iconHeight,\n image: icon.svg,\n pickable: false\n });\n iconMark.role = 'menu-icon';\n group.insertBefore(iconMark, textMark);\n textMark.setAttribute('x', iconWidth + menuStyle.menuItemPadding);\n }\n\n // const textWidth = textMark.AABBBounds.width();\n maxWidth = Math.max(group.AABBBounds.width(), maxWidth);\n\n y += menuStyle.lineHeight;\n });\n\n this._menuInstance.setAttributes({\n width: maxWidth + menuStyle.menuItemPadding * 2 + menuStyle.menuPadding * 2,\n height: y + menuStyle.menuPadding\n });\n this._menuInstance.forEachChildren((itemGroup: Group) => {\n itemGroup.setAttribute('width', maxWidth + menuStyle.menuItemPadding * 2);\n });\n }\n\n updatePosition(x: number, y: number) {\n // to do: 位置躲避\n this._menuInstance.setAttributes({\n x: this._menuInfo.type === MenuType.dropDown ? x - this._menuInstance.attribute.width : x,\n y\n });\n this._menuInfo.x = MenuType.dropDown ? x - this._menuInstance.attribute.width : x;\n this._menuInfo.y = y;\n }\n\n addToScene() {\n this._table.scenegraph.updateNextFrame();\n }\n\n detach() {\n this._menuInstance.setAttributes({\n // visible: false,\n x: -1000,\n y: -1000\n });\n // this._menuInstance.hideAll();\n this._table.scenegraph.updateNextFrame();\n }\n\n /**\n * @description: 获取对应单元格的菜单内容\n * @param {number} col\n * @param {number} row\n * @param {MenuType} type\n * @return {*}\n */\n getMenuInfo(col: number, row: number, type: MenuType) {\n if (type === MenuType.dropDown) {\n const { dropDownMenu = this._table.globalDropDownMenu, pivotInfo } = this._table._getHeaderLayoutMap(col, row);\n let highlightIndex = -1;\n if (Array.isArray(dropDownMenu)) {\n for (let i = 0; i < dropDownMenu.length; i++) {\n if (this._table._dropDownMenuIsHighlight(col, row, i)) {\n highlightIndex = i;\n break;\n }\n }\n }\n return {\n menuInfo: dropDownMenu,\n highlightIndex\n };\n } else if (type === MenuType.contextmenu) {\n const contextmenu = this._table.internalProps.menu?.contextMenuItems;\n let menuInfo;\n if (Array.isArray(contextmenu)) {\n menuInfo = contextmenu;\n } else if (typeof contextmenu === 'function') {\n const { field } = this._table.isHeader(col, row)\n ? this._table.getHeaderDefine(col, row)\n : this._table.getBodyColumnDefine(col, row);\n menuInfo = contextmenu(field, row);\n }\n return {\n menuInfo,\n highlightIndex: -1\n };\n }\n return undefined;\n }\n\n bindEvent() {\n // // 监听showMenu自定义事件\n // this._table.listen(DG_EVENT_TYPE.SHOW_MENU, (e) => {\n // const { x, y, col, row, type } = e;\n // this.attach(x, y, col, row, type);\n // });\n // // 监听hideMenu自定义事件\n // this._table.listen(DG_EVENT_TYPE.HIDE_MENU, () => {\n // this.detach();\n // });\n\n // 监听菜单内容click\n this._menuInstance.addEventListener('click', (e: FederatedEvent) => {\n const { target } = e;\n if (target && (target as unknown as Group).role === 'menu-item') {\n // 成功点击menu-item,触发自定义事件\n const resultMenuInfo = this.getEventInfo(target as unknown as Group);\n const resultTableInfo = this._table.getMenuInfo(this._menuInfo.col, this._menuInfo.row, this._menuInfo.type);\n const result = Object.assign(resultMenuInfo, resultTableInfo);\n this._table.fireListeners(TABLE_EVENT_TYPE.DROPDOWNMENU_CLICK, result);\n\n // 由DROPDOWNMENU_CLICK事件清空菜单\n // this.detach();\n }\n });\n }\n\n getEventInfo(target: IGroup): {\n col: number;\n row: number;\n menuKey: string;\n dropDownIndex: number;\n text: string;\n highlight: boolean;\n } {\n const parent = target.parent as IGroup;\n let index = 0;\n parent.forEachChildren((child: IGroup, i: number) => {\n if (child === target) {\n index = i - 1; // index 0为背景rect\n return true;\n }\n return false;\n });\n\n const text =\n typeof this._menuInfo.menuInfo[index] === 'string'\n ? this._menuInfo.menuInfo[index]\n : (this._menuInfo.menuInfo[index] as any).text;\n const menuKey =\n typeof this._menuInfo.menuInfo[index] === 'string'\n ? text\n : (this._menuInfo.menuInfo[index] as any).menuKey || text;\n\n return {\n col: this._menuInfo.col,\n row: this._menuInfo.row,\n dropDownIndex: index,\n highlight: index === this._menuInfo.highlightIndex,\n text,\n menuKey\n };\n }\n\n get bounds() {\n return this._menuInstance.globalAABBBounds;\n }\n}\n\n// class MenuContainer {}\n\n// class MenuElement {}\n"]}
|