@visactor/vtable 0.13.4 → 0.14.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/cjs/PivotTable.d.ts +2 -1
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/body-helper/style/CheckboxStyle.d.ts +8 -2
- package/cjs/body-helper/style/CheckboxStyle.js +17 -3
- package/cjs/body-helper/style/CheckboxStyle.js.map +1 -1
- package/cjs/components/axis/get-axis-attributes.d.ts +7 -0
- package/cjs/components/axis/get-axis-attributes.js +13 -17
- package/cjs/components/axis/get-axis-attributes.js.map +1 -1
- package/cjs/components/legend/continue-legend/continue-legend.js +1 -0
- package/cjs/components/legend/continue-legend/continue-legend.js.map +1 -1
- package/cjs/components/legend/discrete-legend/discrete-legend.js +1 -0
- package/cjs/components/legend/discrete-legend/discrete-legend.js.map +1 -1
- package/cjs/components/title/title.js +7 -6
- package/cjs/components/title/title.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +1 -0
- package/cjs/core/BaseTable.js +28 -2
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/dataset/dataset.d.ts +0 -1
- package/cjs/dataset/dataset.js +3 -43
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/header-helper/header-helper.d.ts +2 -1
- package/cjs/header-helper/style/CheckboxStyle.d.ts +8 -2
- package/cjs/header-helper/style/CheckboxStyle.js +15 -1
- package/cjs/header-helper/style/CheckboxStyle.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/layout/chart-helper/get-axis-config.js +71 -35
- package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
- package/cjs/layout/chart-helper/get-axis-domain.d.ts +1 -1
- package/cjs/layout/chart-helper/get-axis-domain.js +18 -8
- package/cjs/layout/chart-helper/get-axis-domain.js.map +1 -1
- package/cjs/layout/chart-helper/get-chart-spec.js +33 -17
- package/cjs/layout/chart-helper/get-chart-spec.js.map +1 -1
- package/cjs/layout/chart-helper/zero-align.js.map +1 -0
- package/cjs/layout/pivot-header-layout.js +20 -11
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/simple-header-layout.js +2 -1
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/cjs/render/layout/arc.d.ts +10 -21
- package/cjs/render/layout/arc.js +7 -9
- package/cjs/render/layout/arc.js.map +1 -1
- package/cjs/render/layout/circle.d.ts +10 -17
- package/cjs/render/layout/circle.js +5 -6
- package/cjs/render/layout/circle.js.map +1 -1
- package/cjs/render/layout/container.d.ts +10 -48
- package/cjs/render/layout/container.js +15 -100
- package/cjs/render/layout/container.js.map +1 -1
- package/cjs/render/layout/group-element.d.ts +4 -24
- package/cjs/render/layout/group-element.js +4 -40
- package/cjs/render/layout/group-element.js.map +1 -1
- package/cjs/render/layout/group.d.ts +12 -0
- package/cjs/render/layout/group.js +18 -0
- package/cjs/render/layout/group.js.map +1 -0
- package/cjs/render/layout/icon.d.ts +10 -10
- package/cjs/render/layout/icon.js +11 -9
- package/cjs/render/layout/icon.js.map +1 -1
- package/cjs/render/layout/image.d.ts +10 -17
- package/cjs/render/layout/image.js +6 -7
- package/cjs/render/layout/image.js.map +1 -1
- package/cjs/render/layout/index.d.ts +2 -0
- package/cjs/render/layout/index.js +2 -1
- package/cjs/render/layout/index.js.map +1 -1
- package/cjs/render/layout/percent-calc.d.ts +1 -4
- package/cjs/render/layout/percent-calc.js.map +1 -1
- package/cjs/render/layout/rect.d.ts +10 -20
- package/cjs/render/layout/rect.js +5 -6
- package/cjs/render/layout/rect.js.map +1 -1
- package/cjs/render/layout/tag.d.ts +14 -0
- package/cjs/render/layout/tag.js +21 -0
- package/cjs/render/layout/tag.js.map +1 -0
- package/cjs/render/layout/text.d.ts +9 -46
- package/cjs/render/layout/text.js +8 -18
- package/cjs/render/layout/text.js.map +1 -1
- package/cjs/scenegraph/component/custom.d.ts +2 -2
- package/cjs/scenegraph/component/custom.js +14 -6
- package/cjs/scenegraph/component/custom.js.map +1 -1
- package/cjs/scenegraph/graphic/group.d.ts +6 -2
- package/cjs/scenegraph/graphic/group.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.d.ts +3 -3
- package/cjs/scenegraph/group-creater/cell-helper.js +40 -40
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +2 -2
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js +22 -3
- package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/text-cell.d.ts +2 -2
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js +2 -2
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/column-helper.d.ts +3 -2
- package/cjs/scenegraph/group-creater/column-helper.js +78 -46
- package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.js +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +2 -3
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +4 -5
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/cjs/scenegraph/icon/icon-update.d.ts +17 -0
- package/cjs/scenegraph/icon/icon-update.js +165 -0
- package/cjs/scenegraph/icon/icon-update.js.map +1 -0
- package/cjs/scenegraph/layout/compute-col-width.js +22 -15
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js +49 -15
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
- package/cjs/scenegraph/layout/move-cell.js +8 -27
- package/cjs/scenegraph/layout/move-cell.js.map +1 -1
- package/cjs/scenegraph/layout/update-height.js +39 -29
- package/cjs/scenegraph/layout/update-height.js.map +1 -1
- package/cjs/scenegraph/layout/update-row.js +6 -2
- package/cjs/scenegraph/layout/update-row.js.map +1 -1
- package/cjs/scenegraph/layout/update-width.js +43 -29
- package/cjs/scenegraph/layout/update-width.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +7 -13
- package/cjs/scenegraph/scenegraph.js +25 -141
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/stick-text/index.js +77 -38
- package/cjs/scenegraph/stick-text/index.js.map +1 -1
- package/cjs/scenegraph/utils/is-merge-cell-group.d.ts +2 -0
- package/cjs/scenegraph/utils/is-merge-cell-group.js +16 -0
- package/cjs/scenegraph/utils/is-merge-cell-group.js.map +1 -0
- package/cjs/scenegraph/utils/text-icon-layout.d.ts +1 -1
- package/cjs/scenegraph/utils/text-icon-layout.js +11 -5
- package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/cjs/state/cell-move/index.js +14 -12
- package/cjs/state/cell-move/index.js.map +1 -1
- package/cjs/state/hover/is-cell-hover.js +4 -2
- package/cjs/state/hover/is-cell-hover.js.map +1 -1
- package/cjs/state/hover/update-cell.js +10 -5
- package/cjs/state/hover/update-cell.js.map +1 -1
- package/cjs/state/state.js +1 -1
- package/cjs/state/state.js.map +1 -1
- package/cjs/themes/BRIGHT.js +2 -1
- package/cjs/themes/DARK.js +1 -2
- package/cjs/tools/calc.js +1 -1
- package/cjs/tools/util.js +1 -1
- package/cjs/tools/util.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +9 -1
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/column/style.d.ts +4 -1
- package/cjs/ts-types/column/style.js.map +1 -1
- package/cjs/ts-types/common.d.ts +2 -0
- package/cjs/ts-types/common.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +13 -0
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/dist/vtable.js +22152 -11275
- package/dist/vtable.min.js +2 -2
- package/es/PivotTable.d.ts +2 -1
- package/es/PivotTable.js.map +1 -1
- package/es/body-helper/style/CheckboxStyle.d.ts +8 -2
- package/es/body-helper/style/CheckboxStyle.js +17 -3
- package/es/body-helper/style/CheckboxStyle.js.map +1 -1
- package/es/components/axis/get-axis-attributes.d.ts +7 -0
- package/es/components/axis/get-axis-attributes.js +1 -1
- package/es/components/axis/get-axis-attributes.js.map +1 -1
- package/es/components/legend/continue-legend/continue-legend.js +1 -0
- package/es/components/legend/continue-legend/continue-legend.js.map +1 -1
- package/es/components/legend/discrete-legend/discrete-legend.js +1 -0
- package/es/components/legend/discrete-legend/discrete-legend.js.map +1 -1
- package/es/components/title/title.js +6 -6
- package/es/components/title/title.js.map +1 -1
- package/es/core/BaseTable.d.ts +1 -0
- package/es/core/BaseTable.js +28 -2
- package/es/core/BaseTable.js.map +1 -1
- package/es/dataset/dataset.d.ts +0 -1
- package/es/dataset/dataset.js +2 -46
- package/es/dataset/dataset.js.map +1 -1
- package/es/header-helper/header-helper.d.ts +2 -1
- package/es/header-helper/style/CheckboxStyle.d.ts +8 -2
- package/es/header-helper/style/CheckboxStyle.js +15 -1
- package/es/header-helper/style/CheckboxStyle.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/layout/chart-helper/get-axis-config.js +72 -33
- package/es/layout/chart-helper/get-axis-config.js.map +1 -1
- package/es/layout/chart-helper/get-axis-domain.d.ts +1 -1
- package/es/layout/chart-helper/get-axis-domain.js +20 -8
- package/es/layout/chart-helper/get-axis-domain.js.map +1 -1
- package/es/layout/chart-helper/get-chart-spec.js +33 -12
- package/es/layout/chart-helper/get-chart-spec.js.map +1 -1
- package/es/layout/chart-helper/zero-align.js.map +1 -0
- package/es/layout/pivot-header-layout.js +20 -11
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/simple-header-layout.js +2 -1
- package/es/layout/simple-header-layout.js.map +1 -1
- package/es/render/layout/arc.d.ts +10 -21
- package/es/render/layout/arc.js +7 -7
- package/es/render/layout/arc.js.map +1 -1
- package/es/render/layout/circle.d.ts +10 -17
- package/es/render/layout/circle.js +7 -6
- package/es/render/layout/circle.js.map +1 -1
- package/es/render/layout/container.d.ts +10 -48
- package/es/render/layout/container.js +16 -107
- package/es/render/layout/container.js.map +1 -1
- package/es/render/layout/group-element.d.ts +4 -24
- package/es/render/layout/group-element.js +4 -42
- package/es/render/layout/group-element.js.map +1 -1
- package/es/render/layout/group.d.ts +12 -0
- package/es/render/layout/group.js +12 -0
- package/es/render/layout/group.js.map +1 -0
- package/es/render/layout/icon.d.ts +10 -10
- package/es/render/layout/icon.js +12 -10
- package/es/render/layout/icon.js.map +1 -1
- package/es/render/layout/image.d.ts +10 -17
- package/es/render/layout/image.js +8 -7
- package/es/render/layout/image.js.map +1 -1
- package/es/render/layout/index.d.ts +2 -0
- package/es/render/layout/index.js +4 -0
- package/es/render/layout/index.js.map +1 -1
- package/es/render/layout/percent-calc.d.ts +1 -4
- package/es/render/layout/percent-calc.js.map +1 -1
- package/es/render/layout/rect.d.ts +10 -20
- package/es/render/layout/rect.js +7 -6
- package/es/render/layout/rect.js.map +1 -1
- package/es/render/layout/tag.d.ts +14 -0
- package/es/render/layout/tag.js +15 -0
- package/es/render/layout/tag.js.map +1 -0
- package/es/render/layout/text.d.ts +9 -46
- package/es/render/layout/text.js +10 -18
- package/es/render/layout/text.js.map +1 -1
- package/es/scenegraph/component/custom.d.ts +2 -2
- package/es/scenegraph/component/custom.js +15 -7
- package/es/scenegraph/component/custom.js.map +1 -1
- package/es/scenegraph/graphic/group.d.ts +6 -2
- package/es/scenegraph/graphic/group.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.d.ts +3 -3
- package/es/scenegraph/group-creater/cell-helper.js +41 -40
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.js +2 -2
- package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/checkbox-cell.js +22 -2
- package/es/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/text-cell.d.ts +2 -2
- package/es/scenegraph/group-creater/cell-type/text-cell.js +2 -2
- package/es/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/es/scenegraph/group-creater/column-helper.d.ts +3 -2
- package/es/scenegraph/group-creater/column-helper.js +75 -44
- package/es/scenegraph/group-creater/column-helper.js.map +1 -1
- package/es/scenegraph/group-creater/progress/proxy.js +1 -1
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +3 -4
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +3 -6
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/es/scenegraph/icon/icon-update.d.ts +17 -0
- package/es/scenegraph/icon/icon-update.js +154 -0
- package/es/scenegraph/icon/icon-update.js.map +1 -0
- package/es/scenegraph/layout/compute-col-width.js +23 -14
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.js +51 -15
- package/es/scenegraph/layout/compute-row-height.js.map +1 -1
- package/es/scenegraph/layout/move-cell.js +8 -27
- package/es/scenegraph/layout/move-cell.js.map +1 -1
- package/es/scenegraph/layout/update-height.js +41 -27
- package/es/scenegraph/layout/update-height.js.map +1 -1
- package/es/scenegraph/layout/update-row.js +6 -1
- package/es/scenegraph/layout/update-row.js.map +1 -1
- package/es/scenegraph/layout/update-width.js +45 -27
- package/es/scenegraph/layout/update-width.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +7 -13
- package/es/scenegraph/scenegraph.js +25 -142
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/stick-text/index.js +75 -38
- package/es/scenegraph/stick-text/index.js.map +1 -1
- package/es/scenegraph/utils/is-merge-cell-group.d.ts +2 -0
- package/es/scenegraph/utils/is-merge-cell-group.js +6 -0
- package/es/scenegraph/utils/is-merge-cell-group.js.map +1 -0
- package/es/scenegraph/utils/text-icon-layout.d.ts +1 -1
- package/es/scenegraph/utils/text-icon-layout.js +11 -5
- package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/es/state/cell-move/index.js +14 -12
- package/es/state/cell-move/index.js.map +1 -1
- package/es/state/hover/is-cell-hover.js +3 -1
- package/es/state/hover/is-cell-hover.js.map +1 -1
- package/es/state/hover/update-cell.js +4 -2
- package/es/state/hover/update-cell.js.map +1 -1
- package/es/state/state.js +1 -1
- package/es/state/state.js.map +1 -1
- package/es/themes/BRIGHT.js +2 -1
- package/es/themes/DARK.js +1 -2
- package/es/tools/calc.js +1 -1
- package/es/tools/util.js +1 -1
- package/es/tools/util.js.map +1 -1
- package/es/ts-types/base-table.d.ts +9 -1
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/column/style.d.ts +4 -1
- package/es/ts-types/column/style.js.map +1 -1
- package/es/ts-types/common.d.ts +2 -0
- package/es/ts-types/common.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +13 -0
- package/es/ts-types/table-engine.js.map +1 -1
- package/package.json +3 -3
- package/cjs/dataset/util/zero-align.js.map +0 -1
- package/cjs/scenegraph/header-icon/layout.d.ts +0 -3
- package/cjs/scenegraph/header-icon/layout.js +0 -75
- package/cjs/scenegraph/header-icon/layout.js.map +0 -1
- package/cjs/scenegraph/hover-state.d.ts +0 -14
- package/cjs/scenegraph/hover-state.js +0 -27
- package/cjs/scenegraph/hover-state.js.map +0 -1
- package/es/dataset/util/zero-align.js.map +0 -1
- package/es/scenegraph/header-icon/layout.d.ts +0 -3
- package/es/scenegraph/header-icon/layout.js +0 -69
- package/es/scenegraph/header-icon/layout.js.map +0 -1
- package/es/scenegraph/hover-state.d.ts +0 -14
- package/es/scenegraph/hover-state.js +0 -19
- package/es/scenegraph/hover-state.js.map +0 -1
- /package/cjs/{dataset/util → layout/chart-helper}/zero-align.d.ts +0 -0
- /package/cjs/{dataset/util → layout/chart-helper}/zero-align.js +0 -0
- /package/es/{dataset/util → layout/chart-helper}/zero-align.d.ts +0 -0
- /package/es/{dataset/util → layout/chart-helper}/zero-align.js +0 -0
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import type { IStage, IRect } from '@visactor/vrender';
|
|
2
2
|
import type { CellSubLocation } from '../ts-types';
|
|
3
|
-
import { type CellAddress, type
|
|
3
|
+
import { type CellAddress, type SortOrder } from '../ts-types';
|
|
4
4
|
import type { Group } from './graphic/group';
|
|
5
5
|
import type { Icon } from './graphic/icon';
|
|
6
6
|
import { TableComponent } from './component/table-component';
|
|
7
7
|
import { SceneProxy } from './group-creater/progress/proxy';
|
|
8
8
|
import type { BaseTableAPI } from '../ts-types/base-table';
|
|
9
9
|
export type MergeMap = Map<string, {
|
|
10
|
-
x: number;
|
|
11
|
-
y: number;
|
|
12
10
|
cellWidth: number;
|
|
13
11
|
cellHeight: number;
|
|
14
12
|
}>;
|
|
@@ -56,8 +54,6 @@ export declare class Scenegraph {
|
|
|
56
54
|
createComponent(): void;
|
|
57
55
|
createSceneGraph(): void;
|
|
58
56
|
renderSceneGraph(): void;
|
|
59
|
-
getCellOld(col: number, row: number): Group;
|
|
60
|
-
getColGroupOld(col: number, isHeader?: boolean): Group;
|
|
61
57
|
getCell(col: number, row: number, getShadow?: boolean): Group;
|
|
62
58
|
highPerformanceGetCell(col: number, row: number, getShadow?: boolean): Group;
|
|
63
59
|
getColGroup(col: number, isCornerOrColHeader?: boolean): Group;
|
|
@@ -75,6 +71,12 @@ export declare class Scenegraph {
|
|
|
75
71
|
showHoverIcon(col: number, row: number): void;
|
|
76
72
|
hideClickIcon(col: number, row: number): void;
|
|
77
73
|
showClickIcon(col: number, row: number): void;
|
|
74
|
+
getIcon(col: number, row: number, x: number, y: number): Icon | undefined;
|
|
75
|
+
setIconHoverStyle(icon: Icon, col: number, row: number, cellGroup: Group): void;
|
|
76
|
+
updateSortIcon(col: number, row: number, iconMark: Icon, order: SortOrder, oldSortCol: number, oldSortRow: number, oldIconMark: Icon | undefined): void;
|
|
77
|
+
updateFrozenIcon(col: number, oldFrozenCol: number): void;
|
|
78
|
+
updateHierarchyIcon(col: number, row: number): void;
|
|
79
|
+
setIconNormalStyle(icon: Icon, col: number, row: number): void;
|
|
78
80
|
deactivateChart(col: number, row: number): void;
|
|
79
81
|
activateChart(col: number, row: number): void;
|
|
80
82
|
removeInteractionBorder(col: number, row: number): void;
|
|
@@ -83,9 +85,6 @@ export declare class Scenegraph {
|
|
|
83
85
|
deleteLastSelectedRangeComponents(): void;
|
|
84
86
|
deleteAllSelectBorder(): void;
|
|
85
87
|
updateCellSelectBorder(newStartCol: number, newStartRow: number, newEndCol: number, newEndRow: number): void;
|
|
86
|
-
getIcon(col: number, row: number, x: number, y: number): Icon | undefined;
|
|
87
|
-
setIconHoverStyle(icon: Icon, col: number, row: number, cellGroup: Group): void;
|
|
88
|
-
setIconNormalStyle(icon: Icon, col: number, row: number): void;
|
|
89
88
|
updateColWidth(col: number, detaX: number, skipUpdateContainer?: boolean): void;
|
|
90
89
|
updateChartSize(col: number): void;
|
|
91
90
|
updateChartState(datum: any): void;
|
|
@@ -122,21 +121,16 @@ export declare class Scenegraph {
|
|
|
122
121
|
x?: number;
|
|
123
122
|
rightFrozen?: boolean;
|
|
124
123
|
};
|
|
125
|
-
updateIcon(icon: Icon, iconConfig: ColumnIconOption): void;
|
|
126
124
|
updateFrozen(): void;
|
|
127
125
|
dealWidthRightFrozen(rightFrozenColCount: number): void;
|
|
128
126
|
dealWidthBottomFrozen(bottomFrozenRowCount: number): void;
|
|
129
127
|
updateBorderSizeAndPosition(): void;
|
|
130
|
-
updateSortIcon(col: number, row: number, iconMark: Icon, order: SortOrder, oldSortCol: number, oldSortRow: number, oldIconMark: Icon | undefined): void;
|
|
131
|
-
updateFrozenIcon(col: number, oldFrozenCol: number): void;
|
|
132
128
|
sortCell(): void;
|
|
133
129
|
getCellOverflowText(col: number, row: number): string | null;
|
|
134
130
|
updateDrill(visible: boolean, x: number, y: number, drillDown: boolean, drillUp: boolean): void;
|
|
135
131
|
updateCellContent(col: number, row: number): Group;
|
|
136
132
|
setPixelRatio(pixelRatio: number): void;
|
|
137
|
-
updateHierarchyIcon(col: number, row: number): void;
|
|
138
133
|
updateRow(removeCells: CellAddress[], addCells: CellAddress[], updateCells?: CellAddress[]): void;
|
|
139
|
-
findAndUpdateIcon(group: Group, funcTypeArr: IconFuncTypeEnum[], iconConfig: ColumnIconOption): void;
|
|
140
134
|
getColumnGroupX(col: number): number;
|
|
141
135
|
getCellGroupY(row: number): number;
|
|
142
136
|
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { createStage,
|
|
2
|
-
|
|
3
|
-
import { IconFuncTypeEnum } from "../ts-types";
|
|
1
|
+
import { createStage, container, vglobal } from "@visactor/vrender";
|
|
4
2
|
|
|
5
3
|
import { isArray, isString } from "@visactor/vutils";
|
|
6
4
|
|
|
@@ -24,8 +22,6 @@ import splitModule from "./graphic/contributions";
|
|
|
24
22
|
|
|
25
23
|
import { getProp } from "./utils/get-prop";
|
|
26
24
|
|
|
27
|
-
import { dealWithIcon } from "./utils/text-icon-layout";
|
|
28
|
-
|
|
29
25
|
import { SceneProxy } from "./group-creater/progress/proxy";
|
|
30
26
|
|
|
31
27
|
import { computeColWidth, computeColsWidth } from "./layout/compute-col-width";
|
|
@@ -62,6 +58,8 @@ import { loadPoptip, setPoptipTheme } from "@visactor/vrender-components";
|
|
|
62
58
|
|
|
63
59
|
import textMeasureModule from "./utils/text-measure";
|
|
64
60
|
|
|
61
|
+
import { getIconByXY, hideClickIcon, hideHoverIcon, setIconHoverStyle, setIconNormalStyle, showClickIcon, showHoverIcon, updateFrozenIcon, updateHierarchyIcon, updateSortIcon } from "./icon/icon-update";
|
|
62
|
+
|
|
65
63
|
import { Env } from "../tools/env";
|
|
66
64
|
|
|
67
65
|
loadPoptip(), container.load(splitModule), container.load(textMeasureModule);
|
|
@@ -226,21 +224,6 @@ export class Scenegraph {
|
|
|
226
224
|
renderSceneGraph() {
|
|
227
225
|
this.stage.render();
|
|
228
226
|
}
|
|
229
|
-
getCellOld(col, row) {
|
|
230
|
-
var _a, _b, _c, _d;
|
|
231
|
-
let element;
|
|
232
|
-
if (element = this.hasFrozen && col < this.table.frozenColCount && row < this.table.frozenRowCount ? null === (_a = this.cornerHeaderGroup.getChildAt(col)) || void 0 === _a ? void 0 : _a.getChildAt(row) : row < this.table.frozenRowCount ? null === (_b = this.colHeaderGroup.getChildAt(this.hasFrozen ? col - this.table.frozenColCount : col)) || void 0 === _b ? void 0 : _b.getChildAt(row) : col < this.table.frozenColCount ? null === (_c = this.rowHeaderGroup.getChildAt(col)) || void 0 === _c ? void 0 : _c.getChildAt(row - this.table.frozenRowCount) : null === (_d = this.bodyGroup.getChildAt(col - this.table.frozenColCount)) || void 0 === _d ? void 0 : _d.getChildAt(row - this.table.frozenRowCount),
|
|
233
|
-
element && "shadow-cell" === element.role) {
|
|
234
|
-
const range = this.table.getCellRange(col, row);
|
|
235
|
-
element = this.getCell(range.start.col, range.start.row);
|
|
236
|
-
}
|
|
237
|
-
return element || void 0;
|
|
238
|
-
}
|
|
239
|
-
getColGroupOld(col, isHeader = !1) {
|
|
240
|
-
let element;
|
|
241
|
-
return element = col < this.frozenColCount && isHeader ? this.cornerHeaderGroup.getChildAt(col) : col < this.frozenColCount ? this.rowHeaderGroup.getChildAt(col) : isHeader ? this.rowHeaderGroup.getChildAt(col - this.frozenColCount) : this.bodyGroup.getChildAt(col - this.frozenColCount),
|
|
242
|
-
element || void 0;
|
|
243
|
-
}
|
|
244
227
|
getCell(col, row, getShadow) {
|
|
245
228
|
var _a, _b, _c, _d, _e, _f;
|
|
246
229
|
let cell;
|
|
@@ -288,20 +271,34 @@ export class Scenegraph {
|
|
|
288
271
|
(null === (_b = null === (_a = this.table.stateManeger.select) || void 0 === _a ? void 0 : _a.ranges) || void 0 === _b ? void 0 : _b.length) > 0 && updateAllSelectComponent(this);
|
|
289
272
|
}
|
|
290
273
|
hideHoverIcon(col, row) {
|
|
291
|
-
|
|
292
|
-
hideIcon(this, this.getCell(col, row), "mouseenter_cell");
|
|
274
|
+
hideHoverIcon(col, row, this);
|
|
293
275
|
}
|
|
294
276
|
showHoverIcon(col, row) {
|
|
295
|
-
|
|
296
|
-
showIcon(this, this.getCell(col, row), "mouseenter_cell");
|
|
277
|
+
showHoverIcon(col, row, this);
|
|
297
278
|
}
|
|
298
279
|
hideClickIcon(col, row) {
|
|
299
|
-
|
|
300
|
-
hideIcon(this, this.getCell(col, row), "click_cell");
|
|
280
|
+
hideClickIcon(col, row, this);
|
|
301
281
|
}
|
|
302
282
|
showClickIcon(col, row) {
|
|
303
|
-
|
|
304
|
-
|
|
283
|
+
showClickIcon(col, row, this);
|
|
284
|
+
}
|
|
285
|
+
getIcon(col, row, x, y) {
|
|
286
|
+
return getIconByXY(col, row, x, y, this);
|
|
287
|
+
}
|
|
288
|
+
setIconHoverStyle(icon, col, row, cellGroup) {
|
|
289
|
+
setIconHoverStyle(icon, col, row, cellGroup, this);
|
|
290
|
+
}
|
|
291
|
+
updateSortIcon(col, row, iconMark, order, oldSortCol, oldSortRow, oldIconMark) {
|
|
292
|
+
updateSortIcon(col, row, iconMark, order, oldSortCol, oldSortRow, oldIconMark, this);
|
|
293
|
+
}
|
|
294
|
+
updateFrozenIcon(col, oldFrozenCol) {
|
|
295
|
+
updateFrozenIcon(this);
|
|
296
|
+
}
|
|
297
|
+
updateHierarchyIcon(col, row) {
|
|
298
|
+
updateHierarchyIcon(col, row, this);
|
|
299
|
+
}
|
|
300
|
+
setIconNormalStyle(icon, col, row) {
|
|
301
|
+
setIconNormalStyle(icon, col, row, this);
|
|
305
302
|
}
|
|
306
303
|
deactivateChart(col, row) {
|
|
307
304
|
var _a, _b;
|
|
@@ -335,59 +332,6 @@ export class Scenegraph {
|
|
|
335
332
|
updateCellSelectBorder(newStartCol, newStartRow, newEndCol, newEndRow) {
|
|
336
333
|
updateCellSelectBorder(this, newStartCol, newStartRow, newEndCol, newEndRow);
|
|
337
334
|
}
|
|
338
|
-
getIcon(col, row, x, y) {
|
|
339
|
-
let pickMark;
|
|
340
|
-
return this.getCell(col, row).forEachChildren((mark => {
|
|
341
|
-
"icon" === mark.role && mark.containsPoint(x, y, IContainPointMode.GLOBAL) && (pickMark = mark);
|
|
342
|
-
})), pickMark;
|
|
343
|
-
}
|
|
344
|
-
setIconHoverStyle(icon, col, row, cellGroup) {
|
|
345
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
346
|
-
if (icon.attribute.backgroundColor) {
|
|
347
|
-
let iconBack = icon.parent.getChildByName("icon-back");
|
|
348
|
-
iconBack ? iconBack.setAttributes({
|
|
349
|
-
x: (null !== (_a = icon.attribute.x) && void 0 !== _a ? _a : 0) + (null !== (_b = icon.attribute.dx) && void 0 !== _b ? _b : 0) + (icon.AABBBounds.width() - icon.backgroundWidth) / 2,
|
|
350
|
-
y: (null !== (_c = icon.attribute.y) && void 0 !== _c ? _c : 0) + (icon.AABBBounds.height() - icon.backgroundHeight) / 2,
|
|
351
|
-
width: icon.backgroundWidth,
|
|
352
|
-
height: icon.backgroundHeight,
|
|
353
|
-
fill: icon.attribute.backgroundColor,
|
|
354
|
-
cornerRadius: 5,
|
|
355
|
-
visible: !0
|
|
356
|
-
}) : (iconBack = createRect({
|
|
357
|
-
x: (null !== (_d = icon.attribute.x) && void 0 !== _d ? _d : 0) + (null !== (_e = icon.attribute.dx) && void 0 !== _e ? _e : 0) + (icon.AABBBounds.width() - icon.backgroundWidth) / 2,
|
|
358
|
-
y: (null !== (_f = icon.attribute.y) && void 0 !== _f ? _f : 0) + (icon.AABBBounds.height() - icon.backgroundHeight) / 2,
|
|
359
|
-
width: icon.backgroundWidth,
|
|
360
|
-
height: icon.backgroundHeight,
|
|
361
|
-
fill: icon.attribute.backgroundColor,
|
|
362
|
-
cornerRadius: 5,
|
|
363
|
-
pickable: !1,
|
|
364
|
-
visible: !0
|
|
365
|
-
}), iconBack.name = "icon-back"), icon.parent.insertBefore(iconBack, icon);
|
|
366
|
-
}
|
|
367
|
-
if (icon.attribute.hoverImage && icon.attribute.image !== icon.attribute.hoverImage && (icon.image = icon.attribute.hoverImage),
|
|
368
|
-
icon.tooltip) {
|
|
369
|
-
const {x1: left, x2: right, y1: top, y2: bottom} = icon.globalAABBBounds, tooltipOptions = {
|
|
370
|
-
content: icon.tooltip.title,
|
|
371
|
-
referencePosition: {
|
|
372
|
-
rect: {
|
|
373
|
-
left: left,
|
|
374
|
-
right: right,
|
|
375
|
-
top: top,
|
|
376
|
-
bottom: bottom,
|
|
377
|
-
width: icon.globalAABBBounds.width(),
|
|
378
|
-
height: icon.globalAABBBounds.height()
|
|
379
|
-
},
|
|
380
|
-
placement: icon.tooltip.placement
|
|
381
|
-
},
|
|
382
|
-
style: Object.assign({}, null === (_g = this.table.internalProps.theme) || void 0 === _g ? void 0 : _g.tooltipStyle, null === (_h = icon.tooltip) || void 0 === _h ? void 0 : _h.style)
|
|
383
|
-
};
|
|
384
|
-
this.table.internalProps.tooltipHandler.isBinded(tooltipOptions) || this.table.showTooltip(col, row, tooltipOptions);
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
setIconNormalStyle(icon, col, row) {
|
|
388
|
-
const iconBack = icon.parent.getChildByName("icon-back");
|
|
389
|
-
iconBack && iconBack.setAttribute("visible", !1), icon.attribute.hoverImage && icon.attribute.image !== icon.attribute.originImage && (icon.image = icon.attribute.originImage);
|
|
390
|
-
}
|
|
391
335
|
updateColWidth(col, detaX, skipUpdateContainer) {
|
|
392
336
|
updateColWidth(this, col, Math.round(detaX)), skipUpdateContainer || this.updateContainer();
|
|
393
337
|
}
|
|
@@ -686,9 +630,6 @@ export class Scenegraph {
|
|
|
686
630
|
row: -1
|
|
687
631
|
};
|
|
688
632
|
}
|
|
689
|
-
updateIcon(icon, iconConfig) {
|
|
690
|
-
dealWithIcon(iconConfig, icon), icon.name = iconConfig.name, this.updateNextFrame();
|
|
691
|
-
}
|
|
692
633
|
updateFrozen() {
|
|
693
634
|
this.clear || (this.resetFrozen(), this.component.updateScrollBar());
|
|
694
635
|
}
|
|
@@ -707,37 +648,6 @@ export class Scenegraph {
|
|
|
707
648
|
updateFrameBorderSize(this.rowHeaderGroup)), this.cornerHeaderGroup.border && (this.cornerHeaderGroup.appendChild(this.cornerHeaderGroup.border),
|
|
708
649
|
updateFrameBorderSize(this.cornerHeaderGroup));
|
|
709
650
|
}
|
|
710
|
-
updateSortIcon(col, row, iconMark, order, oldSortCol, oldSortRow, oldIconMark) {
|
|
711
|
-
const icon = this.table.internalProps.headerHelper.getSortIcon(order, this.table, col, row);
|
|
712
|
-
if (iconMark && this.updateIcon(iconMark, icon), oldIconMark !== iconMark) {
|
|
713
|
-
const oldIcon = this.table.internalProps.headerHelper.getSortIcon("normal", this.table, oldSortCol, oldSortRow);
|
|
714
|
-
if (oldIconMark) this.updateIcon(oldIconMark, oldIcon); else {
|
|
715
|
-
let oldIconMark;
|
|
716
|
-
this.getCell(oldSortCol, oldSortRow).forEachChildren((mark => "sort" === mark.attribute.funcType && (oldIconMark = mark,
|
|
717
|
-
!0))), oldIconMark && this.updateIcon(oldIconMark, oldIcon);
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
}
|
|
721
|
-
updateFrozenIcon(col, oldFrozenCol) {
|
|
722
|
-
const updateCol = Math.max(col, oldFrozenCol);
|
|
723
|
-
this.colHeaderGroup.forEachChildrenSkipChild((colGroup => !(colGroup.col <= updateCol) || (colGroup.forEachChildren((cellGroup => {
|
|
724
|
-
cellGroup.forEachChildren((icon => {
|
|
725
|
-
if ("frozen" === icon.attribute.funcType) {
|
|
726
|
-
const iconConfig = this.table.internalProps.headerHelper.getFrozenIcon(cellGroup.col, cellGroup.row);
|
|
727
|
-
return this.updateIcon(icon, iconConfig), !0;
|
|
728
|
-
}
|
|
729
|
-
return !1;
|
|
730
|
-
}));
|
|
731
|
-
})), !1))), this.cornerHeaderGroup.forEachChildrenSkipChild((colGroup => !(colGroup.col <= updateCol) || (colGroup.forEachChildren((cellGroup => {
|
|
732
|
-
cellGroup.forEachChildren((icon => {
|
|
733
|
-
if ("frozen" === icon.attribute.funcType) {
|
|
734
|
-
const iconConfig = this.table.internalProps.headerHelper.getFrozenIcon(cellGroup.col, cellGroup.row);
|
|
735
|
-
return this.updateIcon(icon, iconConfig), !0;
|
|
736
|
-
}
|
|
737
|
-
return !1;
|
|
738
|
-
}));
|
|
739
|
-
})), !1)));
|
|
740
|
-
}
|
|
741
651
|
sortCell() {
|
|
742
652
|
this.isPivot || (this.transpose ? this.proxy.sortCellHorizontal() : this.proxy.sortCellVertical());
|
|
743
653
|
}
|
|
@@ -762,24 +672,11 @@ export class Scenegraph {
|
|
|
762
672
|
this.stage.disableDirtyBounds(), this.stage.window.setDpr(pixelRatio), this.stage.render(),
|
|
763
673
|
this.stage.enableDirtyBounds();
|
|
764
674
|
}
|
|
765
|
-
updateHierarchyIcon(col, row) {
|
|
766
|
-
const cellGroup = this.getCell(col, row);
|
|
767
|
-
let iconConfig;
|
|
768
|
-
iconConfig = this.table.isHeader(col, row) ? this.table.internalProps.headerHelper.getHierarchyIcon(cellGroup.col, cellGroup.row) : this.table.internalProps.bodyHelper.getHierarchyIcon(cellGroup.col, cellGroup.row),
|
|
769
|
-
this.findAndUpdateIcon(cellGroup, [ IconFuncTypeEnum.collapse, IconFuncTypeEnum.expand ], iconConfig);
|
|
770
|
-
}
|
|
771
675
|
updateRow(removeCells, addCells, updateCells = []) {
|
|
772
676
|
updateRow(removeCells, addCells, updateCells, this.table), this.recalculateColWidths(),
|
|
773
677
|
this.recalculateRowHeights(), this.table.stateManeger.checkFrozen(), this.isPivot || this.transpose || this.component.setFrozenColumnShadow(this.table.frozenColCount - 1),
|
|
774
678
|
this.updateNextFrame();
|
|
775
679
|
}
|
|
776
|
-
findAndUpdateIcon(group, funcTypeArr, iconConfig) {
|
|
777
|
-
group.forEachChildren((icon => {
|
|
778
|
-
if ("group" === icon.type) this.findAndUpdateIcon(icon, funcTypeArr, iconConfig); else if (-1 !== funcTypeArr.indexOf(icon.attribute.funcType)) return this.updateIcon(icon, iconConfig),
|
|
779
|
-
!0;
|
|
780
|
-
return !1;
|
|
781
|
-
}));
|
|
782
|
-
}
|
|
783
680
|
getColumnGroupX(col) {
|
|
784
681
|
return col < this.table.rowHeaderLevelCount ? this.table.getColsWidth(0, col - 1) : col < this.table.colCount - this.table.rightFrozenColCount ? this.table.getColsWidth(this.table.rowHeaderLevelCount, col - 1) : col < this.table.colCount ? this.table.getColsWidth(this.table.colCount - this.table.bottomFrozenRowCount, col - 1) : 0;
|
|
785
682
|
}
|
|
@@ -787,18 +684,4 @@ export class Scenegraph {
|
|
|
787
684
|
return row < this.table.columnHeaderLevelCount ? this.table.getRowsHeight(0, row - 1) : row < this.table.rowCount - this.table.bottomFrozenRowCount ? this.table.getRowsHeight(this.table.columnHeaderLevelCount, row - 1) : row < this.table.rowCount ? this.table.getRowsHeight(this.table.rowCount - this.table.bottomFrozenRowCount, row - 1) : 0;
|
|
788
685
|
}
|
|
789
686
|
}
|
|
790
|
-
|
|
791
|
-
function showIcon(scene, cellGroup, visibleTime) {
|
|
792
|
-
cellGroup.forEachChildren((child => {
|
|
793
|
-
"group" === child.type ? showIcon(scene, child, visibleTime) : child.attribute.visibleTime === visibleTime && (child.attribute.visible = !0,
|
|
794
|
-
scene.updateNextFrame());
|
|
795
|
-
}));
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
function hideIcon(scene, cellGroup, visibleTime) {
|
|
799
|
-
cellGroup.forEachChildren((child => {
|
|
800
|
-
"group" === child.type ? hideIcon(scene, child, visibleTime) : child.attribute.visibleTime === visibleTime && (child.attribute.visible = !1,
|
|
801
|
-
scene.updateNextFrame());
|
|
802
|
-
}));
|
|
803
|
-
}
|
|
804
687
|
//# sourceMappingURL=scenegraph.js.map
|