@visactor/vtable 1.26.2 → 1.26.3
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.js +7 -6
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/body-helper/style.js +2 -1
- package/cjs/core/BaseTable.js +8 -9
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/dataset/DataStatistics.js +1 -2
- package/cjs/edit/edit-manager.js +1 -0
- package/cjs/event/listener/table-group.js +52 -52
- package/cjs/event/listener/table-group.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/pivot-header-layout.d.ts +2 -2
- package/cjs/scenegraph/component/custom.js +2 -2
- package/cjs/scenegraph/component/custom.js.map +1 -1
- package/cjs/scenegraph/component/table-component.js +41 -50
- package/cjs/scenegraph/component/table-component.js.map +1 -1
- package/cjs/scenegraph/component/util.d.ts +1 -0
- package/cjs/scenegraph/component/util.js +9 -1
- package/cjs/scenegraph/component/util.js.map +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
- package/cjs/scenegraph/layout/frozen.js +7 -3
- package/cjs/scenegraph/layout/frozen.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js +5 -3
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/utils/padding.d.ts +5 -2
- package/cjs/scenegraph/utils/padding.js +16 -13
- package/cjs/scenegraph/utils/padding.js.map +1 -1
- package/cjs/state/state.js +15 -15
- package/cjs/state/state.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +169 -115
- package/dist/vtable.min.js +1 -1
- package/es/PivotTable.js +7 -6
- package/es/PivotTable.js.map +1 -1
- package/es/body-helper/style.js +2 -1
- package/es/core/BaseTable.js +8 -9
- package/es/core/BaseTable.js.map +1 -1
- package/es/dataset/DataStatistics.js +1 -2
- package/es/edit/edit-manager.js +2 -1
- package/es/event/listener/table-group.js +52 -52
- package/es/event/listener/table-group.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/pivot-header-layout.d.ts +2 -2
- package/es/scenegraph/component/custom.js +2 -2
- package/es/scenegraph/component/custom.js.map +1 -1
- package/es/scenegraph/component/table-component.js +41 -51
- package/es/scenegraph/component/table-component.js.map +1 -1
- package/es/scenegraph/component/util.d.ts +1 -0
- package/es/scenegraph/component/util.js +6 -0
- package/es/scenegraph/component/util.js.map +1 -1
- package/es/scenegraph/layout/compute-col-width.js +1 -1
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.js +1 -1
- package/es/scenegraph/layout/compute-row-height.js.map +1 -1
- package/es/scenegraph/layout/frozen.js +7 -3
- package/es/scenegraph/layout/frozen.js.map +1 -1
- package/es/scenegraph/scenegraph.js +5 -3
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/utils/padding.d.ts +5 -2
- package/es/scenegraph/utils/padding.js +13 -9
- package/es/scenegraph/utils/padding.js.map +1 -1
- package/es/state/state.js +15 -13
- package/es/state/state.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +2 -2
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;AAOD,yDAAuC;AACvC,yDAAuC;AACvC,+DAA6C;AAC7C,4DAA0C","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.26.
|
|
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;AAOD,yDAAuC;AACvC,yDAAuC;AACvC,+DAA6C;AAC7C,4DAA0C","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.26.3\";\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 } from '@visactor/vrender-core';\nexport type { State } from '@visactor/vrender-components';\n// export { GroupFadeIn } from '@visactor/vrender-core';\n// export { GroupFadeOut } from '@visactor/vrender-core';\n\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\nexport * from '@visactor/vrender-components';\nexport * from '@visactor/vrender-animate';\n"]}
|
package/dist/vtable.js
CHANGED
|
@@ -41965,26 +41965,53 @@
|
|
|
41965
41965
|
return parse$2(font);
|
|
41966
41966
|
}
|
|
41967
41967
|
|
|
41968
|
-
function
|
|
41969
|
-
if (
|
|
41970
|
-
|
|
41971
|
-
|
|
41972
|
-
|
|
41973
|
-
|
|
41974
|
-
|
|
41975
|
-
|
|
41976
|
-
|
|
41977
|
-
|
|
41968
|
+
function normalizeQuadArray(values) {
|
|
41969
|
+
if (values.length === 0) {
|
|
41970
|
+
return [0, 0, 0, 0];
|
|
41971
|
+
}
|
|
41972
|
+
if (values.length === 1) {
|
|
41973
|
+
return [values[0], values[0], values[0], values[0]];
|
|
41974
|
+
}
|
|
41975
|
+
if (values.length === 2) {
|
|
41976
|
+
return [values[0], values[1], values[0], values[1]];
|
|
41977
|
+
}
|
|
41978
|
+
if (values.length === 3) {
|
|
41979
|
+
return [values[0], values[1], values[2], values[1]];
|
|
41978
41980
|
}
|
|
41979
|
-
|
|
41980
|
-
|
|
41981
|
-
|
|
41982
|
-
|
|
41983
|
-
|
|
41981
|
+
return [values[0], values[1], values[2], values[3]];
|
|
41982
|
+
}
|
|
41983
|
+
function parseStringQuad(padding) {
|
|
41984
|
+
const tokens = padding.trim().split(/\s+/);
|
|
41985
|
+
const values = tokens.map(token => Number.parseFloat(token)).filter(value => Number.isFinite(value));
|
|
41986
|
+
if (values.length === tokens.length && values.length > 0) {
|
|
41987
|
+
return normalizeQuadArray(values);
|
|
41988
|
+
}
|
|
41989
|
+
return [padding, padding, padding, padding];
|
|
41990
|
+
}
|
|
41991
|
+
function normalizePaddingObject(paddingOrigin) {
|
|
41992
|
+
if (Number.isFinite(paddingOrigin.bottom) ||
|
|
41993
|
+
Number.isFinite(paddingOrigin.left) ||
|
|
41994
|
+
Number.isFinite(paddingOrigin.right) ||
|
|
41995
|
+
Number.isFinite(paddingOrigin.top)) {
|
|
41984
41996
|
return [paddingOrigin.top ?? 0, paddingOrigin.right ?? 0, paddingOrigin.bottom ?? 0, paddingOrigin.left ?? 0];
|
|
41985
41997
|
}
|
|
41986
41998
|
return [0, 0, 0, 0];
|
|
41987
41999
|
}
|
|
42000
|
+
function getQuadProps(paddingOrigin) {
|
|
42001
|
+
if (Array.isArray(paddingOrigin)) {
|
|
42002
|
+
return normalizeQuadArray(paddingOrigin.slice(0, 4));
|
|
42003
|
+
}
|
|
42004
|
+
if (typeof paddingOrigin === 'number' && Number.isFinite(paddingOrigin)) {
|
|
42005
|
+
return [paddingOrigin, paddingOrigin, paddingOrigin, paddingOrigin];
|
|
42006
|
+
}
|
|
42007
|
+
if (typeof paddingOrigin === 'string') {
|
|
42008
|
+
return parseStringQuad(paddingOrigin);
|
|
42009
|
+
}
|
|
42010
|
+
if (paddingOrigin && typeof paddingOrigin === 'object') {
|
|
42011
|
+
return normalizePaddingObject(paddingOrigin);
|
|
42012
|
+
}
|
|
42013
|
+
return [0, 0, 0, 0];
|
|
42014
|
+
}
|
|
41988
42015
|
|
|
41989
42016
|
const TYPE_PAREN = 0;
|
|
41990
42017
|
const TYPE_UNIT = 1;
|
|
@@ -43506,7 +43533,7 @@
|
|
|
43506
43533
|
col: range?.start.col ?? col,
|
|
43507
43534
|
row: range?.start.row ?? row,
|
|
43508
43535
|
dataValue: table.getCellOriginValue(col, row),
|
|
43509
|
-
value: table.getCellValue(col, row)
|
|
43536
|
+
value: table.getCellValue(col, row),
|
|
43510
43537
|
rect: {
|
|
43511
43538
|
left: 0,
|
|
43512
43539
|
top: 0,
|
|
@@ -43542,7 +43569,7 @@
|
|
|
43542
43569
|
col,
|
|
43543
43570
|
row,
|
|
43544
43571
|
dataValue: table.getCellOriginValue(col, row),
|
|
43545
|
-
value: table.getCellValue(col, row)
|
|
43572
|
+
value: table.getCellValue(col, row),
|
|
43546
43573
|
rect: {
|
|
43547
43574
|
left: 0,
|
|
43548
43575
|
top: 0,
|
|
@@ -46985,7 +47012,7 @@
|
|
|
46985
47012
|
col: cellRange?.start.col ?? col,
|
|
46986
47013
|
row: cellRange?.start.row ?? row,
|
|
46987
47014
|
dataValue: table.getCellOriginValue(col, row),
|
|
46988
|
-
value: table.getCellValue(col, row)
|
|
47015
|
+
value: table.getCellValue(col, row),
|
|
46989
47016
|
rect: getCellRect$1(col, row, table),
|
|
46990
47017
|
table,
|
|
46991
47018
|
originCol: col,
|
|
@@ -48343,6 +48370,16 @@
|
|
|
48343
48370
|
}
|
|
48344
48371
|
}
|
|
48345
48372
|
|
|
48373
|
+
function getBodyHorizontalScrollRange(table) {
|
|
48374
|
+
const totalWidth = table.getAllColsWidth();
|
|
48375
|
+
const frozenColsWidth = table.getFrozenColsWidth();
|
|
48376
|
+
const rightFrozenColsWidth = table.getRightFrozenColsWidth();
|
|
48377
|
+
const frozenColsContentWidth = table.getFrozenColsContentWidth?.() ?? frozenColsWidth;
|
|
48378
|
+
const rightFrozenColsContentWidth = table.getRightFrozenColsContentWidth?.() ?? rightFrozenColsWidth;
|
|
48379
|
+
const bodyViewportWidth = table.tableNoFrameWidth - frozenColsWidth - rightFrozenColsWidth;
|
|
48380
|
+
const bodyContentWidth = totalWidth - frozenColsContentWidth - rightFrozenColsContentWidth;
|
|
48381
|
+
return Math.max(0, bodyContentWidth - bodyViewportWidth);
|
|
48382
|
+
}
|
|
48346
48383
|
function getColX(col, table, isRightFrozen) {
|
|
48347
48384
|
if (isRightFrozen) {
|
|
48348
48385
|
return (Math.min(table.tableNoFrameWidth, table.getAllColsWidth()) -
|
|
@@ -48699,24 +48736,25 @@
|
|
|
48699
48736
|
const rightFrozenColsContentWidth = this.table.getRightFrozenColsContentWidth?.() ?? rightFrozenColsWidth;
|
|
48700
48737
|
const hoverOn = this.table.theme.scrollStyle.hoverOn;
|
|
48701
48738
|
const sizeTolerance = this.table.options.customConfig?._disableColumnAndRowSizeRound ? 1 : 0;
|
|
48702
|
-
|
|
48703
|
-
|
|
48739
|
+
const bodyScrollRange = getBodyHorizontalScrollRange(this.table);
|
|
48740
|
+
const y = Math.min(tableHeight, totalHeight);
|
|
48741
|
+
let attrY = 0;
|
|
48742
|
+
if (this.table.theme.scrollStyle.barToSide) {
|
|
48743
|
+
attrY =
|
|
48744
|
+
this.table.tableNoFrameHeight -
|
|
48745
|
+
(hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.y) +
|
|
48746
|
+
this.table.tableY;
|
|
48747
|
+
}
|
|
48748
|
+
else {
|
|
48749
|
+
attrY = y - (hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.y);
|
|
48750
|
+
}
|
|
48751
|
+
const ignoreFrozenCols = this.table.theme.scrollStyle?.ignoreFrozenCols ?? false;
|
|
48752
|
+
if (bodyScrollRange > sizeTolerance) {
|
|
48704
48753
|
const bodyViewportWidth = tableWidth - frozenColsWidth - rightFrozenColsWidth;
|
|
48705
|
-
const bodyContentWidth =
|
|
48754
|
+
const bodyContentWidth = bodyViewportWidth + bodyScrollRange;
|
|
48706
48755
|
const rangeEnd = bodyContentWidth > 0 ? Math.max(0.05, bodyViewportWidth / bodyContentWidth) : 1;
|
|
48707
|
-
let attrY = 0;
|
|
48708
|
-
if (this.table.theme.scrollStyle.barToSide) {
|
|
48709
|
-
attrY =
|
|
48710
|
-
this.table.tableNoFrameHeight -
|
|
48711
|
-
(hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.y) +
|
|
48712
|
-
this.table.tableY;
|
|
48713
|
-
}
|
|
48714
|
-
else {
|
|
48715
|
-
attrY = y - (hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.y);
|
|
48716
|
-
}
|
|
48717
48756
|
let hScrollBarx = frozenColsWidth + (!hoverOn ? this.table.scenegraph.tableGroup.attribute.x : 0);
|
|
48718
48757
|
let hScrollBarWidth = tableWidth - frozenColsWidth - rightFrozenColsWidth;
|
|
48719
|
-
const ignoreFrozenCols = this.table.theme.scrollStyle?.ignoreFrozenCols ?? false;
|
|
48720
48758
|
if (ignoreFrozenCols) {
|
|
48721
48759
|
hScrollBarx = !hoverOn ? this.table.scenegraph.tableGroup.attribute.x : 0;
|
|
48722
48760
|
hScrollBarWidth = tableWidth;
|
|
@@ -48740,62 +48778,6 @@
|
|
|
48740
48778
|
if (horizontalVisible === 'always') {
|
|
48741
48779
|
this.hScrollBar.showAll();
|
|
48742
48780
|
}
|
|
48743
|
-
const frozenScrollable = this.table.options.scrollFrozenCols && this.table.getFrozenColsOffset() > 0;
|
|
48744
|
-
if (!ignoreFrozenCols && frozenScrollable) {
|
|
48745
|
-
const frozenRangeEnd = Math.max(0.05, frozenColsWidth / frozenColsContentWidth);
|
|
48746
|
-
const x = !hoverOn ? this.table.scenegraph.tableGroup.attribute.x : 0;
|
|
48747
|
-
this.frozenHScrollBar.setAttributes({
|
|
48748
|
-
x,
|
|
48749
|
-
y: attrY,
|
|
48750
|
-
width: frozenColsWidth,
|
|
48751
|
-
range: [0, frozenRangeEnd],
|
|
48752
|
-
visible: horizontalVisible === 'always'
|
|
48753
|
-
});
|
|
48754
|
-
const bounds = this.frozenHScrollBar.AABBBounds && this.frozenHScrollBar.globalAABBBounds;
|
|
48755
|
-
this.frozenHScrollBar._viewPosition = {
|
|
48756
|
-
x: bounds.x1,
|
|
48757
|
-
y: bounds.y1
|
|
48758
|
-
};
|
|
48759
|
-
if (horizontalVisible === 'always') {
|
|
48760
|
-
this.frozenHScrollBar.showAll();
|
|
48761
|
-
}
|
|
48762
|
-
}
|
|
48763
|
-
else {
|
|
48764
|
-
this.frozenHScrollBar.setAttributes({
|
|
48765
|
-
x: -this.table.tableNoFrameWidth * 2,
|
|
48766
|
-
y: -this.table.tableNoFrameHeight * 2,
|
|
48767
|
-
width: 0,
|
|
48768
|
-
visible: false
|
|
48769
|
-
});
|
|
48770
|
-
}
|
|
48771
|
-
const rightFrozenScrollable = this.table.options.scrollRightFrozenCols && this.table.getRightFrozenColsOffset() > 0;
|
|
48772
|
-
if (!ignoreFrozenCols && rightFrozenScrollable) {
|
|
48773
|
-
const rightFrozenRangeEnd = Math.max(0.05, rightFrozenColsWidth / rightFrozenColsContentWidth);
|
|
48774
|
-
const x = tableWidth - rightFrozenColsWidth + (!hoverOn ? this.table.scenegraph.tableGroup.attribute.x : 0);
|
|
48775
|
-
this.rightFrozenHScrollBar.setAttributes({
|
|
48776
|
-
x,
|
|
48777
|
-
y: attrY,
|
|
48778
|
-
width: rightFrozenColsWidth,
|
|
48779
|
-
range: [0, rightFrozenRangeEnd],
|
|
48780
|
-
visible: horizontalVisible === 'always'
|
|
48781
|
-
});
|
|
48782
|
-
const bounds = this.rightFrozenHScrollBar.AABBBounds && this.rightFrozenHScrollBar.globalAABBBounds;
|
|
48783
|
-
this.rightFrozenHScrollBar._viewPosition = {
|
|
48784
|
-
x: bounds.x1,
|
|
48785
|
-
y: bounds.y1
|
|
48786
|
-
};
|
|
48787
|
-
if (horizontalVisible === 'always') {
|
|
48788
|
-
this.rightFrozenHScrollBar.showAll();
|
|
48789
|
-
}
|
|
48790
|
-
}
|
|
48791
|
-
else {
|
|
48792
|
-
this.rightFrozenHScrollBar.setAttributes({
|
|
48793
|
-
x: -this.table.tableNoFrameWidth * 2,
|
|
48794
|
-
y: -this.table.tableNoFrameHeight * 2,
|
|
48795
|
-
width: 0,
|
|
48796
|
-
visible: false
|
|
48797
|
-
});
|
|
48798
|
-
}
|
|
48799
48781
|
}
|
|
48800
48782
|
else {
|
|
48801
48783
|
this.hScrollBar.setAttributes({
|
|
@@ -48804,12 +48786,56 @@
|
|
|
48804
48786
|
width: 0,
|
|
48805
48787
|
visible: false
|
|
48806
48788
|
});
|
|
48789
|
+
}
|
|
48790
|
+
const frozenScrollable = this.table.options.scrollFrozenCols && this.table.getFrozenColsOffset() > 0;
|
|
48791
|
+
if (!ignoreFrozenCols && frozenScrollable) {
|
|
48792
|
+
const frozenRangeEnd = Math.max(0.05, frozenColsWidth / frozenColsContentWidth);
|
|
48793
|
+
const x = !hoverOn ? this.table.scenegraph.tableGroup.attribute.x : 0;
|
|
48794
|
+
this.frozenHScrollBar.setAttributes({
|
|
48795
|
+
x,
|
|
48796
|
+
y: attrY,
|
|
48797
|
+
width: frozenColsWidth,
|
|
48798
|
+
range: [0, frozenRangeEnd],
|
|
48799
|
+
visible: horizontalVisible === 'always'
|
|
48800
|
+
});
|
|
48801
|
+
const bounds = this.frozenHScrollBar.AABBBounds && this.frozenHScrollBar.globalAABBBounds;
|
|
48802
|
+
this.frozenHScrollBar._viewPosition = {
|
|
48803
|
+
x: bounds.x1,
|
|
48804
|
+
y: bounds.y1
|
|
48805
|
+
};
|
|
48806
|
+
if (horizontalVisible === 'always') {
|
|
48807
|
+
this.frozenHScrollBar.showAll();
|
|
48808
|
+
}
|
|
48809
|
+
}
|
|
48810
|
+
else {
|
|
48807
48811
|
this.frozenHScrollBar.setAttributes({
|
|
48808
48812
|
x: -this.table.tableNoFrameWidth * 2,
|
|
48809
48813
|
y: -this.table.tableNoFrameHeight * 2,
|
|
48810
48814
|
width: 0,
|
|
48811
48815
|
visible: false
|
|
48812
48816
|
});
|
|
48817
|
+
}
|
|
48818
|
+
const rightFrozenScrollable = this.table.options.scrollRightFrozenCols && this.table.getRightFrozenColsOffset() > 0;
|
|
48819
|
+
if (!ignoreFrozenCols && rightFrozenScrollable) {
|
|
48820
|
+
const rightFrozenRangeEnd = Math.max(0.05, rightFrozenColsWidth / rightFrozenColsContentWidth);
|
|
48821
|
+
const x = tableWidth - rightFrozenColsWidth + (!hoverOn ? this.table.scenegraph.tableGroup.attribute.x : 0);
|
|
48822
|
+
this.rightFrozenHScrollBar.setAttributes({
|
|
48823
|
+
x,
|
|
48824
|
+
y: attrY,
|
|
48825
|
+
width: rightFrozenColsWidth,
|
|
48826
|
+
range: [0, rightFrozenRangeEnd],
|
|
48827
|
+
visible: horizontalVisible === 'always'
|
|
48828
|
+
});
|
|
48829
|
+
const bounds = this.rightFrozenHScrollBar.AABBBounds && this.rightFrozenHScrollBar.globalAABBBounds;
|
|
48830
|
+
this.rightFrozenHScrollBar._viewPosition = {
|
|
48831
|
+
x: bounds.x1,
|
|
48832
|
+
y: bounds.y1
|
|
48833
|
+
};
|
|
48834
|
+
if (horizontalVisible === 'always') {
|
|
48835
|
+
this.rightFrozenHScrollBar.showAll();
|
|
48836
|
+
}
|
|
48837
|
+
}
|
|
48838
|
+
else {
|
|
48813
48839
|
this.rightFrozenHScrollBar.setAttributes({
|
|
48814
48840
|
x: -this.table.tableNoFrameWidth * 2,
|
|
48815
48841
|
y: -this.table.tableNoFrameHeight * 2,
|
|
@@ -53541,7 +53567,7 @@
|
|
|
53541
53567
|
col: cellRange?.start.col ?? col,
|
|
53542
53568
|
row: cellRange?.start.row ?? row,
|
|
53543
53569
|
dataValue: table.getCellOriginValue(col, row),
|
|
53544
|
-
value: table.getCellValue(col, row)
|
|
53570
|
+
value: table.getCellValue(col, row),
|
|
53545
53571
|
rect: getCellRect(col, row, table),
|
|
53546
53572
|
table,
|
|
53547
53573
|
originCol: col,
|
|
@@ -57300,7 +57326,9 @@
|
|
|
57300
57326
|
const headerColGroup = scene.getColGroup(col, true);
|
|
57301
57327
|
insertBefore(rightTopCornerGroup, headerColGroup, rightTopCornerGroup.firstChild);
|
|
57302
57328
|
const bottomColGroup = scene.getColGroupInBottom(col);
|
|
57303
|
-
|
|
57329
|
+
if (bottomColGroup) {
|
|
57330
|
+
insertBefore(rightBottomCornerGroup, bottomColGroup, rightBottomCornerGroup.firstChild);
|
|
57331
|
+
}
|
|
57304
57332
|
}
|
|
57305
57333
|
let x = 0;
|
|
57306
57334
|
rightFrozenGroup.forEachChildren((columnGroup) => {
|
|
@@ -57327,9 +57355,11 @@
|
|
|
57327
57355
|
headerColGroup.setAttribute('x', colHeaderGroup.lastChild.attribute.x + table.getColWidth(colHeaderGroup.lastChild.col));
|
|
57328
57356
|
colHeaderGroup.appendChild(headerColGroup);
|
|
57329
57357
|
const bottomColGroup = scene.getColGroupInRightBottomCorner(col);
|
|
57330
|
-
bottomColGroup
|
|
57331
|
-
|
|
57332
|
-
|
|
57358
|
+
if (bottomColGroup) {
|
|
57359
|
+
const lastBottomColGroup = bottomFrozenGroup.lastChild;
|
|
57360
|
+
bottomColGroup.setAttribute('x', lastBottomColGroup ? lastBottomColGroup.attribute.x + table.getColWidth(lastBottomColGroup.col) : 0);
|
|
57361
|
+
bottomFrozenGroup.appendChild(bottomColGroup);
|
|
57362
|
+
}
|
|
57333
57363
|
}
|
|
57334
57364
|
let x = 0;
|
|
57335
57365
|
rightFrozenGroup.forEachChildren((columnGroup) => {
|
|
@@ -59886,6 +59916,9 @@
|
|
|
59886
59916
|
lastBodyCol.attribute.x -
|
|
59887
59917
|
lastBodyCol.attribute.width;
|
|
59888
59918
|
}
|
|
59919
|
+
if (this.table.options.scrollFrozenCols && x > 0) {
|
|
59920
|
+
x = 0;
|
|
59921
|
+
}
|
|
59889
59922
|
if (this.table.getFrozenColsWidth() + x === this.bodyGroup.attribute.x) {
|
|
59890
59923
|
return;
|
|
59891
59924
|
}
|
|
@@ -59999,11 +60032,17 @@
|
|
|
59999
60032
|
this.rowHeaderGroup.forEachChildrenSkipChild((column) => {
|
|
60000
60033
|
rowHeaderWidth += column.attribute.width;
|
|
60001
60034
|
});
|
|
60035
|
+
if (table.options.scrollFrozenCols) {
|
|
60036
|
+
rowHeaderWidth = table.getFrozenColsWidth();
|
|
60037
|
+
}
|
|
60002
60038
|
this.rowHeaderGroup.setAttribute('width', rowHeaderWidth);
|
|
60003
60039
|
let cornerHeaderWidth = 0;
|
|
60004
60040
|
this.cornerHeaderGroup.forEachChildrenSkipChild((column) => {
|
|
60005
60041
|
cornerHeaderWidth += column.attribute.width;
|
|
60006
60042
|
});
|
|
60043
|
+
if (table.options.scrollFrozenCols) {
|
|
60044
|
+
cornerHeaderWidth = table.getFrozenColsWidth();
|
|
60045
|
+
}
|
|
60007
60046
|
this.cornerHeaderGroup.setAttribute('width', cornerHeaderWidth);
|
|
60008
60047
|
this.colHeaderGroup.setAttribute('x', this.cornerHeaderGroup.attribute.width);
|
|
60009
60048
|
this.rowHeaderGroup.setAttribute('y', this.cornerHeaderGroup.attribute.height);
|
|
@@ -63741,11 +63780,8 @@
|
|
|
63741
63780
|
}
|
|
63742
63781
|
}
|
|
63743
63782
|
updateHorizontalScrollBar(xRatio) {
|
|
63744
|
-
const totalWidth = this.table.getAllColsWidth();
|
|
63745
63783
|
const oldHorizontalBarPos = this.scroll.horizontalBarPos;
|
|
63746
|
-
const
|
|
63747
|
-
const rightFrozenOffset = this.table.getRightFrozenColsOffset?.() ?? 0;
|
|
63748
|
-
const scrollRange = Math.max(0, totalWidth - this.table.scenegraph.width - frozenOffset - rightFrozenOffset);
|
|
63784
|
+
const scrollRange = getBodyHorizontalScrollRange(this.table);
|
|
63749
63785
|
let horizontalBarPos = Math.ceil(xRatio * scrollRange);
|
|
63750
63786
|
if (!isValid$1(horizontalBarPos) || isNaN(horizontalBarPos)) {
|
|
63751
63787
|
horizontalBarPos = 0;
|
|
@@ -63855,10 +63891,7 @@
|
|
|
63855
63891
|
return;
|
|
63856
63892
|
}
|
|
63857
63893
|
this.table.scrollLeft;
|
|
63858
|
-
const
|
|
63859
|
-
const frozenOffset = this.table.getFrozenColsOffset?.() ?? 0;
|
|
63860
|
-
const rightFrozenOffset = this.table.getRightFrozenColsOffset?.() ?? 0;
|
|
63861
|
-
const scrollRange = Math.max(0, totalWidth - this.table.scenegraph.width - frozenOffset - rightFrozenOffset);
|
|
63894
|
+
const scrollRange = getBodyHorizontalScrollRange(this.table);
|
|
63862
63895
|
const sizeTolerance = this.table.options.customConfig?._disableColumnAndRowSizeRound ? 1 : 0;
|
|
63863
63896
|
left = Math.max(0, Math.min(left, scrollRange - sizeTolerance));
|
|
63864
63897
|
left = Math.ceil(left);
|
|
@@ -65133,15 +65166,19 @@
|
|
|
65133
65166
|
if (e.button !== 0) {
|
|
65134
65167
|
return;
|
|
65135
65168
|
}
|
|
65169
|
+
const endedResizeCol = stateManager.isResizeCol();
|
|
65170
|
+
const endedResizeRow = stateManager.isResizeRow();
|
|
65171
|
+
const endedMoveCol = stateManager.isMoveCol();
|
|
65172
|
+
const shouldSkipClickCell = endedResizeCol || endedResizeRow;
|
|
65136
65173
|
if (stateManager.interactionState === 'grabing') {
|
|
65137
65174
|
stateManager.updateInteractionState(InteractionState.default);
|
|
65138
|
-
if (
|
|
65175
|
+
if (endedResizeCol) {
|
|
65139
65176
|
endResizeCol(table);
|
|
65140
65177
|
}
|
|
65141
|
-
else if (
|
|
65178
|
+
else if (endedResizeRow) {
|
|
65142
65179
|
endResizeRow(table);
|
|
65143
65180
|
}
|
|
65144
|
-
else if (
|
|
65181
|
+
else if (endedMoveCol) {
|
|
65145
65182
|
const endMoveColSuccess = table.stateManager.endMoveCol();
|
|
65146
65183
|
fireMoveColEventListeners(table, endMoveColSuccess, e.nativeEvent);
|
|
65147
65184
|
}
|
|
@@ -65171,7 +65208,7 @@
|
|
|
65171
65208
|
else if (stateManager.interactionState === InteractionState.scrolling) {
|
|
65172
65209
|
stateManager.updateInteractionState(InteractionState.default);
|
|
65173
65210
|
}
|
|
65174
|
-
if (!table.eventManager.isDraging) {
|
|
65211
|
+
if (!table.eventManager.isDraging && !shouldSkipClickCell) {
|
|
65175
65212
|
const eventArgsSet = getEventArgsSet(e);
|
|
65176
65213
|
if (!eventManager.isTouchMove &&
|
|
65177
65214
|
e.button === 0 &&
|
|
@@ -72022,7 +72059,7 @@
|
|
|
72022
72059
|
return TABLE_EVENT_TYPE;
|
|
72023
72060
|
}
|
|
72024
72061
|
options;
|
|
72025
|
-
version = "1.26.
|
|
72062
|
+
version = "1.26.3";
|
|
72026
72063
|
pagination;
|
|
72027
72064
|
id = `VTable${Date.now()}`;
|
|
72028
72065
|
headerStyleCache;
|
|
@@ -75436,18 +75473,21 @@
|
|
|
75436
75473
|
}, delay);
|
|
75437
75474
|
}
|
|
75438
75475
|
scrollToRow(row, animationOption) {
|
|
75439
|
-
const targetRow = Math.min(Math.max(
|
|
75476
|
+
const targetRow = Math.min(Math.max(row, 0), this.rowCount - 1);
|
|
75477
|
+
const targetRowInt = Math.floor(targetRow);
|
|
75440
75478
|
this.clearCorrectTimer();
|
|
75441
75479
|
if (!animationOption) {
|
|
75442
|
-
this.scrollToCell({ row:
|
|
75443
|
-
this._scheduleScrollToRowCorrect(
|
|
75480
|
+
this.scrollToCell({ row: targetRowInt });
|
|
75481
|
+
this._scheduleScrollToRowCorrect(targetRowInt);
|
|
75444
75482
|
return;
|
|
75445
75483
|
}
|
|
75446
75484
|
const duration = !isBoolean$2(animationOption) ? animationOption?.duration ?? 3000 : 3000;
|
|
75447
75485
|
this.animationManager.scrollTo({ row: targetRow }, animationOption);
|
|
75448
|
-
|
|
75449
|
-
this.
|
|
75450
|
-
|
|
75486
|
+
if (targetRowInt === targetRow) {
|
|
75487
|
+
this._scrollToRowCorrectTimer = setTimeout(() => {
|
|
75488
|
+
this.scrollToRow(targetRowInt, false);
|
|
75489
|
+
}, duration);
|
|
75490
|
+
}
|
|
75451
75491
|
}
|
|
75452
75492
|
scrollToCol(col, animationOption) {
|
|
75453
75493
|
if (!animationOption) {
|
|
@@ -94143,6 +94183,7 @@
|
|
|
94143
94183
|
const getMaxScrollTop = () => Math.max(0, this.getAllRowsHeight() - (this.scenegraph?.height ?? this.tableNoFrameHeight) - sizeTolerance);
|
|
94144
94184
|
const oldMaxScrollTop = getMaxScrollTop();
|
|
94145
94185
|
const isScrollToBottom = oldMaxScrollTop > 0 && this.scrollTop >= oldMaxScrollTop - 1;
|
|
94186
|
+
const oldScrollTop = this.scrollTop;
|
|
94146
94187
|
const visibleStartRow = this.getBodyVisibleRowRange().rowStart;
|
|
94147
94188
|
this.internalProps._oldRowCount = this.rowCount;
|
|
94148
94189
|
this.internalProps._oldColCount = this.colCount;
|
|
@@ -94159,6 +94200,9 @@
|
|
|
94159
94200
|
}
|
|
94160
94201
|
}
|
|
94161
94202
|
const isChangeRowTree = this.internalProps.layoutMap.isRowHeader(col, row);
|
|
94203
|
+
const oldHierarchyState = isChangeRowTree ? this.getHierarchyState(col, row) : undefined;
|
|
94204
|
+
const shouldKeepBottomAfterToggle = isScrollToBottom && oldHierarchyState === 'expand';
|
|
94205
|
+
const shouldKeepScrollAfterToggle = isChangeRowTree && !shouldKeepBottomAfterToggle;
|
|
94162
94206
|
const result = isChangeRowTree
|
|
94163
94207
|
? this.internalProps.layoutMap.toggleHierarchyState(col, row)
|
|
94164
94208
|
: this.internalProps.layoutMap.toggleHierarchyStateForColumnTree(col, row);
|
|
@@ -94180,16 +94224,26 @@
|
|
|
94180
94224
|
this.clearCellStyleCache();
|
|
94181
94225
|
this.scenegraph.createSceneGraph();
|
|
94182
94226
|
this.scrollToRow(visibleStartRow);
|
|
94183
|
-
if (
|
|
94227
|
+
if (shouldKeepBottomAfterToggle) {
|
|
94184
94228
|
this.clearCorrectTimer();
|
|
94185
94229
|
this.setScrollTop(Number.MAX_SAFE_INTEGER);
|
|
94186
94230
|
}
|
|
94231
|
+
else if (shouldKeepScrollAfterToggle) {
|
|
94232
|
+
this.clearCorrectTimer();
|
|
94233
|
+
this.setScrollTop(oldScrollTop);
|
|
94234
|
+
}
|
|
94187
94235
|
}
|
|
94188
94236
|
this.reactCustomLayout?.updateAllCustomCell();
|
|
94189
|
-
if (
|
|
94237
|
+
if (shouldKeepBottomAfterToggle) {
|
|
94190
94238
|
this.clearCorrectTimer();
|
|
94191
94239
|
this.setScrollTop(Number.MAX_SAFE_INTEGER);
|
|
94192
94240
|
}
|
|
94241
|
+
else if (shouldKeepScrollAfterToggle &&
|
|
94242
|
+
this.rowHierarchyType !== 'grid-tree' &&
|
|
94243
|
+
this.columnHierarchyType !== 'grid-tree') {
|
|
94244
|
+
this.clearCorrectTimer();
|
|
94245
|
+
this.setScrollTop(oldScrollTop);
|
|
94246
|
+
}
|
|
94193
94247
|
if (checkHasChart) {
|
|
94194
94248
|
if (this.autoFillWidth && !notFillWidth) {
|
|
94195
94249
|
notFillWidth = this.getAllColsWidth() <= this.tableNoFrameWidth;
|
|
@@ -96669,7 +96723,7 @@
|
|
|
96669
96723
|
}
|
|
96670
96724
|
|
|
96671
96725
|
registerForVrender();
|
|
96672
|
-
const version = "1.26.
|
|
96726
|
+
const version = "1.26.3";
|
|
96673
96727
|
function getIcons() {
|
|
96674
96728
|
return get$2();
|
|
96675
96729
|
}
|