@visactor/vtable 1.23.0 → 1.23.1-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -0
- package/cjs/ListTable.js +12 -8
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.js +13 -6
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable.js +16 -9
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/components/legend/continue-legend/continue-legend.js +5 -4
- package/cjs/components/legend/continue-legend/continue-legend.js.map +1 -1
- package/cjs/components/legend/discrete-legend/discrete-legend.js +5 -4
- package/cjs/components/legend/discrete-legend/discrete-legend.js.map +1 -1
- package/cjs/components/title/title.js +4 -4
- package/cjs/components/title/title.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +4 -0
- package/cjs/core/BaseTable.js +26 -18
- package/cjs/core/BaseTable.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/ts-types/base-table.d.ts +5 -0
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +96 -43
- package/dist/vtable.min.js +1 -1
- package/es/ListTable.js +12 -8
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.js +13 -6
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable.js +16 -9
- package/es/PivotTable.js.map +1 -1
- package/es/components/legend/continue-legend/continue-legend.js +5 -4
- package/es/components/legend/continue-legend/continue-legend.js.map +1 -1
- package/es/components/legend/discrete-legend/discrete-legend.js +5 -4
- package/es/components/legend/discrete-legend/discrete-legend.js.map +1 -1
- package/es/components/title/title.js +4 -4
- package/es/components/title/title.js.map +1 -1
- package/es/core/BaseTable.d.ts +4 -0
- package/es/core/BaseTable.js +26 -18
- package/es/core/BaseTable.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/ts-types/base-table.d.ts +5 -0
- package/es/ts-types/base-table.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +5 -5
package/dist/vtable.js
CHANGED
|
@@ -70714,6 +70714,10 @@
|
|
|
70714
70714
|
tableNoFrameHeight;
|
|
70715
70715
|
tableX;
|
|
70716
70716
|
tableY;
|
|
70717
|
+
_tableBorderWidth_left = 0;
|
|
70718
|
+
_tableBorderWidth_right = 0;
|
|
70719
|
+
_tableBorderWidth_top = 0;
|
|
70720
|
+
_tableBorderWidth_bottom = 0;
|
|
70717
70721
|
_widthMode;
|
|
70718
70722
|
_heightMode;
|
|
70719
70723
|
_autoFillWidth;
|
|
@@ -70738,7 +70742,7 @@
|
|
|
70738
70742
|
return TABLE_EVENT_TYPE;
|
|
70739
70743
|
}
|
|
70740
70744
|
options;
|
|
70741
|
-
version = "1.23.
|
|
70745
|
+
version = "1.23.1-alpha.1";
|
|
70742
70746
|
pagination;
|
|
70743
70747
|
id = `VTable${Date.now()}`;
|
|
70744
70748
|
headerStyleCache;
|
|
@@ -71071,12 +71075,17 @@
|
|
|
71071
71075
|
}
|
|
71072
71076
|
resize() {
|
|
71073
71077
|
this._updateSize();
|
|
71074
|
-
this.
|
|
71075
|
-
|
|
71078
|
+
const layoutOrder = this.options.componentLayoutOrder ?? ['legend', 'title'];
|
|
71079
|
+
layoutOrder.forEach(component => {
|
|
71080
|
+
if (component === 'legend') {
|
|
71081
|
+
this.internalProps.legends?.forEach(legend => {
|
|
71082
|
+
legend?.resize();
|
|
71083
|
+
});
|
|
71084
|
+
}
|
|
71085
|
+
else if (component === 'title') {
|
|
71086
|
+
this.internalProps.title?.resize();
|
|
71087
|
+
}
|
|
71076
71088
|
});
|
|
71077
|
-
if (this.internalProps.title) {
|
|
71078
|
-
this.internalProps.title.resize();
|
|
71079
|
-
}
|
|
71080
71089
|
if (this.internalProps.emptyTip) {
|
|
71081
71090
|
this.internalProps.emptyTip.resize();
|
|
71082
71091
|
}
|
|
@@ -71462,6 +71471,10 @@
|
|
|
71462
71471
|
if (this.internalProps.theme?.frameStyle) {
|
|
71463
71472
|
const lineWidths = toBoxArray(this.internalProps.theme.frameStyle?.borderLineWidth ?? [null]);
|
|
71464
71473
|
const shadowWidths = toBoxArray(this.internalProps.theme.frameStyle?.shadowBlur ?? [0]);
|
|
71474
|
+
this._tableBorderWidth_left = (lineWidths[3] ?? 0) + (shadowWidths[3] ?? 0);
|
|
71475
|
+
this._tableBorderWidth_right = (lineWidths[1] ?? 0) + (shadowWidths[1] ?? 0);
|
|
71476
|
+
this._tableBorderWidth_top = (lineWidths[0] ?? 0) + (shadowWidths[0] ?? 0);
|
|
71477
|
+
this._tableBorderWidth_bottom = (lineWidths[2] ?? 0) + (shadowWidths[2] ?? 0);
|
|
71465
71478
|
if (this.theme.frameStyle?.innerBorder) {
|
|
71466
71479
|
this.tableX += this.contentOffsetX;
|
|
71467
71480
|
this.tableY += this.contentOffsetY;
|
|
@@ -71469,19 +71482,19 @@
|
|
|
71469
71482
|
this.tableNoFrameHeight = height - (shadowWidths[2] ?? 0) - this.contentOffsetY;
|
|
71470
71483
|
}
|
|
71471
71484
|
else {
|
|
71472
|
-
this.tableX +=
|
|
71473
|
-
this.tableY +=
|
|
71474
|
-
const rightBorder =
|
|
71485
|
+
this.tableX += this._tableBorderWidth_left;
|
|
71486
|
+
this.tableY += this._tableBorderWidth_top;
|
|
71487
|
+
const rightBorder = this._tableBorderWidth_right;
|
|
71475
71488
|
this.tableNoFrameWidth =
|
|
71476
71489
|
width -
|
|
71477
71490
|
(rightBorder > vScrollBarWidth ? rightBorder - vScrollBarWidth : 0) -
|
|
71478
|
-
|
|
71491
|
+
this._tableBorderWidth_left -
|
|
71479
71492
|
this.contentOffsetX;
|
|
71480
|
-
const bottomBorder =
|
|
71493
|
+
const bottomBorder = this._tableBorderWidth_bottom;
|
|
71481
71494
|
this.tableNoFrameHeight =
|
|
71482
71495
|
height -
|
|
71483
71496
|
(bottomBorder > hScrollBarWidth ? bottomBorder - hScrollBarWidth : 0) -
|
|
71484
|
-
|
|
71497
|
+
this._tableBorderWidth_top -
|
|
71485
71498
|
this.contentOffsetY;
|
|
71486
71499
|
}
|
|
71487
71500
|
}
|
|
@@ -78262,7 +78275,6 @@
|
|
|
78262
78275
|
if (options.title) {
|
|
78263
78276
|
const Title = Factory.getComponent('title');
|
|
78264
78277
|
internalProps.title = new Title(options.title, this);
|
|
78265
|
-
this.scenegraph.resize();
|
|
78266
78278
|
}
|
|
78267
78279
|
if (this.options.emptyTip) {
|
|
78268
78280
|
if (this.internalProps.emptyTip) {
|
|
@@ -78276,6 +78288,7 @@
|
|
|
78276
78288
|
}
|
|
78277
78289
|
this.pluginManager.updatePlugins(options.plugins);
|
|
78278
78290
|
setTimeout(() => {
|
|
78291
|
+
this.resize();
|
|
78279
78292
|
this.fireListeners(TABLE_EVENT_TYPE.UPDATED, null);
|
|
78280
78293
|
}, 0);
|
|
78281
78294
|
return new Promise(resolve => {
|
|
@@ -78794,9 +78807,17 @@
|
|
|
78794
78807
|
this.scenegraph.createSceneGraph();
|
|
78795
78808
|
this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row);
|
|
78796
78809
|
this._updateSize();
|
|
78797
|
-
|
|
78798
|
-
|
|
78799
|
-
|
|
78810
|
+
const layoutOrder = this.options.componentLayoutOrder ?? ['legend', 'title'];
|
|
78811
|
+
layoutOrder.forEach(component => {
|
|
78812
|
+
if (component === 'legend') {
|
|
78813
|
+
this.internalProps.legends?.forEach(legend => {
|
|
78814
|
+
legend?.resize();
|
|
78815
|
+
});
|
|
78816
|
+
}
|
|
78817
|
+
else if (component === 'title') {
|
|
78818
|
+
this.internalProps.title?.resize();
|
|
78819
|
+
}
|
|
78820
|
+
});
|
|
78800
78821
|
this.scenegraph.resize();
|
|
78801
78822
|
if (this.options.emptyTip) {
|
|
78802
78823
|
if (this.internalProps.emptyTip) {
|
|
@@ -80350,22 +80371,22 @@
|
|
|
80350
80371
|
let x = 0;
|
|
80351
80372
|
let y = 0;
|
|
80352
80373
|
if (this.orient === 'left') {
|
|
80353
|
-
x = padding[3];
|
|
80354
|
-
y = 0;
|
|
80374
|
+
x = padding[3] + this.table.tableX - this.table._tableBorderWidth_left;
|
|
80375
|
+
y = 0 + this.table.tableY - this.table._tableBorderWidth_top;
|
|
80355
80376
|
width += padding[1] + padding[3];
|
|
80356
80377
|
}
|
|
80357
80378
|
else if (this.orient === 'top') {
|
|
80358
|
-
x = 0;
|
|
80359
|
-
y = padding[0];
|
|
80379
|
+
x = 0 + this.table.tableX - this.table._tableBorderWidth_left;
|
|
80380
|
+
y = padding[0] + this.table.tableY - this.table._tableBorderWidth_top;
|
|
80360
80381
|
height += padding[0] + padding[2];
|
|
80361
80382
|
}
|
|
80362
80383
|
else if (this.orient === 'right') {
|
|
80363
80384
|
x = rectWidth - width - padding[1];
|
|
80364
|
-
y = 0;
|
|
80385
|
+
y = 0 + this.table.tableY - this.table._tableBorderWidth_top;
|
|
80365
80386
|
width += padding[1] + padding[3];
|
|
80366
80387
|
}
|
|
80367
80388
|
else if (this.orient === 'bottom') {
|
|
80368
|
-
x = 0;
|
|
80389
|
+
x = 0 + this.table.tableX - this.table._tableBorderWidth_left;
|
|
80369
80390
|
y = rectHeight - height - padding[2];
|
|
80370
80391
|
height += padding[0] + padding[2];
|
|
80371
80392
|
}
|
|
@@ -80672,22 +80693,22 @@
|
|
|
80672
80693
|
let x = 0;
|
|
80673
80694
|
let y = 0;
|
|
80674
80695
|
if (this.orient === 'left') {
|
|
80675
|
-
x = padding[3];
|
|
80676
|
-
y = 0;
|
|
80696
|
+
x = padding[3] + this.table.tableX - this.table._tableBorderWidth_left;
|
|
80697
|
+
y = 0 + this.table.tableY - this.table._tableBorderWidth_top;
|
|
80677
80698
|
width += padding[1] + padding[3];
|
|
80678
80699
|
}
|
|
80679
80700
|
else if (this.orient === 'top') {
|
|
80680
|
-
x = 0;
|
|
80681
|
-
y = padding[0];
|
|
80701
|
+
x = 0 + this.table.tableX - this.table._tableBorderWidth_left;
|
|
80702
|
+
y = padding[0] + this.table.tableY - this.table._tableBorderWidth_top;
|
|
80682
80703
|
height += padding[0] + padding[2];
|
|
80683
80704
|
}
|
|
80684
80705
|
else if (this.orient === 'right') {
|
|
80685
80706
|
x = rectWidth - width - padding[1];
|
|
80686
|
-
y = 0;
|
|
80707
|
+
y = 0 + this.table.tableY - this.table._tableBorderWidth_top;
|
|
80687
80708
|
width += padding[1] + padding[3];
|
|
80688
80709
|
}
|
|
80689
80710
|
else if (this.orient === 'bottom') {
|
|
80690
|
-
x = 0;
|
|
80711
|
+
x = 0 + this.table.tableX - this.table._tableBorderWidth_left;
|
|
80691
80712
|
y = rectHeight - height - padding[2];
|
|
80692
80713
|
height += padding[0] + padding[2];
|
|
80693
80714
|
}
|
|
@@ -81270,11 +81291,13 @@
|
|
|
81270
81291
|
padding[2];
|
|
81271
81292
|
this._titleComponent.setAttributes({
|
|
81272
81293
|
x: this._titleOption.x ?? this._titleOption.orient === 'right'
|
|
81273
|
-
? this.table.tableX +
|
|
81274
|
-
|
|
81294
|
+
? this.table.tableX +
|
|
81295
|
+
Math.min(this.table.tableNoFrameWidth, this.table.getDrawRange().width) -
|
|
81296
|
+
this.table._tableBorderWidth_left
|
|
81297
|
+
: this.table.tableX - this.table._tableBorderWidth_left,
|
|
81275
81298
|
y: this._titleOption.y ?? this._titleOption.orient === 'bottom'
|
|
81276
|
-
? this.table.tableY + this.table.tableNoFrameHeight
|
|
81277
|
-
: this.table.tableY,
|
|
81299
|
+
? this.table.tableY + this.table.tableNoFrameHeight - this.table._tableBorderWidth_top
|
|
81300
|
+
: this.table.tableY - this.table._tableBorderWidth_top,
|
|
81278
81301
|
width: this._titleOption.orient === 'top' || this._titleOption.orient === 'bottom'
|
|
81279
81302
|
? realWidth
|
|
81280
81303
|
: this._titleOption.width,
|
|
@@ -81337,11 +81360,13 @@
|
|
|
81337
81360
|
text: this._titleOption.text ?? '',
|
|
81338
81361
|
subtext: this._titleOption.subtext ?? '',
|
|
81339
81362
|
x: this._titleOption.x ?? this._titleOption.orient === 'right'
|
|
81340
|
-
? this.table.tableX +
|
|
81341
|
-
|
|
81363
|
+
? this.table.tableX +
|
|
81364
|
+
Math.min(this.table.tableNoFrameWidth, this.table.getDrawRange().width) -
|
|
81365
|
+
this.table._tableBorderWidth_left
|
|
81366
|
+
: this.table.tableX - this.table._tableBorderWidth_left,
|
|
81342
81367
|
y: this._titleOption.y ?? this._titleOption.orient === 'bottom'
|
|
81343
|
-
? this.table.tableY + this.table.tableNoFrameHeight
|
|
81344
|
-
: this.table.tableY,
|
|
81368
|
+
? this.table.tableY + this.table.tableNoFrameHeight - this.table._tableBorderWidth_top
|
|
81369
|
+
: this.table.tableY - this.table._tableBorderWidth_top,
|
|
81345
81370
|
width: this._titleOption.orient === 'top' || this._titleOption.orient === 'bottom'
|
|
81346
81371
|
? realWidth
|
|
81347
81372
|
: this._titleOption.width,
|
|
@@ -90891,7 +90916,6 @@
|
|
|
90891
90916
|
if (options.title) {
|
|
90892
90917
|
const Title = Factory.getComponent('title');
|
|
90893
90918
|
this.internalProps.title = new Title(options.title, this);
|
|
90894
|
-
this.scenegraph.resize();
|
|
90895
90919
|
}
|
|
90896
90920
|
if (this.options.emptyTip) {
|
|
90897
90921
|
if (this.internalProps.emptyTip) {
|
|
@@ -90904,6 +90928,7 @@
|
|
|
90904
90928
|
}
|
|
90905
90929
|
}
|
|
90906
90930
|
setTimeout(() => {
|
|
90931
|
+
this.resize();
|
|
90907
90932
|
this.fireListeners(TABLE_EVENT_TYPE.UPDATED, null);
|
|
90908
90933
|
}, 0);
|
|
90909
90934
|
return new Promise(resolve => {
|
|
@@ -91777,9 +91802,23 @@
|
|
|
91777
91802
|
this.clearCellStyleCache();
|
|
91778
91803
|
this.scenegraph.createSceneGraph();
|
|
91779
91804
|
this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row);
|
|
91780
|
-
|
|
91805
|
+
let isHasComponent = false;
|
|
91806
|
+
if (this.internalProps.title || this.internalProps.legends) {
|
|
91781
91807
|
this._updateSize();
|
|
91782
|
-
|
|
91808
|
+
isHasComponent = true;
|
|
91809
|
+
}
|
|
91810
|
+
const layoutOrder = this.options.componentLayoutOrder ?? ['legend', 'title'];
|
|
91811
|
+
layoutOrder.forEach(component => {
|
|
91812
|
+
if (component === 'legend') {
|
|
91813
|
+
this.internalProps.legends?.forEach(legend => {
|
|
91814
|
+
legend?.resize();
|
|
91815
|
+
});
|
|
91816
|
+
}
|
|
91817
|
+
else if (component === 'title') {
|
|
91818
|
+
this.internalProps.title?.resize();
|
|
91819
|
+
}
|
|
91820
|
+
});
|
|
91821
|
+
if (isHasComponent) {
|
|
91783
91822
|
this.scenegraph.resize();
|
|
91784
91823
|
}
|
|
91785
91824
|
this.eventManager.updateEventBinder();
|
|
@@ -92623,7 +92662,6 @@
|
|
|
92623
92662
|
if (options.title) {
|
|
92624
92663
|
const Title = Factory.getComponent('title');
|
|
92625
92664
|
this.internalProps.title = new Title(options.title, this);
|
|
92626
|
-
this.scenegraph.resize();
|
|
92627
92665
|
}
|
|
92628
92666
|
if (this.options.emptyTip) {
|
|
92629
92667
|
if (this.internalProps.emptyTip) {
|
|
@@ -92636,6 +92674,7 @@
|
|
|
92636
92674
|
}
|
|
92637
92675
|
}
|
|
92638
92676
|
setTimeout(() => {
|
|
92677
|
+
this.resize();
|
|
92639
92678
|
this.fireListeners(TABLE_EVENT_TYPE.UPDATED, null);
|
|
92640
92679
|
}, 0);
|
|
92641
92680
|
return new Promise(resolve => {
|
|
@@ -93462,9 +93501,23 @@
|
|
|
93462
93501
|
this.clearCellStyleCache();
|
|
93463
93502
|
this.scenegraph.createSceneGraph();
|
|
93464
93503
|
this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row);
|
|
93465
|
-
|
|
93504
|
+
let isHasComponent = false;
|
|
93505
|
+
if (this.internalProps.title || this.internalProps.legends) {
|
|
93466
93506
|
this._updateSize();
|
|
93467
|
-
|
|
93507
|
+
isHasComponent = true;
|
|
93508
|
+
}
|
|
93509
|
+
const layoutOrder = this.options.componentLayoutOrder ?? ['legend', 'title'];
|
|
93510
|
+
layoutOrder.forEach(component => {
|
|
93511
|
+
if (component === 'legend') {
|
|
93512
|
+
this.internalProps.legends?.forEach(legend => {
|
|
93513
|
+
legend?.resize();
|
|
93514
|
+
});
|
|
93515
|
+
}
|
|
93516
|
+
else if (component === 'title') {
|
|
93517
|
+
this.internalProps.title?.resize();
|
|
93518
|
+
}
|
|
93519
|
+
});
|
|
93520
|
+
if (isHasComponent) {
|
|
93468
93521
|
this.scenegraph.resize();
|
|
93469
93522
|
}
|
|
93470
93523
|
this.eventManager.updateEventBinder();
|
|
@@ -94100,7 +94153,7 @@
|
|
|
94100
94153
|
}
|
|
94101
94154
|
|
|
94102
94155
|
registerForVrender();
|
|
94103
|
-
const version = "1.23.
|
|
94156
|
+
const version = "1.23.1-alpha.1";
|
|
94104
94157
|
function getIcons() {
|
|
94105
94158
|
return get$2();
|
|
94106
94159
|
}
|