@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 @@
|
|
|
1
|
+
{"version":3,"sources":["scenegraph/graphic/text.ts"],"names":[],"mappings":";;;AACA,+CAAsH;AAEtH,wDAAoD;AAOpD,MAAM,wBAAwB,GAAG,CAAC,aAAa,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC;AAS9E,MAAa,QAAS,SAAQ,cAAI;IAIhC,YAAY,MAAiC;QAC3C,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB,CAAC;IAMD,0BAA0B,CAAC,IAAqB;;QAC9C,MAAM,SAAS,GAAG,IAAA,kBAAQ,EAAC,IAAI,CAAC,CAAC,IAAI,CAAC;QAEtC,IAAI,KAAa,CAAC;QAClB,IAAI,GAAW,CAAC;QAChB,MAAM,GAAG,GAAG,CAAC,CAAC;QACd,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QACjC,MAAM,EACJ,YAAY,GAAG,SAAS,CAAC,YAAY,EACrC,QAAQ,GAAG,SAAS,CAAC,QAAQ,EAC7B,SAAS,GAAG,SAAS,CAAC,SAAS,EAC/B,YAAY,GAAG,SAAS,CAAC,YAAY,EACrC,QAAQ,GAAG,SAAS,CAAC,QAAQ,EAC7B,UAAU,GAAG,SAAS,CAAC,UAAU,EACjC,MAAM,GAAG,SAAS,CAA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AC,MAAM,EAAE,CAAC,EAAE,EAAE;YACxD,MAAM,OAAO,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC;YAC5C,IAAI,GAAG,KAAK,OAAO,EAAE;gBACnB,OAAO,IAAI,CAAC;aACb;SACF;QACD,OAAO,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IAClC,CAAC;CACF;AAtRD,4BAsRC","file":"text.js","sourcesContent":["import type { ITextGraphicAttribute, LayoutItemType } from '@visactor/vrender';\nimport { getTheme, graphicUtil, Text, CanvasTextLayout, textDrawOffsetX, textLayoutOffsetY } from '@visactor/vrender';\nimport type { Bounds } from '@visactor/vutils';\nimport { textMeasure } from '../utils/measure-text';\n\n/* WrapText功能/dist/core/contributions/textMeasure/layout\n * 1. 按照宽度限制自动折行或显示省略号\n * 2. 高度限制控制显示内容及省略号\n */\n\nconst WRAP_TEXT_UPDATE_TAG_KEY = ['heightLimit', 'lineClamp', 'autoWrapText'];\n\nexport interface IWrapTextGraphicAttribute extends ITextGraphicAttribute {\n // widthLimit: number;\n heightLimit?: number;\n lineClamp?: number;\n autoWrapText?: boolean;\n}\n\nexport class WrapText extends Text {\n declare attribute: IWrapTextGraphicAttribute;\n\n // eslint-disable-next-line no-useless-constructor\n constructor(params: IWrapTextGraphicAttribute) {\n super(params);\n }\n\n /**\n * 计算单行文字的bounds,可以缓存长度以及截取的文字\n * @param text\n */\n updateSingallineAABBBounds(text: number | string): Bounds {\n const textTheme = getTheme(this).text;\n // const textMeasure = graphicUtil.textMeasure;\n let width: number;\n let str: string;\n const buf = 2;\n const attribute = this.attribute;\n const {\n maxLineWidth = textTheme.maxLineWidth,\n ellipsis = textTheme.ellipsis,\n textAlign = textTheme.textAlign,\n textBaseline = textTheme.textBaseline,\n fontSize = textTheme.fontSize,\n fontFamily = textTheme.fontFamily,\n stroke = textTheme.stroke,\n lineHeight = attribute.lineHeight ?? (attribute.fontSize || textTheme.fontSize) + buf,\n lineWidth = textTheme.lineWidth\n } = attribute;\n\n if (!this.shouldUpdateShape() && this.cache) {\n width = this.cache.clipedWidth;\n const dx = textDrawOffsetX(textAlign, width);\n const dy = textLayoutOffsetY(textBaseline, lineHeight);\n this._AABBBounds.set(dx, dy, dx + width, dy + lineHeight);\n if (stroke) {\n this._AABBBounds.expand(lineWidth / 2);\n }\n return this._AABBBounds;\n }\n\n if (Number.isFinite(maxLineWidth)) {\n if (ellipsis) {\n const strEllipsis = (ellipsis === true ? textTheme.ellipsis : ellipsis) as string;\n const data = textMeasure.clipTextWithSuffix(\n text.toString(),\n { fontSize, fontFamily },\n maxLineWidth,\n strEllipsis\n );\n str = data.str;\n width = data.width;\n } else {\n const data = textMeasure.clipText(text.toString(), { fontSize, fontFamily }, maxLineWidth);\n str = data.str;\n width = data.width;\n }\n this.cache.clipedText = str;\n this.cache.clipedWidth = width;\n // todo 计算原本的宽度\n } else {\n width = textMeasure.measureTextWidth(text.toString(), { fontSize, fontFamily });\n this.cache.clipedText = text.toString();\n this.cache.clipedWidth = width;\n }\n this.clearUpdateShapeTag();\n\n const dx = textDrawOffsetX(textAlign, width);\n const dy = textLayoutOffsetY(textBaseline, lineHeight);\n this._AABBBounds.set(dx, dy, dx + width, dy + lineHeight);\n\n if (stroke) {\n this._AABBBounds.expand(lineWidth / 2);\n }\n\n return this._AABBBounds;\n }\n\n /**\n * 计算多行文字的bounds,缓存每行文字的布局位置\n * 自动折行params.text是数组,因此只重新updateMultilineAABBBounds\n * @param text\n */\n updateMultilineAABBBounds(text: (number | string)[]) {\n const textTheme = getTheme(this).text;\n const {\n fontFamily = textTheme.fontFamily,\n textAlign = textTheme.textAlign,\n textBaseline = textTheme.textBaseline,\n fontSize = textTheme.fontSize,\n lineHeight = this.attribute.lineHeight || this.attribute.fontSize || textTheme.fontSize,\n ellipsis = textTheme.ellipsis,\n maxLineWidth,\n stroke = textTheme.stroke,\n lineWidth = textTheme.lineWidth,\n // widthLimit,\n heightLimit = -1,\n lineClamp = (textTheme as any).lineClamp,\n autoWrapText = (textTheme as any).autoWrapText\n } = this.attribute;\n\n if (!this.shouldUpdateShape() && this.cache?.layoutData) {\n const bbox = this.cache.layoutData.bbox;\n this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height);\n if (stroke) {\n this._AABBBounds.expand(lineWidth / 2);\n }\n return this._AABBBounds;\n }\n\n // const textMeasure = graphicUtil.textMeasure;\n const layoutObj = new CanvasTextLayout(fontFamily, { fontSize, fontFamily }, textMeasure as any) as any;\n\n // layoutObj内逻辑\n const lines = text.map(l => l.toString()) as string[];\n const linesLayout: LayoutItemType[] = [];\n const bboxWH: [number, number] = [0, 0];\n\n let lineCountLimit = Infinity;\n if (heightLimit > 0) {\n lineCountLimit = Math.max(Math.floor(heightLimit / lineHeight), 1);\n }\n if (lineClamp) {\n // 处理行数限制\n lineCountLimit = Math.min(lineCountLimit, lineClamp);\n }\n\n if (!autoWrapText) {\n // 使用所有行中最长的作为lineWidth\n let lineWidth = 0;\n for (let i = 0, len = lines.length; i < len; i++) {\n // 判断是否超过高度限制\n if (i < lineCountLimit) {\n // 当前行为最后一行\n const clip = layoutObj.textMeasure.clipTextWithSuffix(\n lines[i],\n layoutObj.textOptions,\n maxLineWidth,\n ellipsis\n );\n linesLayout.push({\n str: clip.str,\n width: clip.width\n });\n lineWidth = Math.max(lineWidth, clip.width);\n }\n }\n bboxWH[0] = lineWidth;\n } else if (typeof maxLineWidth === 'number' && maxLineWidth !== Infinity) {\n // widthLimit > 0\n if (maxLineWidth > 0) {\n for (let i = 0; i < lines.length; i++) {\n const str = lines[i] as string;\n // // 测量当前行宽度\n // width = Math.min(\n // layoutObj.textMeasure.measureTextWidth(str, layoutObj.textOptions),\n // maxLineWidth\n // );\n\n // 判断是否超过高度限制\n if (i === lineCountLimit - 1) {\n // 当前行为最后一行\n const clip = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis);\n linesLayout.push({\n str: clip.str,\n width: clip.width\n });\n break; // 不处理后续行\n }\n\n // 测量截断位置\n const clip = layoutObj.textMeasure.clipText(str, layoutObj.textOptions, maxLineWidth);\n if (str !== '' && clip.str === '') {\n // 宽度限制不足一个字符,至少截取一个字符\n clip.str = str.substring(0, 1);\n clip.width = textMeasure.measureTextWidth(clip.str, { fontSize, fontFamily });\n }\n\n linesLayout.push({\n str: clip.str,\n width: clip.width\n });\n if (clip.str.length === str.length) {\n // 不需要截断\n } else {\n const newStr = str.substring(clip.str.length);\n lines.splice(i + 1, 0, newStr);\n }\n }\n }\n // bboxWH[0] = maxLineWidth;\n let maxWidth = 0;\n linesLayout.forEach(layout => {\n maxWidth = Math.max(maxWidth, layout.width);\n });\n bboxWH[0] = maxWidth;\n } else {\n // 使用所有行中最长的作为lineWidth\n let lineWidth = 0;\n let width: number;\n let text: string;\n for (let i = 0, len = lines.length; i < len; i++) {\n // 判断是否超过高度限制\n if (i === lineCountLimit - 1) {\n // 当前行为最后一行\n const clip = layoutObj.textMeasure.clipTextWithSuffix(\n lines[i],\n layoutObj.textOptions,\n maxLineWidth,\n ellipsis\n );\n linesLayout.push({\n str: clip.str,\n width: clip.width\n });\n lineWidth = Math.max(lineWidth, clip.width);\n break; // 不处理后续行\n }\n\n text = lines[i] as string;\n width = layoutObj.textMeasure.measureTextWidth(text, layoutObj.textOptions);\n lineWidth = Math.max(lineWidth, width);\n linesLayout.push({ str: text, width });\n }\n bboxWH[0] = lineWidth;\n }\n bboxWH[1] = linesLayout.length * lineHeight;\n\n const bbox = {\n xOffset: 0,\n yOffset: 0,\n width: bboxWH[0],\n height: bboxWH[1]\n };\n\n layoutObj.LayoutBBox(bbox, textAlign, textBaseline as any);\n\n const layoutData = layoutObj.layoutWithBBox(bbox, linesLayout, textAlign, textBaseline as any, lineHeight);\n\n // const layoutData = layoutObj.GetLayoutByLines(\n // text,\n // textAlign,\n // textBaseline as any,\n // lineHeight,\n // ellipsis === true ? (DefaultTextAttribute.ellipsis as string) : ellipsis || undefined,\n // maxLineWidth\n // );\n // const { bbox } = layoutData;\n this.cache.layoutData = layoutData;\n this.clearUpdateShapeTag();\n this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height);\n\n if (stroke) {\n this._AABBBounds.expand(lineWidth / 2);\n }\n\n return this._AABBBounds;\n }\n\n needUpdateTags(keys: string[]): boolean {\n for (let i = 0; i < WRAP_TEXT_UPDATE_TAG_KEY.length; i++) {\n const attrKey = WRAP_TEXT_UPDATE_TAG_KEY[i];\n if (keys.indexOf(attrKey) !== -1) {\n return true;\n }\n }\n return super.needUpdateTags(keys);\n }\n needUpdateTag(key: string): boolean {\n for (let i = 0; i < WRAP_TEXT_UPDATE_TAG_KEY.length; i++) {\n const attrKey = WRAP_TEXT_UPDATE_TAG_KEY[i];\n if (key === attrKey) {\n return true;\n }\n }\n return super.needUpdateTag(key);\n }\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IThemeSpec } from '@visactor/vrender';
|
|
2
|
+
import type { CellRange, ColumnDefine, ColumnTypeOption, ICustomRender } from '../../ts-types';
|
|
3
|
+
import { Group } from '../graphic/group';
|
|
4
|
+
import type { ICustomLayoutFuc } from '../../ts-types/customLayout';
|
|
5
|
+
import type { BaseTableAPI } from '../../ts-types/base-table';
|
|
6
|
+
export declare function createCell(type: ColumnTypeOption, define: ColumnDefine, table: BaseTableAPI, col: number, row: number, colWidth: number, bgColorFunc: Function, customRender: ICustomRender, customLayout: ICustomLayoutFuc, cellWidth: number, cellHeight: number, columnGroup: Group, y: number, padding: [number, number, number, number], textAlign: CanvasTextAlign, textBaseline: CanvasTextBaseline, mayHaveIcon: boolean, isfunctionalProps: boolean, isMerge: boolean, range: CellRange, cellTheme?: IThemeSpec): Group;
|
|
7
|
+
export declare function updateCell(col: number, row: number, table: BaseTableAPI): void;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
}), exports.updateCell = exports.createCell = void 0;
|
|
6
|
+
|
|
7
|
+
const global_1 = require("../../tools/global"), custom_1 = require("../component/custom"), group_1 = require("../graphic/group"), get_prop_1 = require("../utils/get-prop"), chart_cell_1 = require("./cell-type/chart-cell"), image_cell_1 = require("./cell-type/image-cell"), progress_bar_cell_1 = require("./cell-type/progress-bar-cell"), spark_line_cell_1 = require("./cell-type/spark-line-cell"), text_cell_1 = require("./cell-type/text-cell"), video_cell_1 = require("./cell-type/video-cell"), column_helper_1 = require("./column-helper");
|
|
8
|
+
|
|
9
|
+
function createCell(type, define, table, col, row, colWidth, bgColorFunc, customRender, customLayout, cellWidth, cellHeight, columnGroup, y, padding, textAlign, textBaseline, mayHaveIcon, isfunctionalProps, isMerge, range, cellTheme) {
|
|
10
|
+
let cellGroup;
|
|
11
|
+
if ("text" === type || "link" === type) {
|
|
12
|
+
if ("link" === type) {
|
|
13
|
+
const cellValue = table.getCellValue(col, row), headerStyle = table._getCellStyle(col, row);
|
|
14
|
+
"link" === type && ("templateLink" in define && define.templateLink || !("linkDetect" in define) || !define.linkDetect || global_1.regUrl.test(cellValue)) && (cellTheme ? (cellTheme.text.fillColor = (0,
|
|
15
|
+
get_prop_1.getProp)("linkColor", headerStyle, col, row, table), cellTheme.group.cursor = "pointer") : cellTheme = {
|
|
16
|
+
text: {
|
|
17
|
+
fillColor: (0, get_prop_1.getProp)("linkColor", headerStyle, col, row, table)
|
|
18
|
+
},
|
|
19
|
+
group: {
|
|
20
|
+
cursor: "pointer"
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
if (bgColorFunc) {
|
|
25
|
+
const cellValue = table.getCellOriginValue(col, row), bgColor = bgColorFunc(table, cellValue);
|
|
26
|
+
bgColor && (cellTheme ? cellTheme.group.fillColor = bgColor : cellTheme = {
|
|
27
|
+
group: {
|
|
28
|
+
fillColor: bgColor
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
let elementsGroup, renderDefault = !0;
|
|
33
|
+
if (customLayout || customRender) {
|
|
34
|
+
const {autoRowHeight: autoRowHeight} = table.internalProps, customResult = (0, custom_1.dealWithCustom)(customLayout, customRender, col, row, table.getColWidth(col), table.getRowHeight(row), !1, autoRowHeight, table);
|
|
35
|
+
elementsGroup = customResult.elementsGroup, renderDefault = customResult.renderDefault;
|
|
36
|
+
}
|
|
37
|
+
cellGroup = (0, text_cell_1.createCellGroup)(table, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, isfunctionalProps, renderDefault, cellTheme),
|
|
38
|
+
isMerge && (cellGroup.mergeCol = range.end.col, cellGroup.mergeRow = range.end.row),
|
|
39
|
+
elementsGroup && (cellGroup.appendChild(elementsGroup), cellGroup.setAttributes({
|
|
40
|
+
width: Math.max(cellGroup.attribute.width, elementsGroup.attribute.width),
|
|
41
|
+
height: Math.max(cellGroup.attribute.height, elementsGroup.attribute.height)
|
|
42
|
+
}));
|
|
43
|
+
} else if ("image" === type) cellGroup = (0, image_cell_1.createImageCellGroup)(columnGroup, 0, y, col, row, table.getColWidth(col), table.getRowHeight(row), define.keepAspectRatio, define.imageAutoSizing, padding, textAlign, textBaseline, table, cellTheme); else if ("video" === type) cellGroup = (0,
|
|
44
|
+
video_cell_1.createVideoCellGroup)(columnGroup, 0, y, col, row, table.getColWidth(col), table.getRowHeight(row), define.keepAspectRatio, define.imageAutoSizing, padding, textAlign, textBaseline, table, cellTheme); else if ("chart" === type) cellGroup = (0,
|
|
45
|
+
chart_cell_1.createChartCellGroup)(null, columnGroup, 0, y, col, row, table.getColWidth(col), table.getRowHeight(row), padding, table.getCellValue(col, row), define.chartType, define.chartSpec, columnGroup.attribute.chartInstance, table); else if ("progressbar" === type) {
|
|
46
|
+
const style = table._getCellStyle(col, row), value = table.getCellValue(col, row), dataValue = table.getCellOriginValue(col, row);
|
|
47
|
+
cellGroup = (0, text_cell_1.createCellGroup)(table, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, !1, !0, !0, cellTheme);
|
|
48
|
+
const progressBarGroup = (0, progress_bar_cell_1.createProgressBarCell)(define, style, colWidth, value, dataValue, col, row, padding, table);
|
|
49
|
+
cellGroup.insertBefore(progressBarGroup, cellGroup.firstChild);
|
|
50
|
+
} else "sparkline" === type && (cellGroup = (0, spark_line_cell_1.createSparkLineCellGroup)(null, columnGroup, 0, y, col, row, cellWidth, cellHeight, padding, table));
|
|
51
|
+
return cellGroup;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function updateCell(col, row, table) {
|
|
55
|
+
var _a, _b, _c, _d, _e;
|
|
56
|
+
const oldCellGroup = table.scenegraph.getCell(col, row, !0), type = table.isHeader(col, row) ? table._getHeaderLayoutMap(col, row).headerType : table.getBodyColumnType(col, row), cellType = table.getCellType(col, row), define = "body" !== cellType ? table.getHeaderDefine(col, row) : table.getBodyColumnDefine(col, row);
|
|
57
|
+
let isMerge, range, newCellGroup;
|
|
58
|
+
if (("body" !== cellType || (null == define ? void 0 : define.mergeCell)) && (range = table.getCellRange(col, row),
|
|
59
|
+
isMerge = range.start.col !== range.end.col || range.start.row !== range.end.row),
|
|
60
|
+
!isMerge || col === range.start.col && row === range.start.row) {
|
|
61
|
+
const mayHaveIcon = "body" !== cellType || !!(null == define ? void 0 : define.icon), headerStyle = table._getCellStyle(col, row), cellTheme = (0,
|
|
62
|
+
column_helper_1.getStyleTheme)(headerStyle, table, col, row, get_prop_1.getProp).theme, padding = cellTheme._vtable.padding, textAlign = cellTheme._vtable.textAlign, textBaseline = cellTheme._vtable.textBaseline;
|
|
63
|
+
let bgColorFunc, customRender, customLayout, cellWidth, cellHeight;
|
|
64
|
+
(null === (_b = null === (_a = table.internalProps) || void 0 === _a ? void 0 : _a.dataConfig) || void 0 === _b ? void 0 : _b.mappingRules) && "body" === cellType && (null === (_e = null === (_d = null === (_c = table.internalProps) || void 0 === _c ? void 0 : _c.dataConfig) || void 0 === _d ? void 0 : _d.mappingRules) || void 0 === _e || _e.forEach(((mappingRule, i) => {
|
|
65
|
+
mappingRule.bgColor && (bgColorFunc = mappingRule.bgColor.mapping);
|
|
66
|
+
}))), "body" !== cellType ? (customRender = null == define ? void 0 : define.headerCustomRender,
|
|
67
|
+
customLayout = null == define ? void 0 : define.headerCustomLayout) : (customRender = (null == define ? void 0 : define.customRender) || table.customRender,
|
|
68
|
+
customLayout = null == define ? void 0 : define.customLayout), range ? (cellWidth = table.getColsWidth(range.start.col, range.end.col),
|
|
69
|
+
cellHeight = table.getRowsHeight(range.start.row, range.end.row)) : (cellWidth = table.getColWidth(col),
|
|
70
|
+
cellHeight = table.getRowHeight(row)), newCellGroup = createCell(type, define, table, col, row, table.getColWidth(col), bgColorFunc, customRender, customLayout, cellWidth, cellHeight, oldCellGroup.parent, oldCellGroup.attribute.y, padding, textAlign, textBaseline, mayHaveIcon, !1, isMerge, range, cellTheme);
|
|
71
|
+
} else newCellGroup = new group_1.Group({
|
|
72
|
+
x: 0,
|
|
73
|
+
y: oldCellGroup.attribute.y,
|
|
74
|
+
width: 0,
|
|
75
|
+
height: 0,
|
|
76
|
+
visible: !1,
|
|
77
|
+
pickable: !1
|
|
78
|
+
}), newCellGroup.role = "shadow-cell", newCellGroup.col = col, newCellGroup.row = row,
|
|
79
|
+
newCellGroup.mergeCol = range.start.col, newCellGroup.mergeRow = range.start.row;
|
|
80
|
+
oldCellGroup.parent.insertAfter(newCellGroup, oldCellGroup), oldCellGroup.parent.removeChild(oldCellGroup);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
exports.createCell = createCell, exports.updateCell = updateCell;
|
|
84
|
+
//# sourceMappingURL=cell-helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["scenegraph/group-creater/cell-helper.ts"],"names":[],"mappings":";;;AAEA,+CAA4C;AAY5C,gDAAqD;AACrD,4CAAyC;A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X,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,UAAU,EACV,YAAY,CAAC,MAAM,EACnB,YAAY,CAAC,SAAS,CAAC,CAAC,EACxB,OAAO,EACP,SAAS,EACT,YAAY,EACZ,WAAW,EACX,KAAK,EACL,OAAO,EACP,KAAK,EACL,SAAS,CACV,CAAC;KACH;IAED,YAAY,CAAC,MAAM,CAAC,WAAW,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;IAC5D,YAAY,CAAC,MAAM,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;AAChD,CAAC;AApGD,gCAoGC","file":"cell-helper.js","sourcesContent":["import type { Cursor, IThemeSpec } from '@visactor/vrender';\nimport type { ProgressBarStyle } from '../../body-helper/style/ProgressBarStyle';\nimport { regUrl } from '../../tools/global';\nimport type {\n CellRange,\n ChartColumnDefine,\n ColumnDefine,\n ColumnTypeOption,\n ICustomRender,\n ImageColumnDefine,\n MappingRule,\n ProgressbarColumnDefine,\n TextColumnDefine\n} from '../../ts-types';\nimport { dealWithCustom } from '../component/custom';\nimport { Group } from '../graphic/group';\nimport { getProp } from '../utils/get-prop';\nimport { createChartCellGroup } from './cell-type/chart-cell';\nimport { createImageCellGroup } from './cell-type/image-cell';\nimport { createProgressBarCell } from './cell-type/progress-bar-cell';\nimport { createSparkLineCellGroup } from './cell-type/spark-line-cell';\nimport { createCellGroup } from './cell-type/text-cell';\nimport { createVideoCellGroup } from './cell-type/video-cell';\nimport type { ICustomLayoutFuc } from '../../ts-types/customLayout';\nimport { getStyleTheme } from './column-helper';\nimport type { BaseTableAPI, PivotTableProtected } from '../../ts-types/base-table';\n\nexport function createCell(\n type: ColumnTypeOption,\n define: ColumnDefine,\n table: BaseTableAPI,\n col: number,\n row: number,\n colWidth: number,\n bgColorFunc: Function,\n customRender: ICustomRender,\n customLayout: ICustomLayoutFuc,\n cellWidth: number,\n cellHeight: number,\n columnGroup: Group,\n y: number,\n padding: [number, number, number, number],\n textAlign: CanvasTextAlign,\n textBaseline: CanvasTextBaseline,\n mayHaveIcon: boolean,\n isfunctionalProps: boolean,\n isMerge: boolean,\n range: CellRange,\n cellTheme?: IThemeSpec\n): Group {\n let cellGroup: Group;\n if (type === 'text' || type === 'link') {\n if (type === 'link') {\n //如果是超链接 颜色按照linkColor绘制 TODO:放到方法_getCellStyle中\n // const columnDefine = table.getHeaderDefine(col, row);\n const cellValue = table.getCellValue(col, row);\n const headerStyle = table._getCellStyle(col, row);\n\n if (\n type === 'link' &&\n (('templateLink' in define && define.templateLink) ||\n !('linkDetect' in define && define.linkDetect) ||\n regUrl.test(cellValue))\n ) {\n if (cellTheme) {\n cellTheme.text.fillColor = getProp('linkColor', headerStyle, col, row, table);\n (cellTheme as any).group.cursor = 'pointer';\n } else {\n cellTheme = {\n text: {\n fillColor: getProp('linkColor', headerStyle, col, row, table)\n },\n group: {\n cursor: 'pointer' as Cursor\n }\n };\n }\n }\n }\n // 判断是否有mapping 遍历dataset中mappingRules 但这里还需要根据fieldName来判断\n if (bgColorFunc) {\n const cellValue = table.getCellOriginValue(col, row);\n const bgColor = bgColorFunc(table, cellValue);\n if (bgColor) {\n if (cellTheme) {\n cellTheme.group.fillColor = bgColor;\n } else {\n cellTheme = {\n group: {\n fillColor: bgColor\n }\n };\n }\n }\n }\n\n let elementsGroup;\n let renderDefault = true;\n if (customLayout || customRender) {\n const { autoRowHeight } = table.internalProps;\n const customResult = dealWithCustom(\n customLayout,\n customRender,\n col,\n row,\n table.getColWidth(col),\n table.getRowHeight(row),\n false,\n autoRowHeight,\n table\n );\n elementsGroup = customResult.elementsGroup;\n renderDefault = customResult.renderDefault;\n }\n cellGroup = createCellGroup(\n table,\n columnGroup,\n 0,\n y,\n col,\n row,\n colWidth,\n cellWidth,\n cellHeight,\n padding,\n textAlign,\n textBaseline,\n mayHaveIcon,\n isfunctionalProps,\n renderDefault,\n cellTheme\n );\n if (isMerge) {\n cellGroup.mergeCol = range.end.col;\n cellGroup.mergeRow = range.end.row;\n }\n if (elementsGroup) {\n cellGroup.appendChild(elementsGroup);\n cellGroup.setAttributes({\n width: Math.max(cellGroup.attribute.width, elementsGroup.attribute.width),\n height: Math.max(cellGroup.attribute.height, elementsGroup.attribute.height)\n });\n }\n } else if (type === 'image') {\n // 创建图片单元格\n cellGroup = createImageCellGroup(\n columnGroup,\n 0,\n y,\n col,\n row,\n table.getColWidth(col),\n table.getRowHeight(row),\n (define as ImageColumnDefine).keepAspectRatio,\n (define as ImageColumnDefine).imageAutoSizing,\n padding,\n textAlign,\n textBaseline,\n table,\n cellTheme\n );\n } else if (type === 'video') {\n // 创建视频单元格\n cellGroup = createVideoCellGroup(\n columnGroup,\n 0,\n y,\n col,\n row,\n table.getColWidth(col),\n table.getRowHeight(row),\n (define as ImageColumnDefine).keepAspectRatio,\n (define as ImageColumnDefine).imageAutoSizing,\n padding,\n textAlign,\n textBaseline,\n table,\n cellTheme\n );\n } else if (type === 'chart') {\n cellGroup = createChartCellGroup(\n null,\n columnGroup,\n 0,\n y,\n col,\n row,\n table.getColWidth(col),\n table.getRowHeight(row),\n padding,\n table.getCellValue(col, row),\n (define as ChartColumnDefine).chartType,\n (define as ChartColumnDefine).chartSpec,\n (columnGroup.attribute as any).chartInstance,\n table\n );\n } else if (type === 'progressbar') {\n const style = table._getCellStyle(col, row) as ProgressBarStyle;\n const value = table.getCellValue(col, row);\n const dataValue = table.getCellOriginValue(col, row);\n // 创建基础文字单元格\n cellGroup = createCellGroup(\n table,\n columnGroup,\n 0,\n y,\n col,\n row,\n colWidth,\n cellWidth,\n cellHeight,\n padding,\n textAlign,\n textBaseline,\n false,\n true,\n true,\n cellTheme\n );\n\n // 创建bar group\n const progressBarGroup = createProgressBarCell(\n define as ProgressbarColumnDefine,\n style,\n colWidth,\n value,\n dataValue,\n col,\n row,\n padding,\n table\n );\n // 进度图插入到文字前,绘制在文字下\n cellGroup.insertBefore(progressBarGroup, cellGroup.firstChild);\n } else if (type === 'sparkline') {\n cellGroup = createSparkLineCellGroup(null, columnGroup, 0, y, col, row, cellWidth, cellHeight, padding, table);\n }\n\n return cellGroup;\n}\n\nexport function updateCell(col: number, row: number, table: BaseTableAPI) {\n const oldCellGroup = table.scenegraph.getCell(col, row, true);\n\n const type = table.isHeader(col, row)\n ? table._getHeaderLayoutMap(col, row).headerType\n : table.getBodyColumnType(col, row);\n const cellType = table.getCellType(col, row);\n const define = cellType !== 'body' ? table.getHeaderDefine(col, row) : table.getBodyColumnDefine(col, row);\n\n let isMerge;\n let range;\n if (cellType !== 'body' || (define as TextColumnDefine)?.mergeCell) {\n // 只有表头或者column配置合并单元格后再进行信息获取\n range = table.getCellRange(col, row);\n isMerge = range.start.col !== range.end.col || range.start.row !== range.end.row;\n }\n\n let newCellGroup;\n if (isMerge && (col !== range.start.col || row !== range.start.row)) {\n // 合并单元格的非起始单元格不需要绘制\n newCellGroup = new Group({\n x: 0,\n y: oldCellGroup.attribute.y,\n width: 0,\n height: 0,\n visible: false,\n pickable: false\n });\n newCellGroup.role = 'shadow-cell';\n newCellGroup.col = col;\n newCellGroup.row = row;\n newCellGroup.mergeCol = range.start.col;\n newCellGroup.mergeRow = range.start.row;\n } else {\n const mayHaveIcon = cellType !== 'body' ? true : !!define?.icon;\n const headerStyle = table._getCellStyle(col, row);\n const cellTheme = getStyleTheme(headerStyle, table, col, row, getProp).theme;\n const padding = cellTheme._vtable.padding;\n const textAlign = cellTheme._vtable.textAlign;\n const textBaseline = cellTheme._vtable.textBaseline;\n\n let bgColorFunc: Function;\n // 判断是否有mapping 遍历dataset中mappingRules\n if ((table.internalProps as PivotTableProtected)?.dataConfig?.mappingRules && cellType === 'body') {\n (table.internalProps as PivotTableProtected)?.dataConfig?.mappingRules?.forEach(\n (mappingRule: MappingRule, i: number) => {\n if (mappingRule.bgColor) {\n bgColorFunc = mappingRule.bgColor.mapping;\n }\n }\n );\n }\n\n let customRender;\n let customLayout;\n if (cellType !== 'body') {\n customRender = define?.headerCustomRender;\n customLayout = define?.headerCustomLayout;\n } else {\n customRender = define?.customRender || table.customRender;\n customLayout = define?.customLayout;\n }\n\n let cellWidth;\n let cellHeight;\n if (range) {\n cellWidth = table.getColsWidth(range.start.col, range.end.col);\n cellHeight = table.getRowsHeight(range.start.row, range.end.row);\n } else {\n cellWidth = table.getColWidth(col);\n cellHeight = table.getRowHeight(row);\n }\n\n newCellGroup = createCell(\n type,\n define,\n table,\n col,\n row,\n table.getColWidth(col),\n bgColorFunc,\n customRender,\n customLayout,\n cellWidth,\n cellHeight,\n oldCellGroup.parent,\n oldCellGroup.attribute.y,\n padding,\n textAlign,\n textBaseline,\n mayHaveIcon,\n false,\n isMerge,\n range,\n cellTheme\n );\n }\n\n oldCellGroup.parent.insertAfter(newCellGroup, oldCellGroup);\n oldCellGroup.parent.removeChild(oldCellGroup);\n}\n"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Group } from '../../graphic/group';
|
|
2
|
+
import type { BaseTableAPI } from '../../../ts-types/base-table';
|
|
3
|
+
export declare function createChartCellGroup(cellGroup: Group | null, columnGroup: Group, xOrigin: number, yOrigin: number, col: number, row: number, width: number, height: number, padding: number[], dataValue: string, chartType: any, chartSpec: any, chartInstance: any, table: BaseTableAPI): Group;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
4
|
+
void 0 === k2 && (k2 = k);
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
desc && !("get" in desc ? !m.__esModule : desc.writable || desc.configurable) || (desc = {
|
|
7
|
+
enumerable: !0,
|
|
8
|
+
get: function() {
|
|
9
|
+
return m[k];
|
|
10
|
+
}
|
|
11
|
+
}), Object.defineProperty(o, k2, desc);
|
|
12
|
+
} : function(o, m, k, k2) {
|
|
13
|
+
void 0 === k2 && (k2 = k), o[k2] = m[k];
|
|
14
|
+
}), __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", {
|
|
16
|
+
enumerable: !0,
|
|
17
|
+
value: v
|
|
18
|
+
});
|
|
19
|
+
} : function(o, v) {
|
|
20
|
+
o.default = v;
|
|
21
|
+
}), __importStar = this && this.__importStar || function(mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (null != mod) for (var k in mod) "default" !== k && Object.prototype.hasOwnProperty.call(mod, k) && __createBinding(result, mod, k);
|
|
25
|
+
return __setModuleDefault(result, mod), result;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
Object.defineProperty(exports, "__esModule", {
|
|
29
|
+
value: !0
|
|
30
|
+
}), exports.createChartCellGroup = void 0;
|
|
31
|
+
|
|
32
|
+
const group_1 = require("../../graphic/group"), text_cell_1 = require("./text-cell"), chart_1 = require("../../graphic/chart"), registerChartTypes = __importStar(require("../../../chartType")), get_prop_1 = require("../../utils/get-prop"), util_1 = require("../../../tools/util");
|
|
33
|
+
|
|
34
|
+
function createChartCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, width, height, padding, dataValue, chartType, chartSpec, chartInstance, table) {
|
|
35
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
36
|
+
const ClassType = registerChartTypes.get()[chartType], cellTheme = (0, text_cell_1.getCellTheme)(table, col, row), headerStyle = table._getCellStyle(col, row), functionalPadding = (0,
|
|
37
|
+
get_prop_1.getFunctionalProp)("padding", headerStyle, col, row, table);
|
|
38
|
+
(0, util_1.isValid)(functionalPadding) && (padding = functionalPadding), cellGroup || ((cellGroup = new group_1.Group({
|
|
39
|
+
x: xOrigin,
|
|
40
|
+
y: yOrigin,
|
|
41
|
+
width: width,
|
|
42
|
+
height: height,
|
|
43
|
+
fill: !0,
|
|
44
|
+
stroke: !0,
|
|
45
|
+
lineWidth: null !== (_b = null === (_a = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _a ? void 0 : _a.lineWidth) && void 0 !== _b ? _b : void 0,
|
|
46
|
+
fillColor: null !== (_d = null === (_c = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _c ? void 0 : _c.fillColor) && void 0 !== _d ? _d : void 0,
|
|
47
|
+
strokeColor: null !== (_f = null === (_e = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _e ? void 0 : _e.strokeColor) && void 0 !== _f ? _f : void 0,
|
|
48
|
+
strokeArrayWidth: null !== (_h = null === (_g = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _g ? void 0 : _g.strokeArrayWidth) && void 0 !== _h ? _h : void 0,
|
|
49
|
+
strokeArrayColor: null !== (_k = null === (_j = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _j ? void 0 : _j.strokeArrayColor) && void 0 !== _k ? _k : void 0,
|
|
50
|
+
cursor: null !== (_m = null === (_l = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _l ? void 0 : _l.cursor) && void 0 !== _m ? _m : void 0,
|
|
51
|
+
lineCap: "square",
|
|
52
|
+
clip: !0
|
|
53
|
+
})).role = "cell", cellGroup.col = col, cellGroup.row = row, columnGroup.addChild(cellGroup)),
|
|
54
|
+
cellGroup.AABBBounds.width();
|
|
55
|
+
const chartGroup = new chart_1.Chart({
|
|
56
|
+
x: padding[3],
|
|
57
|
+
y: padding[0],
|
|
58
|
+
canvas: table.canvas,
|
|
59
|
+
spec: chartSpec,
|
|
60
|
+
ClassType: ClassType,
|
|
61
|
+
width: width - padding[3] - padding[1],
|
|
62
|
+
height: height - padding[2] - padding[0],
|
|
63
|
+
chartInstance: chartInstance,
|
|
64
|
+
dataId: "data",
|
|
65
|
+
data: table.getCellValue(col, row),
|
|
66
|
+
viewBox: {
|
|
67
|
+
x1: cellGroup.globalAABBBounds.x1 + table.tableX + padding[3],
|
|
68
|
+
x2: cellGroup.globalAABBBounds.x1 + width + table.tableX - padding[1],
|
|
69
|
+
y1: cellGroup.globalAABBBounds.y1 + table.tableY + padding[0],
|
|
70
|
+
y2: cellGroup.globalAABBBounds.y1 + height + table.tableY - padding[2]
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
return cellGroup.appendChild(chartGroup), columnGroup.setAttribute("chartInstance", chartGroup.chartInstance),
|
|
74
|
+
cellGroup;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
exports.createChartCellGroup = createChartCellGroup;
|
|
78
|
+
//# sourceMappingURL=chart-cell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["scenegraph/group-creater/cell-type/chart-cell.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA4C;AAC5C,2CAA2C;AAC3C,+CAA4C;AAC5C,uEAAyD;AACzD,mDAAyD;AACzD,8CAA8C;AAE9C,SAAgB,oBAAoB,CAClC,SAAuB,EACvB,WAAkB,EAClB,OAAe,EACf,OAAe,EACf,GAAW,EACX,GAAW,EACX,KAAa,EACb,MAAc,EACd,OAAiB,EACjB,SAAiB,EACjB,SAAc,EACd,SAAc,EACd,aAAkB,EAClB,KAAmB;;IAGnB,MAAM,cAAc,GAAG,kBAAkB,CAAC,GAAG,EAAE,CAAC;IAChD,MAAM,SAAS,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IAC5C,MAAM,SAAS,GAAG,IAAA,wBAAY,EAAC,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IAChD,MAAM,WAAW,GAAG,KAAK,CAAC,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAClD,MAAM,iBAAiB,GAAG,IAAA,4BAAiB,EAAC,SAAS,EAAE,WAAW,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;IACrF,IAAI,IAAA,cAAO,EAAC,iBAAiB,CAAC,EAAE;QAC9B,OAAO,GAAG,iBAAiB,CAAC;KAC7B;IAED,IAAI,CAAC,SAAS,EAAE;QACd,SAAS,GAAG,IAAI,aAAK,CAAC;YACpB,CAAC,EAAE,OAAO;Y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CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;QACtC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;QACxC,aAAa;QACb,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC;QAClC,OAAO,EAAE;YACP,EAAE,EAAE,SAAS,CAAC,gBAAgB,CAAC,EAAE,GAAI,KAAa,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;YACtE,EAAE,EAAE,SAAS,CAAC,gBAAgB,CAAC,EAAE,GAAG,KAAK,GAAI,KAAa,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;YAC9E,EAAE,EAAE,SAAS,CAAC,gBAAgB,CAAC,EAAE,GAAI,KAAa,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;YACtE,EAAE,EAAE,SAAS,CAAC,gBAAgB,CAAC,EAAE,GAAG,MAAM,GAAI,KAAa,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;SAChF;KAOF,CAAC,CAAC;IACH,SAAS,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAElC,WAAW,CAAC,YAAY,CAAC,eAAe,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC;IACpE,OAAO,SAAS,CAAC;AACnB,CAAC;AAnFD,oDAmFC","file":"chart-cell.js","sourcesContent":["import { Group } from '../../graphic/group';\nimport { getCellTheme } from './text-cell';\nimport { Chart } from '../../graphic/chart';\nimport * as registerChartTypes from '../../../chartType';\nimport { getFunctionalProp } from '../../utils/get-prop';\nimport { isValid } from '../../../tools/util';\nimport type { BaseTableAPI } from '../../../ts-types/base-table';\nexport function createChartCellGroup(\n cellGroup: Group | null,\n columnGroup: Group,\n xOrigin: number,\n yOrigin: number,\n col: number,\n row: number,\n width: number,\n height: number,\n padding: number[],\n dataValue: string,\n chartType: any,\n chartSpec: any,\n chartInstance: any,\n table: BaseTableAPI\n) {\n // 获取注册的chart图表类型\n const registerCharts = registerChartTypes.get();\n const ClassType = registerCharts[chartType];\n const cellTheme = getCellTheme(table, col, row);\n const headerStyle = table._getCellStyle(col, row); // to be fixed\n const functionalPadding = getFunctionalProp('padding', headerStyle, col, row, table);\n if (isValid(functionalPadding)) {\n padding = functionalPadding;\n }\n // cell\n if (!cellGroup) {\n cellGroup = new Group({\n x: xOrigin,\n y: yOrigin,\n width,\n height,\n\n // 背景相关,cell背景由cellGroup绘制\n fill: true,\n stroke: true,\n\n lineWidth: cellTheme?.group?.lineWidth ?? undefined,\n fillColor: cellTheme?.group?.fillColor ?? undefined,\n strokeColor: cellTheme?.group?.strokeColor ?? undefined,\n strokeArrayWidth: (cellTheme?.group as any)?.strokeArrayWidth ?? undefined,\n strokeArrayColor: (cellTheme?.group as any)?.strokeArrayColor ?? undefined,\n cursor: (cellTheme?.group as any)?.cursor ?? undefined,\n\n lineCap: 'square',\n\n clip: true\n } as any);\n cellGroup.role = 'cell';\n cellGroup.col = col;\n cellGroup.row = row;\n columnGroup.addChild(cellGroup);\n }\n cellGroup.AABBBounds.width(); // TODO 需要底层VRender修改\n // chart\n const chartGroup = new Chart({\n x: padding[3],\n y: padding[0],\n canvas: table.canvas,\n spec: chartSpec,\n ClassType,\n width: width - padding[3] - padding[1],\n height: height - padding[2] - padding[0],\n chartInstance,\n dataId: 'data',\n data: table.getCellValue(col, row),\n viewBox: {\n x1: cellGroup.globalAABBBounds.x1 + (table as any).tableX + padding[3],\n x2: cellGroup.globalAABBBounds.x1 + width + (table as any).tableX - padding[1],\n y1: cellGroup.globalAABBBounds.y1 + (table as any).tableY + padding[0],\n y2: cellGroup.globalAABBBounds.y1 + height + (table as any).tableY - padding[2]\n }\n // clipRect: {\n // left: cellGroup.globalAABBBounds.x1 + (table as any).tableX + padding[3],\n // top: cellGroup.globalAABBBounds.y1 + (table as any).tableY + padding[0],\n // width: width - padding[1] - padding[3], //cellGroup.globalAABBBounds.width() - padding[1] - padding[3],\n // height: height - padding[0] - padding[2],\n // },\n });\n cellGroup.appendChild(chartGroup);\n // 将生成的实例存到columnGroup中 已共享\n columnGroup.setAttribute('chartInstance', chartGroup.chartInstance);\n return cellGroup;\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IThemeSpec } from '@visactor/vrender';
|
|
2
|
+
import type { BaseTableAPI } from '../../../ts-types';
|
|
3
|
+
import { Group } from '../../graphic/group';
|
|
4
|
+
import type { Scenegraph } from '../../scenegraph';
|
|
5
|
+
export declare function createImageCellGroup(columnGroup: Group, xOrigin: number, yOrigin: number, col: number, row: number, width: number, height: number, keepAspectRatio: boolean, imageAutoSizing: boolean, padding: [number, number, number, number], textAlign: CanvasTextAlign, textBaseline: CanvasTextBaseline, table: BaseTableAPI, cellTheme?: IThemeSpec): Group;
|
|
6
|
+
export declare function _adjustWidthHeight(col: number, row: number, width: number, height: number, scene: Scenegraph, padding: [number, number, number, number]): boolean;
|
|
7
|
+
export declare function updateImageCellContentWhileResize(cellGroup: Group, col: number, row: number, table: BaseTableAPI): void;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
4
|
+
void 0 === k2 && (k2 = k);
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
desc && !("get" in desc ? !m.__esModule : desc.writable || desc.configurable) || (desc = {
|
|
7
|
+
enumerable: !0,
|
|
8
|
+
get: function() {
|
|
9
|
+
return m[k];
|
|
10
|
+
}
|
|
11
|
+
}), Object.defineProperty(o, k2, desc);
|
|
12
|
+
} : function(o, m, k, k2) {
|
|
13
|
+
void 0 === k2 && (k2 = k), o[k2] = m[k];
|
|
14
|
+
}), __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", {
|
|
16
|
+
enumerable: !0,
|
|
17
|
+
value: v
|
|
18
|
+
});
|
|
19
|
+
} : function(o, v) {
|
|
20
|
+
o.default = v;
|
|
21
|
+
}), __importStar = this && this.__importStar || function(mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (null != mod) for (var k in mod) "default" !== k && Object.prototype.hasOwnProperty.call(mod, k) && __createBinding(result, mod, k);
|
|
25
|
+
return __setModuleDefault(result, mod), result;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
Object.defineProperty(exports, "__esModule", {
|
|
29
|
+
value: !0
|
|
30
|
+
}), exports.updateImageCellContentWhileResize = exports._adjustWidthHeight = exports.createImageCellGroup = void 0;
|
|
31
|
+
|
|
32
|
+
const vrender_1 = require("@visactor/vrender"), icons = __importStar(require("../../../icons")), group_1 = require("../../graphic/group"), keep_aspect_ratio_1 = require("../../utils/keep-aspect-ratio"), cell_pos_1 = require("../../utils/cell-pos"), get_prop_1 = require("../../utils/get-prop"), text_cell_1 = require("./text-cell"), util_1 = require("../../../tools/util"), padding_1 = require("../../utils/padding"), regedIcons = icons.get();
|
|
33
|
+
|
|
34
|
+
function createImageCellGroup(columnGroup, xOrigin, yOrigin, col, row, width, height, keepAspectRatio, imageAutoSizing, padding, textAlign, textBaseline, table, cellTheme) {
|
|
35
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
36
|
+
cellTheme = (0, text_cell_1.getCellTheme)(table, col, row, cellTheme);
|
|
37
|
+
const headerStyle = table._getCellStyle(col, row), functionalPadding = (0, get_prop_1.getFunctionalProp)("padding", headerStyle, col, row, table);
|
|
38
|
+
(0, util_1.isValid)(functionalPadding) && (padding = functionalPadding), (null === (_a = null == cellTheme ? void 0 : cellTheme.text) || void 0 === _a ? void 0 : _a.textAlign) && (textAlign = null === (_b = null == cellTheme ? void 0 : cellTheme.text) || void 0 === _b ? void 0 : _b.textAlign),
|
|
39
|
+
(null === (_c = null == cellTheme ? void 0 : cellTheme.text) || void 0 === _c ? void 0 : _c.textBaseline) && (textBaseline = null === (_d = null == cellTheme ? void 0 : cellTheme.text) || void 0 === _d ? void 0 : _d.textBaseline);
|
|
40
|
+
const cellGroup = new group_1.Group({
|
|
41
|
+
x: xOrigin,
|
|
42
|
+
y: yOrigin,
|
|
43
|
+
width: width,
|
|
44
|
+
height: height,
|
|
45
|
+
fill: !0,
|
|
46
|
+
stroke: !0,
|
|
47
|
+
lineWidth: null !== (_f = null === (_e = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _e ? void 0 : _e.lineWidth) && void 0 !== _f ? _f : void 0,
|
|
48
|
+
fillColor: null !== (_h = null === (_g = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _g ? void 0 : _g.fillColor) && void 0 !== _h ? _h : void 0,
|
|
49
|
+
strokeColor: null !== (_k = null === (_j = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _j ? void 0 : _j.strokeColor) && void 0 !== _k ? _k : void 0,
|
|
50
|
+
strokeArrayWidth: null !== (_m = null === (_l = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _l ? void 0 : _l.strokeArrayWidth) && void 0 !== _m ? _m : void 0,
|
|
51
|
+
strokeArrayColor: null !== (_p = null === (_o = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _o ? void 0 : _o.strokeArrayColor) && void 0 !== _p ? _p : void 0,
|
|
52
|
+
cursor: null !== (_r = null === (_q = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _q ? void 0 : _q.cursor) && void 0 !== _r ? _r : void 0,
|
|
53
|
+
lineCap: "square",
|
|
54
|
+
clip: !0
|
|
55
|
+
});
|
|
56
|
+
cellGroup.role = "cell", cellGroup.col = col, cellGroup.row = row, columnGroup.addChild(cellGroup);
|
|
57
|
+
const value = table.getCellValue(col, row), image = (0, vrender_1.createImage)({
|
|
58
|
+
x: padding[3],
|
|
59
|
+
y: padding[0],
|
|
60
|
+
width: width - padding[1] - padding[3],
|
|
61
|
+
height: height - padding[0] - padding[2],
|
|
62
|
+
image: null != value ? value : regedIcons.damage_pic.svg,
|
|
63
|
+
cursor: "pointer"
|
|
64
|
+
});
|
|
65
|
+
return image.name = "image", image.keepAspectRatio = keepAspectRatio, image.successCallback = keepAspectRatio || imageAutoSizing ? () => {
|
|
66
|
+
const originImage = image.resources.get(image.attribute.image).data;
|
|
67
|
+
if (imageAutoSizing && _adjustWidthHeight(col, row, originImage.width, originImage.height, table.scenegraph, padding),
|
|
68
|
+
keepAspectRatio) {
|
|
69
|
+
const {width: imageWidth, height: imageHeight} = (0, keep_aspect_ratio_1.calcKeepAspectRatioSize)(originImage.width, originImage.height, cellGroup.attribute.width - padding[1] - padding[3], cellGroup.attribute.height - padding[0] - padding[2]), pos = (0,
|
|
70
|
+
cell_pos_1.calcStartPosition)(0, 0, cellGroup.attribute.width, cellGroup.attribute.height, imageWidth, imageHeight, textAlign, textBaseline, padding);
|
|
71
|
+
image.setAttributes({
|
|
72
|
+
x: pos.x,
|
|
73
|
+
y: pos.y,
|
|
74
|
+
width: imageWidth,
|
|
75
|
+
height: imageHeight
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
table.scenegraph.updateNextFrame();
|
|
79
|
+
} : () => {
|
|
80
|
+
updateImageCellContentWhileResize(cellGroup, col, row, table);
|
|
81
|
+
}, image.failCallback = () => {
|
|
82
|
+
const regedIcons = icons.get();
|
|
83
|
+
image.image = regedIcons.damage_pic.svg;
|
|
84
|
+
}, cellGroup.appendChild(image), cellGroup;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function _adjustWidthHeight(col, row, width, height, scene, padding) {
|
|
88
|
+
let needInvalidate = !1, targetWidth = null, targetHeight = null;
|
|
89
|
+
return scene.table.getColWidth(col) < width + padding[1] + padding[3] && (targetWidth = width + padding[1] + padding[3],
|
|
90
|
+
needInvalidate = !0), scene.table.getRowHeight(row) < height + padding[2] + padding[0] && (targetHeight = height + padding[2] + padding[0],
|
|
91
|
+
needInvalidate = !0), !!needInvalidate && ("number" == typeof targetWidth && scene.setColWidth(col, targetWidth),
|
|
92
|
+
"number" == typeof targetHeight && scene.setRowHeight(row, targetHeight), scene.component.updateScrollBar(),
|
|
93
|
+
!0);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function updateImageCellContentWhileResize(cellGroup, col, row, table) {
|
|
97
|
+
var _a, _b, _c;
|
|
98
|
+
const image = cellGroup.getChildByName("image"), originImage = "string" != typeof image.attribute.image && image.attribute.image || image.resources.get(image.attribute.image).data;
|
|
99
|
+
if (!originImage) return;
|
|
100
|
+
const headerStyle = table._getCellStyle(col, row), textAlign = null !== (_a = (0,
|
|
101
|
+
get_prop_1.getProp)("textAlign", headerStyle, col, row, table)) && void 0 !== _a ? _a : "left", textBaseline = null !== (_b = (0,
|
|
102
|
+
get_prop_1.getProp)("textBaseline", headerStyle, col, row, table)) && void 0 !== _b ? _b : "middle", padding = null !== (_c = (0,
|
|
103
|
+
padding_1.getPadding)((0, get_prop_1.getProp)("padding", headerStyle, col, row, table))) && void 0 !== _c ? _c : [ 0, 0, 0, 0 ];
|
|
104
|
+
if (image.keepAspectRatio) {
|
|
105
|
+
const {width: imageWidth, height: imageHeight} = (0, keep_aspect_ratio_1.calcKeepAspectRatioSize)(originImage.width || originImage.videoWidth, originImage.height || originImage.videoHeight, cellGroup.attribute.width - (padding[1] + padding[3]), cellGroup.attribute.height - (padding[0] + padding[2])), pos = (0,
|
|
106
|
+
cell_pos_1.calcStartPosition)(0, 0, cellGroup.attribute.width, cellGroup.attribute.height, imageWidth, imageHeight, textAlign, textBaseline, padding);
|
|
107
|
+
image.setAttributes({
|
|
108
|
+
x: pos.x,
|
|
109
|
+
y: pos.y,
|
|
110
|
+
width: imageWidth,
|
|
111
|
+
height: imageHeight
|
|
112
|
+
});
|
|
113
|
+
} else image.setAttributes({
|
|
114
|
+
x: padding[3],
|
|
115
|
+
y: padding[0],
|
|
116
|
+
width: cellGroup.attribute.width - padding[1] - padding[3],
|
|
117
|
+
height: cellGroup.attribute.height - padding[0] - padding[2]
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
exports.createImageCellGroup = createImageCellGroup, exports._adjustWidthHeight = _adjustWidthHeight,
|
|
122
|
+
exports.updateImageCellContentWhileResize = updateImageCellContentWhileResize;
|
|
123
|
+
//# sourceMappingURL=image-cell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["scenegraph/group-creater/cell-type/image-cell.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,+CAAgD;AAEhD,sDAAwC;AACxC,+CAA4C;AAC5C,qEAAwE;AACxE,mDAAyD;AAEzD,mDAAkE;AAClE,2CAA2C;AAC3C,8CAA8C;AAC9C,iDAAiD;AAEjD,MAAM,UAAU,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC;AAE/B,SAAgB,oBAAoB,CAClC,WAAkB,EAClB,OAAe,EACf,OAAe,EACf,GAAW,EACX,GAAW,EACX,KAAa,EACb,MAAc,EACd,eAAwB,EACxB,eAAwB,EACxB,OAAyC,EACzC,SAA0B,EAC1B,YAAgC,EAChC,KAAmB,EACnB,SAAsB;;IAEtB,SAAS,GAAG,IAAA,wBAAY,EAAC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;IACrD,MAAM,WAAW,GAAG,KAAK,CAAC,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAClD,MAAM,iBAAiB,GAAG,IAAA,4BAAiB,EAAC,SAAS,EAAE,WAAW,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;IAErF,IAAI,IAAA,cAAO,EAAC,iBAAiB,CAAC,EAAE;QAC9B,OAAO,GAAG,iBAAiB,CAAC;KAC7B;IACD,IAAI,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,IAAI,0CAAE,SAAS,EAAE;QAC9B,SAAS,GAAG,MAAA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C,aAAa,CAAC;YAClB,CAAC,EAAE,GAAG,CAAC,CAAC;YACR,CAAC,EAAE,GAAG,CAAC,CAAC;YACR,KAAK,EAAE,UAAU;YACjB,MAAM,EAAE,WAAW;SACpB,CAAC,CAAC;KACJ;SAAM;QACL,KAAK,CAAC,aAAa,CAAC;YAClB,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;YACb,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;YACb,KAAK,EAAE,SAAS,CAAC,SAAS,CAAC,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;YAC1D,MAAM,EAAE,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;SAC7D,CAAC,CAAC;KACJ;AACH,CAAC;AAjDD,8EAiDC","file":"image-cell.js","sourcesContent":["// @ts-nocheck\n/* eslint-disable no-undef */\nimport type { IImage, Image, IThemeSpec } from '@visactor/vrender';\nimport { createImage } from '@visactor/vrender';\nimport type { BaseTableAPI } from '../../../ts-types';\nimport * as icons from '../../../icons';\nimport { Group } from '../../graphic/group';\nimport { calcKeepAspectRatioSize } from '../../utils/keep-aspect-ratio';\nimport { calcStartPosition } from '../../utils/cell-pos';\nimport type { Scenegraph } from '../../scenegraph';\nimport { getProp, getFunctionalProp } from '../../utils/get-prop';\nimport { getCellTheme } from './text-cell';\nimport { isValid } from '../../../tools/util';\nimport { getPadding } from '../../utils/padding';\n\nconst regedIcons = icons.get();\n\nexport function createImageCellGroup(\n columnGroup: Group,\n xOrigin: number,\n yOrigin: number,\n col: number,\n row: number,\n width: number,\n height: number,\n keepAspectRatio: boolean,\n imageAutoSizing: boolean,\n padding: [number, number, number, number],\n textAlign: CanvasTextAlign,\n textBaseline: CanvasTextBaseline,\n table: BaseTableAPI,\n cellTheme?: IThemeSpec\n) {\n cellTheme = getCellTheme(table, col, row, cellTheme);\n const headerStyle = table._getCellStyle(col, row); // to be fixed\n const functionalPadding = getFunctionalProp('padding', headerStyle, col, row, table);\n // const margin = getProp('padding', headerStyle, col, row, table);\n if (isValid(functionalPadding)) {\n padding = functionalPadding;\n }\n if (cellTheme?.text?.textAlign) {\n textAlign = cellTheme?.text?.textAlign;\n }\n if (cellTheme?.text?.textBaseline) {\n textBaseline = cellTheme?.text?.textBaseline;\n }\n\n // cell\n const cellGroup = new Group({\n x: xOrigin,\n y: yOrigin,\n width,\n height,\n // childrenPickable: false,\n\n // 背景相关,cell背景由cellGroup绘制\n fill: true,\n stroke: true,\n\n lineWidth: cellTheme?.group?.lineWidth ?? undefined,\n fillColor: cellTheme?.group?.fillColor ?? undefined,\n strokeColor: cellTheme?.group?.strokeColor ?? undefined,\n strokeArrayWidth: (cellTheme?.group as any)?.strokeArrayWidth ?? undefined,\n strokeArrayColor: (cellTheme?.group as any)?.strokeArrayColor ?? undefined,\n cursor: (cellTheme?.group as any)?.cursor ?? undefined,\n\n lineCap: 'square',\n\n clip: true\n });\n cellGroup.role = 'cell';\n cellGroup.col = col;\n cellGroup.row = row;\n columnGroup.addChild(cellGroup);\n\n // image\n const value = table.getCellValue(col, row);\n const image: IImage = createImage({\n x: padding[3],\n y: padding[0],\n width: width - padding[1] - padding[3],\n height: height - padding[0] - padding[2],\n image: value ?? (regedIcons.damage_pic as any).svg,\n cursor: 'pointer' as Cursor\n });\n image.name = 'image';\n image.keepAspectRatio = keepAspectRatio;\n if (keepAspectRatio || imageAutoSizing) {\n image.successCallback = () => {\n const originImage = image.resources.get(image.attribute.image).data;\n\n if (imageAutoSizing) {\n _adjustWidthHeight(\n col,\n row,\n (originImage as HTMLImageElement).width,\n (originImage as HTMLImageElement).height,\n table.scenegraph,\n padding\n );\n }\n\n if (keepAspectRatio) {\n const { width: imageWidth, height: imageHeight } = calcKeepAspectRatioSize(\n originImage.width,\n originImage.height,\n cellGroup.attribute.width - padding[1] - padding[3],\n cellGroup.attribute.height - padding[0] - padding[2]\n );\n\n // const left = 0;\n // const top = 0;\n const pos = calcStartPosition(\n 0,\n 0,\n cellGroup.attribute.width,\n cellGroup.attribute.height,\n imageWidth,\n imageHeight,\n textAlign,\n textBaseline,\n padding\n );\n\n image.setAttributes({\n x: pos.x,\n y: pos.y,\n width: imageWidth,\n height: imageHeight\n });\n }\n\n table.scenegraph.updateNextFrame();\n };\n } else {\n image.successCallback = () => {\n updateImageCellContentWhileResize(cellGroup, col, row, table);\n };\n }\n (image as any).failCallback = () => {\n const regedIcons = icons.get();\n // image.setAttribute('image', (regedIcons.damage_pic as any).svg);\n (image as any).image = (regedIcons.damage_pic as any).svg;\n };\n cellGroup.appendChild(image);\n\n return cellGroup;\n}\n\n/**\n * 调整某个图片资源所在行列的行高列宽 之后重绘\n * @param col\n * @param row\n * @param img\n * @param table\n * @returns 行高或者列宽是否进行了调整\n */\nexport function _adjustWidthHeight(\n col: number,\n row: number,\n // img: HTMLImageElement,\n width: number,\n height: number,\n scene: Scenegraph,\n padding: [number, number, number, number]\n): boolean {\n // const { width, height } = img as any;\n // const currentContext = context.toCurrentContext();\n\n let needInvalidate = false;\n let targetWidth: number = null;\n let targetHeight: number = null;\n if (scene.table.getColWidth(col) < width + padding[1] + padding[3]) {\n targetWidth = width + padding[1] + padding[3];\n needInvalidate = true;\n }\n if (scene.table.getRowHeight(row) < height + padding[2] + padding[0]) {\n targetHeight = height + padding[2] + padding[0];\n needInvalidate = true;\n }\n if (needInvalidate) {\n if (typeof targetWidth === 'number') {\n // table.setColWidth(col, targetWidth, true);\n scene.setColWidth(col, targetWidth);\n }\n if (typeof targetHeight === 'number') {\n // table.setRowHeight(row, targetHeight, true);\n scene.setRowHeight(row, targetHeight);\n }\n // table.updateCanvasScroll();\n // // table.throttleInvalidate(); // 这里会造成每一张图加载后就重绘 造成多次绘制问题!节流绘制\n // table.invalidate(); //节流绘制改回及时绘制 节流绘制在图片加载过程中的效果不太好\n\n scene.component.updateScrollBar();\n // scene.updateNextFrame();\n return true;\n }\n return false;\n}\n\nexport function updateImageCellContentWhileResize(cellGroup: Group, col: number, row: number, table: BaseTableAPI) {\n const image = cellGroup.getChildByName('image') as Image;\n const originImage =\n (typeof image.attribute.image !== 'string' && image.attribute.image) ||\n image.resources.get(image.attribute.image).data;\n\n if (!originImage) {\n return;\n }\n\n const headerStyle = table._getCellStyle(col, row); // to be fixed\n const textAlign = getProp('textAlign', headerStyle, col, row, table) ?? 'left';\n const textBaseline = getProp('textBaseline', headerStyle, col, row, table) ?? 'middle';\n const padding = getPadding(getProp('padding', headerStyle, col, row, table)) ?? [0, 0, 0, 0];\n\n if (image.keepAspectRatio) {\n const { width: imageWidth, height: imageHeight } = calcKeepAspectRatioSize(\n originImage.width || originImage.videoWidth,\n originImage.height || originImage.videoHeight,\n cellGroup.attribute.width - (padding[1] + padding[3]),\n cellGroup.attribute.height - (padding[0] + padding[2])\n );\n\n const pos = calcStartPosition(\n 0,\n 0,\n cellGroup.attribute.width,\n cellGroup.attribute.height,\n imageWidth,\n imageHeight,\n textAlign,\n textBaseline,\n padding\n );\n\n image.setAttributes({\n x: pos.x,\n y: pos.y,\n width: imageWidth,\n height: imageHeight\n });\n } else {\n image.setAttributes({\n x: padding[3],\n y: padding[0],\n width: cellGroup.attribute.width - padding[1] - padding[3],\n height: cellGroup.attribute.height - padding[0] - padding[2]\n });\n }\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ProgressBarStyle } from '../../../body-helper/style/ProgressBarStyle';
|
|
2
|
+
import { Group } from '../../graphic/group';
|
|
3
|
+
import type { BaseTableAPI } from '../../../ts-types/base-table';
|
|
4
|
+
export declare function createProgressBarCell(progressBarDefine: {
|
|
5
|
+
min?: number;
|
|
6
|
+
max?: number;
|
|
7
|
+
barType?: 'default' | 'negative' | 'negative_no_axis';
|
|
8
|
+
dependField?: string;
|
|
9
|
+
}, style: ProgressBarStyle, width: number, value: string, dataValue: string, col: number, row: number, padding: [number, number, number, number], table: BaseTableAPI): Group;
|