@visactor/vtable 1.16.3-alpha.1 → 1.16.3-alpha.2
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/PivotChart.d.ts +0 -2
- package/cjs/PivotChart.js +1 -60
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/core/BaseTable.js +1 -1
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/animation.js +17 -6
- package/cjs/core/animation.js.map +1 -1
- package/cjs/core/utils/get-cell-position.js +4 -3
- package/cjs/core/utils/get-cell-position.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/index.js +1 -2
- package/cjs/layout/pivot-header-layout.js +1 -0
- package/cjs/scenegraph/graphic/chart.js +4 -4
- package/cjs/scenegraph/graphic/chart.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render-helper.d.ts +0 -2
- package/cjs/scenegraph/graphic/contributions/chart-render-helper.js +1 -3
- package/cjs/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +1 -1
- package/cjs/scenegraph/scenegraph.js +2 -3
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +31 -83
- package/dist/vtable.min.js +1 -1
- package/es/PivotChart.d.ts +0 -2
- package/es/PivotChart.js +0 -61
- package/es/PivotChart.js.map +1 -1
- package/es/core/BaseTable.js +1 -1
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/animation.js +16 -5
- package/es/core/animation.js.map +1 -1
- package/es/core/utils/get-cell-position.js +4 -3
- package/es/core/utils/get-cell-position.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/index.js +1 -2
- package/es/layout/pivot-header-layout.js +2 -1
- package/es/scenegraph/graphic/chart.js +4 -4
- package/es/scenegraph/graphic/chart.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render-helper.d.ts +0 -2
- package/es/scenegraph/graphic/contributions/chart-render-helper.js +1 -1
- package/es/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +1 -1
- package/es/scenegraph/scenegraph.js +2 -3
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +4 -4
package/cjs/vrender.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/vrender.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qEAA0D;AAC1D,kCAAgC;AAChC,yDAAwH;AACxH,yDAqBgC;AAIhC,IAAI,QAAQ,GAAG,KAAK,CAAC;AACrB,SAAgB,kBAAkB;IAChC,IAAI,QAAQ,EAAE;QACZ,OAAO;KACR;IACD,QAAQ,GAAG,IAAI,CAAC;IAEhB,IAAA,+BAAgB,GAAE,CAAC;IAEnB,IAAI,IAAA,2BAAY,GAAE,EAAE;QAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;KAC3B;SAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;QACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;KACxB;IACD,IAAA,0BAAW,GAAE,CAAC;IAGd,IAAA,6BAAc,GAAE,CAAC;IAEjB,IAAA,4BAAa,GAAE,CAAC;IAChB,IAAA,4BAAa,GAAE,CAAC;IAChB,IAAA,2BAAY,GAAE,CAAC;IAIf,IAAA,2BAAY,GAAE,CAAC;IAEf,IAAA,+BAAgB,GAAE,CAAC;IACnB,IAAA,iCAAkB,GAAE,CAAC;IACrB,IAAA,6BAAc,GAAE,CAAC;IACjB,IAAA,2BAAY,GAAE,CAAC;IACf,IAAA,uCAAwB,GAAE,CAAC;IAE3B,IAAA,+BAAU,GAAE,CAAC;IAEb,IAAA,uCAAwB,GAAE,CAAC;AAC7B,CAAC;AAnCD,gDAmCC;AAGD,uDAAqD;AAA5C,2GAAA,WAAW,OAAA;AACpB,uDAAsD;AAA7C,4GAAA,YAAY,OAAA;AAErB,yDAAuC;AACvC,yDAAuC;AACvC,+DAA6C","file":"vrender.js","sourcesContent":["import { loadPoptip } from '@visactor/vrender-components';\nimport '@visactor/vrender-core';\nimport { container, isBrowserEnv, isNodeEnv, preLoadAllModule, registerFlexLayoutPlugin } from '@visactor/vrender-core';\nimport {\n loadBrowserEnv,\n loadNodeEnv,\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\n// export const version = \"1.16.3-alpha.
|
|
1
|
+
{"version":3,"sources":["../src/vrender.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qEAA0D;AAC1D,kCAAgC;AAChC,yDAAwH;AACxH,yDAqBgC;AAIhC,IAAI,QAAQ,GAAG,KAAK,CAAC;AACrB,SAAgB,kBAAkB;IAChC,IAAI,QAAQ,EAAE;QACZ,OAAO;KACR;IACD,QAAQ,GAAG,IAAI,CAAC;IAEhB,IAAA,+BAAgB,GAAE,CAAC;IAEnB,IAAI,IAAA,2BAAY,GAAE,EAAE;QAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;KAC3B;SAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;QACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;KACxB;IACD,IAAA,0BAAW,GAAE,CAAC;IAGd,IAAA,6BAAc,GAAE,CAAC;IAEjB,IAAA,4BAAa,GAAE,CAAC;IAChB,IAAA,4BAAa,GAAE,CAAC;IAChB,IAAA,2BAAY,GAAE,CAAC;IAIf,IAAA,2BAAY,GAAE,CAAC;IAEf,IAAA,+BAAgB,GAAE,CAAC;IACnB,IAAA,iCAAkB,GAAE,CAAC;IACrB,IAAA,6BAAc,GAAE,CAAC;IACjB,IAAA,2BAAY,GAAE,CAAC;IACf,IAAA,uCAAwB,GAAE,CAAC;IAE3B,IAAA,+BAAU,GAAE,CAAC;IAEb,IAAA,uCAAwB,GAAE,CAAC;AAC7B,CAAC;AAnCD,gDAmCC;AAGD,uDAAqD;AAA5C,2GAAA,WAAW,OAAA;AACpB,uDAAsD;AAA7C,4GAAA,YAAY,OAAA;AAErB,yDAAuC;AACvC,yDAAuC;AACvC,+DAA6C","file":"vrender.js","sourcesContent":["import { loadPoptip } from '@visactor/vrender-components';\nimport '@visactor/vrender-core';\nimport { container, isBrowserEnv, isNodeEnv, preLoadAllModule, registerFlexLayoutPlugin } from '@visactor/vrender-core';\nimport {\n loadBrowserEnv,\n loadNodeEnv,\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\n// export const version = \"1.16.3-alpha.2\";\n\nlet registed = false;\nexport function registerForVrender() {\n if (registed) {\n return;\n }\n registed = true;\n // 注册内置组件\n preLoadAllModule();\n\n if (isBrowserEnv()) {\n loadBrowserEnv(container);\n } else if (isNodeEnv()) {\n loadNodeEnv(container);\n }\n registerArc();\n // registerArc3d();\n // registerArea();\n registerCircle();\n // registerGlyph();\n registerGroup();\n registerImage();\n registerLine();\n // registerPath();\n // registerPolygon();\n // registerPyramid3d();\n registerRect();\n // registerRect3d();\n registerRichtext();\n registerShadowRoot();\n registerSymbol();\n registerText();\n registerFlexLayoutPlugin();\n // registerWrapText();\n loadPoptip();\n\n registerFlexLayoutPlugin();\n}\n\nexport type { Direction, Timeline } from '@visactor/vrender-core';\nexport { GroupFadeIn } from '@visactor/vrender-core';\nexport { GroupFadeOut } from '@visactor/vrender-core';\n\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\nexport * from '@visactor/vrender-components';\n"]}
|
package/dist/vtable.js
CHANGED
|
@@ -40774,7 +40774,6 @@
|
|
|
40774
40774
|
y1: y1 - table.scrollTop,
|
|
40775
40775
|
y2: y2 - table.scrollTop
|
|
40776
40776
|
});
|
|
40777
|
-
this.activeChartInstance?.release();
|
|
40778
40777
|
this.activeChartInstance = new this.attribute.ClassType(this.attribute.spec, merge$1({}, this.attribute.tableChartOption, {
|
|
40779
40778
|
renderCanvas: this.attribute.canvas,
|
|
40780
40779
|
mode: 'desktop-browser',
|
|
@@ -48324,7 +48323,6 @@
|
|
|
48324
48323
|
}
|
|
48325
48324
|
const cellGroup = this.getCell(col, row);
|
|
48326
48325
|
cellGroup?.firstChild?.activate?.(this.table);
|
|
48327
|
-
return cellGroup?.firstChild?.activeChartInstance;
|
|
48328
48326
|
}
|
|
48329
48327
|
removeInteractionBorder(col, row) {
|
|
48330
48328
|
const cellGroup = this.getCell(col, row);
|
|
@@ -58165,12 +58163,13 @@
|
|
|
58165
58163
|
if (absoluteY === 0) {
|
|
58166
58164
|
return { top: 0, row: 0, bottom: 0, height: 0 };
|
|
58167
58165
|
}
|
|
58166
|
+
const floorOrRound = _this.options.customConfig?._disableColumnAndRowSizeRound === true ? Math.floor : Math.round;
|
|
58168
58167
|
const findBefore = (startRow, startBottom) => {
|
|
58169
58168
|
let bottom = startBottom;
|
|
58170
58169
|
for (let row = startRow; row >= 0; row--) {
|
|
58171
58170
|
const height = _this.getRowHeight(row);
|
|
58172
58171
|
const top = bottom - height;
|
|
58173
|
-
if (
|
|
58172
|
+
if (floorOrRound(top) <= floorOrRound(absoluteY) && floorOrRound(absoluteY) < floorOrRound(bottom)) {
|
|
58174
58173
|
return {
|
|
58175
58174
|
top,
|
|
58176
58175
|
row,
|
|
@@ -58188,7 +58187,7 @@
|
|
|
58188
58187
|
for (let row = startRow; row < rowCount; row++) {
|
|
58189
58188
|
const height = _this.getRowHeight(row);
|
|
58190
58189
|
const bottom = top + height;
|
|
58191
|
-
if (
|
|
58190
|
+
if (floorOrRound(top) <= floorOrRound(absoluteY) && floorOrRound(absoluteY) < floorOrRound(bottom)) {
|
|
58192
58191
|
return {
|
|
58193
58192
|
top,
|
|
58194
58193
|
row,
|
|
@@ -59501,6 +59500,9 @@
|
|
|
59501
59500
|
return cacheStyle;
|
|
59502
59501
|
}
|
|
59503
59502
|
|
|
59503
|
+
function isInteger(value) {
|
|
59504
|
+
return Math.floor(value) === value;
|
|
59505
|
+
}
|
|
59504
59506
|
class Animateaaa extends ACustomAnimate {
|
|
59505
59507
|
onUpdate(end, ratio, out) {
|
|
59506
59508
|
if (this.from.x !== this.to.x) {
|
|
@@ -59533,10 +59535,30 @@
|
|
|
59533
59535
|
x: this.table.scrollLeft,
|
|
59534
59536
|
y: this.table.scrollTop
|
|
59535
59537
|
};
|
|
59536
|
-
const
|
|
59538
|
+
const { col, row } = position;
|
|
59539
|
+
let colInt = col;
|
|
59540
|
+
let rowInt = row;
|
|
59541
|
+
let colDecimal;
|
|
59542
|
+
let rowDecimal;
|
|
59543
|
+
if (isNumber$4(col) && !isInteger(col)) {
|
|
59544
|
+
colInt = Math.floor(col);
|
|
59545
|
+
colDecimal = col - colInt;
|
|
59546
|
+
}
|
|
59547
|
+
if (isNumber$4(row) && !isInteger(row)) {
|
|
59548
|
+
rowInt = Math.floor(row);
|
|
59549
|
+
rowDecimal = row - rowInt;
|
|
59550
|
+
}
|
|
59551
|
+
const cellRect = this.table.getCellRect(colInt ?? 0, rowInt ?? 0);
|
|
59552
|
+
let { left, top } = cellRect;
|
|
59553
|
+
if (colDecimal) {
|
|
59554
|
+
left += colDecimal * cellRect.width;
|
|
59555
|
+
}
|
|
59556
|
+
if (rowDecimal) {
|
|
59557
|
+
top += rowDecimal * cellRect.height;
|
|
59558
|
+
}
|
|
59537
59559
|
const to = {
|
|
59538
|
-
x: isNumber$4(
|
|
59539
|
-
y: isNumber$4(
|
|
59560
|
+
x: isNumber$4(col) ? left - this.table.getFrozenColsWidth() : this.table.scrollLeft,
|
|
59561
|
+
y: isNumber$4(row) ? top - this.table.getFrozenRowsHeight() : this.table.scrollTop
|
|
59540
59562
|
};
|
|
59541
59563
|
const duration = !isBoolean$4(animationOption) ? animationOption?.duration ?? 3000 : animationOption ? 3000 : 0;
|
|
59542
59564
|
const easing = !isBoolean$4(animationOption) ? animationOption?.easing ?? 'linear' : animationOption ? 'linear' : '';
|
|
@@ -59603,7 +59625,7 @@
|
|
|
59603
59625
|
return TABLE_EVENT_TYPE;
|
|
59604
59626
|
}
|
|
59605
59627
|
options;
|
|
59606
|
-
version = "1.16.3-alpha.
|
|
59628
|
+
version = "1.16.3-alpha.2";
|
|
59607
59629
|
pagination;
|
|
59608
59630
|
id = `VTable${Date.now()}`;
|
|
59609
59631
|
headerStyleCache;
|
|
@@ -80921,80 +80943,6 @@
|
|
|
80921
80943
|
}
|
|
80922
80944
|
return {};
|
|
80923
80945
|
}
|
|
80924
|
-
activateChartInstance(cellHeaderPaths) {
|
|
80925
|
-
const cellAddr = this.getCellAddressByHeaderPaths(cellHeaderPaths);
|
|
80926
|
-
if (cellAddr) {
|
|
80927
|
-
const col = cellAddr.col;
|
|
80928
|
-
const row = cellAddr.row;
|
|
80929
|
-
const cellGroup = this.scenegraph.getCell(col, row);
|
|
80930
|
-
const chartNode = cellGroup?.getChildren()?.[0];
|
|
80931
|
-
const activeChartInstance = this.scenegraph.activateChart(col, row);
|
|
80932
|
-
const { dataId, data, axes, spec } = chartNode.attribute;
|
|
80933
|
-
const viewBox = chartNode.getViewBox();
|
|
80934
|
-
axes?.forEach((axis, index) => {
|
|
80935
|
-
if (axis.type === 'linear') {
|
|
80936
|
-
activeChartInstance.updateModelSpecSync({ type: 'axes', index }, {
|
|
80937
|
-
min: axis.range?.min ?? 0,
|
|
80938
|
-
max: axis.range?.max ?? 0,
|
|
80939
|
-
tick: {
|
|
80940
|
-
tickMode: axis.tick?.tickMode
|
|
80941
|
-
}
|
|
80942
|
-
}, true);
|
|
80943
|
-
}
|
|
80944
|
-
else if (axis.type === 'band') {
|
|
80945
|
-
activeChartInstance.updateModelSpec({ type: 'axes', index }, { domain: axis.domain.slice(0) }, true);
|
|
80946
|
-
}
|
|
80947
|
-
});
|
|
80948
|
-
activeChartInstance.updateViewBox({
|
|
80949
|
-
x1: 0,
|
|
80950
|
-
x2: viewBox.x2 - viewBox.x1,
|
|
80951
|
-
y1: 0,
|
|
80952
|
-
y2: viewBox.y2 - viewBox.y1
|
|
80953
|
-
}, false, false);
|
|
80954
|
-
const chartStage = activeChartInstance.getStage();
|
|
80955
|
-
chartStage.needRender = true;
|
|
80956
|
-
const matrix = chartNode.globalTransMatrix.clone();
|
|
80957
|
-
const stageMatrix = chartNode.stage.window.getViewBoxTransform().clone();
|
|
80958
|
-
stageMatrix.multiply(matrix.a, matrix.b, matrix.c, matrix.d, matrix.e, matrix.f);
|
|
80959
|
-
chartStage.window.setViewBoxTransform(stageMatrix.a, stageMatrix.b, stageMatrix.c, stageMatrix.d, stageMatrix.e, stageMatrix.f);
|
|
80960
|
-
if (typeof dataId === 'string') {
|
|
80961
|
-
activeChartInstance.updateDataSync(dataId, data ?? []);
|
|
80962
|
-
}
|
|
80963
|
-
else {
|
|
80964
|
-
const dataBatch = [];
|
|
80965
|
-
for (const dataIdStr in dataId) {
|
|
80966
|
-
const dataIdAndField = dataId[dataIdStr];
|
|
80967
|
-
const series = spec.series.find((item) => item?.data?.id === dataIdStr);
|
|
80968
|
-
dataBatch.push({
|
|
80969
|
-
id: dataIdStr,
|
|
80970
|
-
values: dataIdAndField
|
|
80971
|
-
? data?.filter((item) => {
|
|
80972
|
-
return item.hasOwnProperty(dataIdAndField);
|
|
80973
|
-
}) ?? []
|
|
80974
|
-
: data ?? [],
|
|
80975
|
-
fields: series?.data?.fields
|
|
80976
|
-
});
|
|
80977
|
-
if (!activeChartInstance.updateFullDataSync) {
|
|
80978
|
-
activeChartInstance.updateDataSync(dataIdStr, dataIdAndField
|
|
80979
|
-
? data?.filter((item) => {
|
|
80980
|
-
return item.hasOwnProperty(dataIdAndField);
|
|
80981
|
-
}) ?? []
|
|
80982
|
-
: data ?? []);
|
|
80983
|
-
}
|
|
80984
|
-
}
|
|
80985
|
-
activeChartInstance.updateFullDataSync?.(dataBatch);
|
|
80986
|
-
}
|
|
80987
|
-
return activeChartInstance;
|
|
80988
|
-
}
|
|
80989
|
-
}
|
|
80990
|
-
replaceChartCacheImage(cellHeaderPaths, chartInstance) {
|
|
80991
|
-
const cellAddr = this.getCellAddressByHeaderPaths(cellHeaderPaths);
|
|
80992
|
-
if (cellAddr) {
|
|
80993
|
-
const cellGroup = this.scenegraph.getCell(cellAddr.col, cellAddr.row);
|
|
80994
|
-
const chartNode = cellGroup?.getChildren()?.[0];
|
|
80995
|
-
cacheStageCanvas(chartInstance.getStage(), chartNode);
|
|
80996
|
-
}
|
|
80997
|
-
}
|
|
80998
80946
|
_getDimensionSortArray() {
|
|
80999
80947
|
if (this.options?.axes?.length) {
|
|
81000
80948
|
const dimensionAxisOrient = this.options.indicatorsAsCol ? 'left' : 'bottom';
|
|
@@ -81657,7 +81605,7 @@
|
|
|
81657
81605
|
}
|
|
81658
81606
|
|
|
81659
81607
|
registerForVrender();
|
|
81660
|
-
const version = "1.16.3-alpha.
|
|
81608
|
+
const version = "1.16.3-alpha.2";
|
|
81661
81609
|
function getIcons() {
|
|
81662
81610
|
return get$2();
|
|
81663
81611
|
}
|