k-vtable 1.0.37 → 1.0.39
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/ListTable.d.ts +2 -1
- package/cjs/ListTable.js +31 -10
- package/cjs/ListTable.js.map +1 -1
- package/cjs/body-helper/body-helper.d.ts +1 -0
- package/cjs/body-helper/body-helper.js +4 -3
- package/cjs/body-helper/body-helper.js.map +1 -1
- package/cjs/body-helper/style.js +2 -1
- package/cjs/components/legend/discrete-legend/discrete-legend.d.ts +1 -1
- package/cjs/core/BaseTable.d.ts +1 -0
- package/cjs/core/BaseTable.js +28 -22
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/row-series-number-helper.d.ts +1 -0
- package/cjs/core/row-series-number-helper.js +3 -1
- package/cjs/core/row-series-number-helper.js.map +1 -1
- package/cjs/data/CachedDataSource.js +5 -3
- package/cjs/data/CachedDataSource.js.map +1 -1
- package/cjs/data/DataSource.js +1 -2
- package/cjs/dataset/DataStatistics.js +2 -1
- package/cjs/header-helper/header-helper.d.ts +1 -0
- package/cjs/header-helper/header-helper.js +4 -3
- package/cjs/header-helper/header-helper.js.map +1 -1
- package/cjs/header-helper/style.js +2 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/plugins/custom-cell-style.js +1 -1
- package/cjs/scenegraph/animation/appear.js +18 -3
- package/cjs/scenegraph/animation/appear.js.map +1 -1
- package/cjs/scenegraph/component/custom.js +3 -3
- package/cjs/scenegraph/component/custom.js.map +1 -1
- package/cjs/scenegraph/component/menu.js +4 -4
- package/cjs/scenegraph/component/menu.js.map +1 -1
- package/cjs/scenegraph/graphic/chart.d.ts +6 -1
- package/cjs/scenegraph/graphic/chart.js +38 -4
- package/cjs/scenegraph/graphic/chart.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render-helper.js +2 -1
- package/cjs/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
- package/cjs/scenegraph/graphic/group.d.ts +3 -1
- package/cjs/scenegraph/graphic/group.js +21 -3
- package/cjs/scenegraph/graphic/group.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +4 -3
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/button-cell.js +2 -2
- package/cjs/scenegraph/group-creater/cell-type/button-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +4 -4
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js +2 -2
- package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js +3 -3
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/radio-cell.js +2 -2
- package/cjs/scenegraph/group-creater/cell-type/radio-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js +2 -2
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/switch-cell.js +2 -2
- package/cjs/scenegraph/group-creater/cell-type/switch-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js +6 -6
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/video-cell.js +101 -12
- package/cjs/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/column-helper.js +4 -3
- package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
- package/cjs/scenegraph/layout/update-row.js +3 -3
- package/cjs/scenegraph/layout/update-row.js.map +1 -1
- package/cjs/scenegraph/runtime-contributions.d.ts +2 -0
- package/cjs/scenegraph/runtime-contributions.js +28 -0
- package/cjs/scenegraph/runtime-contributions.js.map +1 -0
- package/cjs/scenegraph/scenegraph.d.ts +4 -1
- package/cjs/scenegraph/scenegraph.js +40 -16
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/utils/text-icon-layout.d.ts +4 -0
- package/cjs/scenegraph/utils/text-icon-layout.js +23 -6
- package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/cjs/scenegraph/utils/text-measure.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +7 -1
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +1 -1
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/vrender-app.d.ts +20 -0
- package/cjs/vrender-app.js +141 -0
- package/cjs/vrender-app.js.map +1 -0
- package/cjs/vrender.d.ts +17 -1
- package/cjs/vrender.js +36 -15
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +106132 -96965
- package/dist/vtable.min.js +1 -1
- package/es/ListTable.d.ts +2 -1
- package/es/ListTable.js +30 -9
- package/es/ListTable.js.map +1 -1
- package/es/body-helper/body-helper.d.ts +1 -0
- package/es/body-helper/body-helper.js +4 -3
- package/es/body-helper/body-helper.js.map +1 -1
- package/es/body-helper/style.js +2 -1
- package/es/components/legend/discrete-legend/discrete-legend.d.ts +1 -1
- package/es/core/BaseTable.d.ts +1 -0
- package/es/core/BaseTable.js +30 -24
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/row-series-number-helper.d.ts +1 -0
- package/es/core/row-series-number-helper.js +3 -1
- package/es/core/row-series-number-helper.js.map +1 -1
- package/es/data/CachedDataSource.js +5 -3
- package/es/data/CachedDataSource.js.map +1 -1
- package/es/data/DataSource.js +1 -2
- package/es/dataset/DataStatistics.js +2 -1
- package/es/header-helper/header-helper.d.ts +1 -0
- package/es/header-helper/header-helper.js +4 -3
- package/es/header-helper/header-helper.js.map +1 -1
- package/es/header-helper/style.js +2 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/plugins/custom-cell-style.js +1 -1
- package/es/scenegraph/animation/appear.js +18 -3
- package/es/scenegraph/animation/appear.js.map +1 -1
- package/es/scenegraph/component/custom.js +3 -3
- package/es/scenegraph/component/custom.js.map +1 -1
- package/es/scenegraph/component/menu.js +4 -4
- package/es/scenegraph/component/menu.js.map +1 -1
- package/es/scenegraph/graphic/chart.d.ts +6 -1
- package/es/scenegraph/graphic/chart.js +39 -3
- package/es/scenegraph/graphic/chart.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render-helper.js +2 -1
- package/es/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
- package/es/scenegraph/graphic/group.d.ts +3 -1
- package/es/scenegraph/graphic/group.js +21 -3
- package/es/scenegraph/graphic/group.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +4 -3
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/button-cell.js +2 -2
- package/es/scenegraph/group-creater/cell-type/button-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.js +4 -4
- package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/checkbox-cell.js +2 -2
- package/es/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/image-cell.js +3 -3
- package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/radio-cell.js +2 -2
- package/es/scenegraph/group-creater/cell-type/radio-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.js +2 -2
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/switch-cell.js +2 -2
- package/es/scenegraph/group-creater/cell-type/switch-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/text-cell.js +5 -5
- package/es/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/video-cell.js +99 -12
- package/es/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
- package/es/scenegraph/group-creater/column-helper.js +4 -3
- package/es/scenegraph/group-creater/column-helper.js.map +1 -1
- package/es/scenegraph/layout/update-row.js +3 -3
- package/es/scenegraph/layout/update-row.js.map +1 -1
- package/es/scenegraph/runtime-contributions.d.ts +2 -0
- package/es/scenegraph/runtime-contributions.js +20 -0
- package/es/scenegraph/runtime-contributions.js.map +1 -0
- package/es/scenegraph/scenegraph.d.ts +4 -1
- package/es/scenegraph/scenegraph.js +42 -16
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/utils/text-icon-layout.d.ts +4 -0
- package/es/scenegraph/utils/text-icon-layout.js +18 -2
- package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/es/scenegraph/utils/text-measure.js.map +1 -1
- package/es/ts-types/base-table.d.ts +7 -1
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +1 -1
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/vrender-app.d.ts +20 -0
- package/es/vrender-app.js +161 -0
- package/es/vrender-app.js.map +1 -0
- package/es/vrender.d.ts +17 -1
- package/es/vrender.js +27 -8
- package/es/vrender.js.map +1 -1
- package/package.json +8 -7
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { setPoptipTheme, registerForVrender } from "./../vrender";
|
|
2
|
+
|
|
3
|
+
import { createStageFromVRenderApp } from "../vrender-app";
|
|
2
4
|
|
|
3
5
|
import { InternalIconName } from "../ts-types";
|
|
4
6
|
|
|
@@ -16,8 +18,6 @@ import { getQuadProps } from "./utils/padding";
|
|
|
16
18
|
|
|
17
19
|
import { createFrameBorder, updateCornerRadius, updateFrameBorder, updateFrameBorderSize } from "./style/frame-border";
|
|
18
20
|
|
|
19
|
-
import splitModule from "./graphic/contributions";
|
|
20
|
-
|
|
21
21
|
import { getProp } from "./utils/get-prop";
|
|
22
22
|
|
|
23
23
|
import { dealWithIcon } from "./utils/text-icon-layout";
|
|
@@ -54,9 +54,7 @@ import { initSceneGraph } from "./group-creater/init-scenegraph";
|
|
|
54
54
|
|
|
55
55
|
import { updateContainerChildrenX, updateContainerChildrenY } from "./utils/update-container";
|
|
56
56
|
|
|
57
|
-
import {
|
|
58
|
-
|
|
59
|
-
import textMeasureModule from "./utils/text-measure";
|
|
57
|
+
import { installVTableRuntimeContributions } from "./runtime-contributions";
|
|
60
58
|
|
|
61
59
|
import { getIconByXY, hideClickIcon, hideHoverIcon, resetResidentHoverIcon, residentHoverIcon, setIconHoverStyle, setIconNormalStyle, showClickIcon, showHoverIcon, updateFrozenIcon, updateHierarchyIcon, updateSortIcon } from "./icon/icon-update";
|
|
62
60
|
|
|
@@ -82,22 +80,25 @@ import { getCellEventArgsSet } from "../event/util";
|
|
|
82
80
|
|
|
83
81
|
import { clearAndReleaseBrushingChartInstance, getBrushingChartInstance, getBrushingChartInstanceCellPos } from "./graphic/active-cell-chart-list";
|
|
84
82
|
|
|
85
|
-
registerForVrender(),
|
|
83
|
+
registerForVrender(), installVTableRuntimeContributions();
|
|
86
84
|
|
|
87
85
|
export class Scenegraph {
|
|
88
86
|
constructor(table) {
|
|
87
|
+
var _a, _b;
|
|
89
88
|
let width, height;
|
|
90
|
-
this.
|
|
91
|
-
this.mergeMap = new Map, this.brushingChartInstance = void 0, this.brushingChartInstanceCellPos = {
|
|
89
|
+
this.stageOwned = !0, this._needUpdateContainer = !1, this.table = table, this.hasFrozen = !1,
|
|
90
|
+
this.clear = !0, this.mergeMap = new Map, this.brushingChartInstance = void 0, this.brushingChartInstanceCellPos = {
|
|
92
91
|
col: -1,
|
|
93
92
|
row: -1
|
|
94
93
|
}, this.chartInstanceListColumnByColumnDirection = {}, this.chartInstanceListRowByRowDirection = {},
|
|
95
94
|
this.delayRunDimensionHoverTimerForColumnDirection = [], this.delayRunDimensionHoverTimerForRowDirection = [],
|
|
96
95
|
this.delayRunDimensionHoverTimerForViewRange = [], this.disabledTooltipToAllChartInstances = !1,
|
|
97
|
-
setPoptipTheme(this.table.theme.textPopTipStyle)
|
|
98
|
-
|
|
99
|
-
width = table.options.
|
|
100
|
-
|
|
96
|
+
setPoptipTheme(this.table.theme.textPopTipStyle);
|
|
97
|
+
const mode = null !== (_a = table.options.mode) && void 0 !== _a ? _a : "node" === Env.mode ? "node" : "browser";
|
|
98
|
+
"node" === mode ? (width = table.canvasWidth, height = table.canvasHeight) : table.options.canvas && table.options.viewBox ? (width = table.options.viewBox.x2 - table.options.viewBox.x1,
|
|
99
|
+
height = table.options.viewBox.y2 - table.options.viewBox.y1) : (width = table.canvas.width,
|
|
100
|
+
height = table.canvas.height);
|
|
101
|
+
const {stage: stage, releaseAppRef: releaseAppRef, stageOwned: stageOwned} = createStageFromVRenderApp(Object.assign({
|
|
101
102
|
canvas: table.canvas,
|
|
102
103
|
width: width,
|
|
103
104
|
height: height,
|
|
@@ -112,8 +113,19 @@ export class Scenegraph {
|
|
|
112
113
|
this.table.options.afterRender && this.table.options.afterRender(stage), this.table.fireListeners("after_render", null);
|
|
113
114
|
},
|
|
114
115
|
canvasControled: !table.options.canvas,
|
|
115
|
-
viewBox: table.options.viewBox
|
|
116
|
-
|
|
116
|
+
viewBox: table.options.viewBox,
|
|
117
|
+
context: {
|
|
118
|
+
appName: "vtable"
|
|
119
|
+
}
|
|
120
|
+
}, table.options.renderOption), {
|
|
121
|
+
mode: mode,
|
|
122
|
+
scope: null !== (_b = table.options.vRenderAppScope) && void 0 !== _b ? _b : "vtable",
|
|
123
|
+
app: table.options.vRenderApp,
|
|
124
|
+
stage: table.options.stage,
|
|
125
|
+
envParams: table.options.modeParams
|
|
126
|
+
});
|
|
127
|
+
this.stage = stage, this.stageOwned = stageOwned, this.releaseVRenderAppRef = releaseAppRef,
|
|
128
|
+
this.stage.defaultLayer.setTheme({
|
|
117
129
|
group: {
|
|
118
130
|
boundsPadding: 0,
|
|
119
131
|
strokeBoundsBuffer: 0,
|
|
@@ -296,6 +308,20 @@ export class Scenegraph {
|
|
|
296
308
|
delete this.tableGroup.border), null === (_u = this.proxy) || void 0 === _u || _u.release(),
|
|
297
309
|
null === (_v = this.table.reactCustomLayout) || void 0 === _v || _v.clearCache();
|
|
298
310
|
}
|
|
311
|
+
releaseStage() {
|
|
312
|
+
var _a, _b, _c;
|
|
313
|
+
const releaseAppRef = this.releaseVRenderAppRef;
|
|
314
|
+
this.releaseVRenderAppRef = void 0;
|
|
315
|
+
try {
|
|
316
|
+
if (this.stageOwned) null === (_a = this.stage) || void 0 === _a || _a.release(); else {
|
|
317
|
+
const tableGroup = this.tableGroup, tableGroupParent = null == tableGroup ? void 0 : tableGroup.parent;
|
|
318
|
+
null === (_b = null == tableGroupParent ? void 0 : tableGroupParent.removeChild) || void 0 === _b || _b.call(tableGroupParent, tableGroup),
|
|
319
|
+
null === (_c = null == tableGroup ? void 0 : tableGroup.release) || void 0 === _c || _c.call(tableGroup, !0);
|
|
320
|
+
}
|
|
321
|
+
} finally {
|
|
322
|
+
null == releaseAppRef || releaseAppRef();
|
|
323
|
+
}
|
|
324
|
+
}
|
|
299
325
|
updateStageBackground() {
|
|
300
326
|
this.stage.background = this.table.theme.underlayBackgroundColor, this.stage.renderNextFrame();
|
|
301
327
|
}
|
|
@@ -1154,7 +1180,7 @@ export class Scenegraph {
|
|
|
1154
1180
|
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;
|
|
1155
1181
|
}
|
|
1156
1182
|
getCellGroupY(row) {
|
|
1157
|
-
return row < this.table.frozenRowCount ? this.table.getRowsHeight(0, row - 1) : row < this.table.rowCount - this.table.bottomFrozenRowCount ? this.table.getRowsHeight(this.table.
|
|
1183
|
+
return row < this.table.frozenRowCount ? this.table.getRowsHeight(0, row - 1) : row < this.table.rowCount - this.table.bottomFrozenRowCount ? this.table.getRowsHeight(this.table.frozenRowCount, row - 1) : row < this.table.rowCount ? this.table.getRowsHeight(this.table.rowCount - this.table.bottomFrozenRowCount, row - 1) : 0;
|
|
1158
1184
|
}
|
|
1159
1185
|
getCellGroupX(col) {
|
|
1160
1186
|
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.rightFrozenColCount, col - 1) : 0;
|