@visactor/vtable 1.8.3-alpha.0 → 1.9.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/ListTable.js +7 -4
- package/cjs/ListTable.js.map +1 -1
- package/cjs/components/legend/discrete-legend/discrete-legend.js +7 -4
- package/cjs/components/legend/discrete-legend/discrete-legend.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +9 -4
- package/cjs/core/BaseTable.js +31 -15
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/TABLE_EVENT_TYPE.d.ts +2 -0
- package/cjs/core/TABLE_EVENT_TYPE.js +2 -0
- package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/cjs/core/animation.d.ts +20 -0
- package/cjs/core/animation.js +48 -0
- package/cjs/core/animation.js.map +1 -0
- package/cjs/core/tableHelper.d.ts +2 -1
- package/cjs/core/tableHelper.js +9 -2
- package/cjs/core/tableHelper.js.map +1 -1
- package/cjs/data/DataSource.d.ts +1 -0
- package/cjs/data/DataSource.js +4 -0
- package/cjs/data/DataSource.js.map +1 -1
- package/cjs/dataset/dataset-pivot-table.js +1 -2
- package/cjs/dataset/dataset.js +1 -0
- package/cjs/event/event.js +2 -2
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/container-dom.js +1 -1
- package/cjs/event/listener/container-dom.js.map +1 -1
- package/cjs/event/listener/table-group.js +43 -19
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/event/scroll.js +1 -1
- package/cjs/event/scroll.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/layout-helper.js +2 -1
- package/cjs/layout/pivot-header-layout.js +10 -3
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/simple-header-layout.js +5 -1
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/cjs/plugins/custom-cell-style.js +1 -1
- package/cjs/scenegraph/component/custom.js +6 -4
- package/cjs/scenegraph/component/custom.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +32 -9
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/column-helper.js +37 -9
- package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
- package/cjs/scenegraph/layout/frozen-react.js +7 -7
- package/cjs/scenegraph/layout/frozen-react.js.map +1 -1
- package/cjs/scenegraph/layout/update-height.js +1 -2
- package/cjs/scenegraph/layout/update-height.js.map +1 -1
- package/cjs/scenegraph/layout/update-width.js +3 -4
- package/cjs/scenegraph/layout/update-width.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js +1 -1
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/state/cell-move/index.js +3 -2
- package/cjs/state/cell-move/index.js.map +1 -1
- package/cjs/state/select/update-position.js +19 -4
- package/cjs/state/select/update-position.js.map +1 -1
- package/cjs/state/state.d.ts +2 -1
- package/cjs/state/state.js +11 -4
- package/cjs/state/state.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +4 -0
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/events.d.ts +11 -0
- package/cjs/ts-types/events.js.map +1 -1
- package/cjs/ts-types/pivot-table/corner.d.ts +3 -0
- package/cjs/ts-types/pivot-table/corner.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +315 -94
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.js +8 -5
- package/es/ListTable.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/core/BaseTable.d.ts +9 -4
- package/es/core/BaseTable.js +32 -14
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/TABLE_EVENT_TYPE.d.ts +2 -0
- package/es/core/TABLE_EVENT_TYPE.js +2 -0
- package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/es/core/animation.d.ts +20 -0
- package/es/core/animation.js +41 -0
- package/es/core/animation.js.map +1 -0
- package/es/core/tableHelper.d.ts +2 -1
- package/es/core/tableHelper.js +7 -0
- package/es/core/tableHelper.js.map +1 -1
- package/es/data/DataSource.d.ts +1 -0
- package/es/data/DataSource.js +4 -0
- package/es/data/DataSource.js.map +1 -1
- package/es/dataset/dataset-pivot-table.js +1 -2
- package/es/dataset/dataset.js +2 -1
- package/es/event/event.js +2 -2
- package/es/event/event.js.map +1 -1
- package/es/event/listener/container-dom.js +1 -1
- package/es/event/listener/container-dom.js.map +1 -1
- package/es/event/listener/table-group.js +43 -19
- package/es/event/listener/table-group.js.map +1 -1
- package/es/event/scroll.js +1 -1
- package/es/event/scroll.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/layout-helper.js +2 -1
- package/es/layout/pivot-header-layout.js +10 -3
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/simple-header-layout.js +5 -1
- package/es/layout/simple-header-layout.js.map +1 -1
- package/es/plugins/custom-cell-style.js +1 -1
- package/es/scenegraph/component/custom.js +6 -4
- package/es/scenegraph/component/custom.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +28 -7
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/column-helper.js +35 -8
- package/es/scenegraph/group-creater/column-helper.js.map +1 -1
- package/es/scenegraph/layout/frozen-react.js +7 -7
- package/es/scenegraph/layout/frozen-react.js.map +1 -1
- package/es/scenegraph/layout/update-height.js +1 -2
- package/es/scenegraph/layout/update-height.js.map +1 -1
- package/es/scenegraph/layout/update-width.js +3 -4
- package/es/scenegraph/layout/update-width.js.map +1 -1
- package/es/scenegraph/scenegraph.js +1 -1
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/state/cell-move/index.js +3 -2
- package/es/state/cell-move/index.js.map +1 -1
- package/es/state/select/update-position.js +19 -4
- package/es/state/select/update-position.js.map +1 -1
- package/es/state/state.d.ts +2 -1
- package/es/state/state.js +11 -4
- package/es/state/state.js.map +1 -1
- package/es/ts-types/base-table.d.ts +4 -0
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/events.d.ts +11 -0
- package/es/ts-types/events.js.map +1 -1
- package/es/ts-types/pivot-table/corner.d.ts +3 -0
- package/es/ts-types/pivot-table/corner.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +5 -5
package/dist/vtable.js
CHANGED
|
@@ -27878,6 +27878,7 @@
|
|
|
27878
27878
|
MOUSEENTER_TABLE: 'mouseenter_table',
|
|
27879
27879
|
MOUSELEAVE_TABLE: 'mouseleave_table',
|
|
27880
27880
|
MOUSEDOWN_TABLE: 'mousedown_table',
|
|
27881
|
+
MOUSEMOVE_TABLE: 'mousemove_table',
|
|
27881
27882
|
MOUSEMOVE_CELL: 'mousemove_cell',
|
|
27882
27883
|
MOUSEENTER_CELL: 'mouseenter_cell',
|
|
27883
27884
|
MOUSELEAVE_CELL: 'mouseleave_cell',
|
|
@@ -27886,6 +27887,7 @@
|
|
|
27886
27887
|
RESIZE_COLUMN_END: 'resize_column_end',
|
|
27887
27888
|
RESIZE_ROW: 'resize_row',
|
|
27888
27889
|
RESIZE_ROW_END: 'resize_row_end',
|
|
27890
|
+
CHANGE_HEADER_POSITION_START: 'change_header_position_start',
|
|
27889
27891
|
CHANGE_HEADER_POSITION: 'change_header_position',
|
|
27890
27892
|
SORT_CLICK: 'sort_click',
|
|
27891
27893
|
FREEZE_CLICK: 'freeze_click',
|
|
@@ -30908,8 +30910,12 @@
|
|
|
30908
30910
|
this.registerAggregator(AggregationType.NONE, NoneAggregator);
|
|
30909
30911
|
this.registerAggregator(AggregationType.CUSTOM, CustomAggregator);
|
|
30910
30912
|
}
|
|
30913
|
+
updateColumns(columns) {
|
|
30914
|
+
this.columns = columns;
|
|
30915
|
+
}
|
|
30911
30916
|
_generateFieldAggragations() {
|
|
30912
30917
|
const columnObjs = this.columns;
|
|
30918
|
+
this.fieldAggregators = [];
|
|
30913
30919
|
for (let i = 0; i < columnObjs?.length; i++) {
|
|
30914
30920
|
delete columnObjs[i].vtable_aggregator;
|
|
30915
30921
|
const field = columnObjs[i].field;
|
|
@@ -32873,6 +32879,15 @@
|
|
|
32873
32879
|
}
|
|
32874
32880
|
}
|
|
32875
32881
|
}
|
|
32882
|
+
function checkHasAggregationOnColumnDefine(colDefs) {
|
|
32883
|
+
for (let i = 0; i < colDefs.length; i++) {
|
|
32884
|
+
const colDef = colDefs[i];
|
|
32885
|
+
if (colDef.aggregation) {
|
|
32886
|
+
return true;
|
|
32887
|
+
}
|
|
32888
|
+
}
|
|
32889
|
+
return false;
|
|
32890
|
+
}
|
|
32876
32891
|
|
|
32877
32892
|
let Icon$1 = class Icon extends Image$2 {
|
|
32878
32893
|
role;
|
|
@@ -33168,8 +33183,8 @@
|
|
|
33168
33183
|
}
|
|
33169
33184
|
if (typeof customLayout === 'function') {
|
|
33170
33185
|
const arg = {
|
|
33171
|
-
col,
|
|
33172
|
-
row,
|
|
33186
|
+
col: range?.start.col ?? col,
|
|
33187
|
+
row: range?.start.row ?? row,
|
|
33173
33188
|
dataValue: table.getCellOriginValue(col, row),
|
|
33174
33189
|
value: table.getCellValue(col, row) || '',
|
|
33175
33190
|
rect: {
|
|
@@ -33180,7 +33195,9 @@
|
|
|
33180
33195
|
width,
|
|
33181
33196
|
height
|
|
33182
33197
|
},
|
|
33183
|
-
table
|
|
33198
|
+
table,
|
|
33199
|
+
originCol: col,
|
|
33200
|
+
originRow: row
|
|
33184
33201
|
};
|
|
33185
33202
|
const customRenderObj = customLayout(arg);
|
|
33186
33203
|
if (customRenderObj.rootContainer) {
|
|
@@ -35623,7 +35640,6 @@
|
|
|
35623
35640
|
let value = table.getCellValue(col, row);
|
|
35624
35641
|
let isMerge;
|
|
35625
35642
|
let range;
|
|
35626
|
-
let cellTheme;
|
|
35627
35643
|
let customStyle;
|
|
35628
35644
|
let customResult;
|
|
35629
35645
|
let isCustomMerge = false;
|
|
@@ -35635,10 +35651,6 @@
|
|
|
35635
35651
|
isMerge = range.start.col !== range.end.col || range.start.row !== range.end.row;
|
|
35636
35652
|
value = customMergeText;
|
|
35637
35653
|
customStyle = customMergeStyle;
|
|
35638
|
-
if (customStyle) {
|
|
35639
|
-
cellTheme = getStyleTheme(customStyle, table, range.start.col, range.start.row, getProp).theme;
|
|
35640
|
-
cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table);
|
|
35641
|
-
}
|
|
35642
35654
|
if (customLayout || customRender) {
|
|
35643
35655
|
customResult = dealWithCustom(customLayout, customRender, customMergeRange.start.col, customMergeRange.start.row, table.getColsWidth(customMergeRange.start.col, customMergeRange.end.col), table.getRowsHeight(customMergeRange.start.row, customMergeRange.end.row), false, table.isAutoRowHeight(row), [0, 0, 0, 0], range, table);
|
|
35644
35656
|
}
|
|
@@ -35677,11 +35689,9 @@
|
|
|
35677
35689
|
value = vtableMergeName;
|
|
35678
35690
|
}
|
|
35679
35691
|
}
|
|
35680
|
-
const cellStyle = table._getCellStyle(range ? range.start.col : col, range ? range.start.row : row);
|
|
35692
|
+
const cellStyle = customStyle || table._getCellStyle(range ? range.start.col : col, range ? range.start.row : row);
|
|
35681
35693
|
const autoWrapText = cellStyle.autoWrapText ?? table.internalProps.autoWrapText;
|
|
35682
|
-
|
|
35683
|
-
cellTheme = getStyleTheme(cellStyle, table, isMerge ? range.start.col : col, isMerge ? range.start.row : row, getProp).theme;
|
|
35684
|
-
}
|
|
35694
|
+
const cellTheme = getStyleTheme(cellStyle, table, isMerge ? range.start.col : col, isMerge ? range.start.row : row, getProp).theme;
|
|
35685
35695
|
cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table);
|
|
35686
35696
|
if (!addNew &&
|
|
35687
35697
|
!isMerge &&
|
|
@@ -35783,7 +35793,25 @@
|
|
|
35783
35793
|
}
|
|
35784
35794
|
if (isPromise(value)) {
|
|
35785
35795
|
oldCellGroup.removeAllChild();
|
|
35786
|
-
dealPromiseData(value, table,
|
|
35796
|
+
dealPromiseData(value, table, callUpdateCellContentForPromiseValue.bind(null, {
|
|
35797
|
+
type,
|
|
35798
|
+
value,
|
|
35799
|
+
define,
|
|
35800
|
+
table,
|
|
35801
|
+
col,
|
|
35802
|
+
row,
|
|
35803
|
+
cellWidth,
|
|
35804
|
+
cellHeight,
|
|
35805
|
+
oldCellGroup,
|
|
35806
|
+
padding,
|
|
35807
|
+
textAlign,
|
|
35808
|
+
textBaseline,
|
|
35809
|
+
mayHaveIcon,
|
|
35810
|
+
addNew,
|
|
35811
|
+
range,
|
|
35812
|
+
customResult,
|
|
35813
|
+
customStyle
|
|
35814
|
+
}));
|
|
35787
35815
|
}
|
|
35788
35816
|
else {
|
|
35789
35817
|
newCellGroup = updateCellContent(type, value, define, table, col, row, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, cellTheme, range, customResult);
|
|
@@ -35844,6 +35872,13 @@
|
|
|
35844
35872
|
}
|
|
35845
35873
|
return false;
|
|
35846
35874
|
}
|
|
35875
|
+
function callUpdateCellContentForPromiseValue(updateCellArgs) {
|
|
35876
|
+
const { type, value, define, table, col, row, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, range, customResult, customStyle } = updateCellArgs;
|
|
35877
|
+
const cellStyle = customStyle || table._getCellStyle(range ? range.start.col : col, range ? range.start.row : row);
|
|
35878
|
+
const cellTheme = getStyleTheme(cellStyle, table, range ? range.start.col : col, range ? range.start.row : row, getProp).theme;
|
|
35879
|
+
cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table);
|
|
35880
|
+
updateCellContent(type, value, define, table, col, row, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, cellTheme, range, customResult);
|
|
35881
|
+
}
|
|
35847
35882
|
function dealWithMergeCellSize(range, cellWidth, cellHeight, padding, textAlign, textBaseline, table) {
|
|
35848
35883
|
for (let col = range.start.col; col <= range.end.col; col++) {
|
|
35849
35884
|
for (let row = range.start.row; row <= range.end.row; row++) {
|
|
@@ -36977,11 +37012,7 @@
|
|
|
36977
37012
|
const customContainer = cell.getChildByName(CUSTOM_CONTAINER_NAME) ||
|
|
36978
37013
|
cell.getChildByName(CUSTOM_MERGE_CONTAINER_NAME);
|
|
36979
37014
|
if (customContainer) {
|
|
36980
|
-
if (scene.table.reactCustomLayout) {
|
|
36981
|
-
scene.table.reactCustomLayout.removeCustomCell(col, row);
|
|
36982
|
-
}
|
|
36983
37015
|
let customElementsGroup;
|
|
36984
|
-
customContainer.removeAllChild();
|
|
36985
37016
|
cell.removeChild(customContainer);
|
|
36986
37017
|
const customMergeRange = getCustomCellMergeCustom(col, row, cell, scene.table);
|
|
36987
37018
|
if (customMergeRange) {
|
|
@@ -37333,11 +37364,7 @@
|
|
|
37333
37364
|
const customContainer = cell.getChildByName(CUSTOM_CONTAINER_NAME) ||
|
|
37334
37365
|
cell.getChildByName(CUSTOM_MERGE_CONTAINER_NAME);
|
|
37335
37366
|
if (customContainer) {
|
|
37336
|
-
if (scene.table.reactCustomLayout) {
|
|
37337
|
-
scene.table.reactCustomLayout.removeCustomCell(col, row);
|
|
37338
|
-
}
|
|
37339
37367
|
let customElementsGroup;
|
|
37340
|
-
customContainer.removeAllChild();
|
|
37341
37368
|
cell.removeChild(customContainer);
|
|
37342
37369
|
const customMergeRange = getCustomCellMergeCustom(col, row, cell, scene.table);
|
|
37343
37370
|
if (customMergeRange) {
|
|
@@ -37389,7 +37416,7 @@
|
|
|
37389
37416
|
width = scene.table.getColsWidth(cellGroup.mergeStartCol, cellGroup.mergeEndCol);
|
|
37390
37417
|
height = scene.table.getRowsHeight(cellGroup.mergeStartRow, cellGroup.mergeEndRow);
|
|
37391
37418
|
}
|
|
37392
|
-
const customResult = dealWithCustom(customLayout, customRender,
|
|
37419
|
+
const customResult = dealWithCustom(customLayout, customRender, col, row, width, height, false, scene.table.isAutoRowHeight(row), padding, isMergeCellGroup(cellGroup)
|
|
37393
37420
|
? {
|
|
37394
37421
|
start: { col: cellGroup.mergeStartCol, row: cellGroup.mergeStartRow },
|
|
37395
37422
|
end: { col: cellGroup.mergeEndCol, row: cellGroup.mergeEndRow }
|
|
@@ -41338,7 +41365,9 @@
|
|
|
41338
41365
|
colForDefine = range.start.col;
|
|
41339
41366
|
rowForDefine = range.start.row;
|
|
41340
41367
|
}
|
|
41341
|
-
if ((
|
|
41368
|
+
if (!table.isPivotTable() &&
|
|
41369
|
+
(cellLocation === 'columnHeader' || cellLocation === 'cornerHeader') &&
|
|
41370
|
+
row >= table.columnHeaderLevelCount) {
|
|
41342
41371
|
cellLocation = 'body';
|
|
41343
41372
|
}
|
|
41344
41373
|
const define = cellLocation !== 'body'
|
|
@@ -41373,23 +41402,6 @@
|
|
|
41373
41402
|
value = vtableMergeName;
|
|
41374
41403
|
}
|
|
41375
41404
|
}
|
|
41376
|
-
const cellStyle = customStyle || table._getCellStyle(range ? range.start.col : col, range ? range.start.row : row);
|
|
41377
|
-
const cellTheme = getStyleTheme(cellStyle, table, range ? range.start.col : col, range ? range.start.row : row, getProp).theme;
|
|
41378
|
-
cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table);
|
|
41379
|
-
cellTheme.group.width = colWidth;
|
|
41380
|
-
cellTheme.group.height = Array.isArray(defaultRowHeight) ? defaultRowHeight[row] : defaultRowHeight;
|
|
41381
|
-
if (cellTheme._vtable.padding) {
|
|
41382
|
-
padding = cellTheme._vtable.padding;
|
|
41383
|
-
}
|
|
41384
|
-
if (cellTheme.text.textAlign) {
|
|
41385
|
-
textAlign = cellTheme.text.textAlign;
|
|
41386
|
-
}
|
|
41387
|
-
if (cellTheme.text.textBaseline) {
|
|
41388
|
-
textBaseline = cellTheme.text.textBaseline;
|
|
41389
|
-
}
|
|
41390
|
-
if (cellLocation !== 'body' && !cellTheme.group.fill) {
|
|
41391
|
-
cellTheme.group.fill = '#fff';
|
|
41392
|
-
}
|
|
41393
41405
|
const type = isVtableMerge || isCustomMerge
|
|
41394
41406
|
? 'text'
|
|
41395
41407
|
: (table.isHeader(col, row)
|
|
@@ -41397,13 +41409,48 @@
|
|
|
41397
41409
|
: table.getBodyColumnType(col, row)) || 'text';
|
|
41398
41410
|
if (isPromise(value)) {
|
|
41399
41411
|
createEmptyCellGroup(col, row, 0, y, cellWidth, cellHeight, columnGroup);
|
|
41400
|
-
dealPromiseData(value, table,
|
|
41412
|
+
dealPromiseData(value, table, callCreateCellForPromiseValue.bind(null, {
|
|
41413
|
+
type,
|
|
41414
|
+
value,
|
|
41415
|
+
define,
|
|
41416
|
+
table,
|
|
41417
|
+
col,
|
|
41418
|
+
row,
|
|
41419
|
+
colWidth,
|
|
41420
|
+
cellWidth,
|
|
41421
|
+
cellHeight,
|
|
41422
|
+
columnGroup,
|
|
41423
|
+
y,
|
|
41424
|
+
customStyle,
|
|
41425
|
+
mayHaveIcon,
|
|
41426
|
+
cellLocation,
|
|
41427
|
+
range,
|
|
41428
|
+
customResult,
|
|
41429
|
+
defaultRowHeight
|
|
41430
|
+
}));
|
|
41401
41431
|
columnGroup.updateColumnRowNumber(row);
|
|
41402
41432
|
const height = table.getRowHeight(row);
|
|
41403
41433
|
columnGroup.updateColumnHeight(height);
|
|
41404
41434
|
y += height;
|
|
41405
41435
|
}
|
|
41406
41436
|
else {
|
|
41437
|
+
const cellStyle = customStyle || table._getCellStyle(range ? range.start.col : col, range ? range.start.row : row);
|
|
41438
|
+
const cellTheme = getStyleTheme(cellStyle, table, range ? range.start.col : col, range ? range.start.row : row, getProp).theme;
|
|
41439
|
+
cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table);
|
|
41440
|
+
cellTheme.group.width = colWidth;
|
|
41441
|
+
cellTheme.group.height = Array.isArray(defaultRowHeight) ? defaultRowHeight[row] : defaultRowHeight;
|
|
41442
|
+
if (cellTheme._vtable.padding) {
|
|
41443
|
+
padding = cellTheme._vtable.padding;
|
|
41444
|
+
}
|
|
41445
|
+
if (cellTheme.text.textAlign) {
|
|
41446
|
+
textAlign = cellTheme.text.textAlign;
|
|
41447
|
+
}
|
|
41448
|
+
if (cellTheme.text.textBaseline) {
|
|
41449
|
+
textBaseline = cellTheme.text.textBaseline;
|
|
41450
|
+
}
|
|
41451
|
+
if (cellLocation !== 'body' && !cellTheme.group.fill) {
|
|
41452
|
+
cellTheme.group.fill = '#fff';
|
|
41453
|
+
}
|
|
41407
41454
|
const cellGroup = createCell(type, value, define, table, col, row, colWidth, cellWidth, cellHeight, columnGroup, y, padding, textAlign, textBaseline, mayHaveIcon, cellTheme, range, customResult);
|
|
41408
41455
|
columnGroup.updateColumnRowNumber(row);
|
|
41409
41456
|
if (isMerge) {
|
|
@@ -41432,6 +41479,30 @@
|
|
|
41432
41479
|
height: y
|
|
41433
41480
|
};
|
|
41434
41481
|
}
|
|
41482
|
+
function callCreateCellForPromiseValue(createCellArgs) {
|
|
41483
|
+
let padding;
|
|
41484
|
+
let textAlign;
|
|
41485
|
+
let textBaseline;
|
|
41486
|
+
const { type, value, define, table, col, row, colWidth, cellWidth, cellHeight, columnGroup, y, cellLocation, mayHaveIcon, customStyle, range, customResult, defaultRowHeight } = createCellArgs;
|
|
41487
|
+
const cellStyle = customStyle || table._getCellStyle(range ? range.start.col : col, range ? range.start.row : row);
|
|
41488
|
+
const cellTheme = getStyleTheme(cellStyle, table, range ? range.start.col : col, range ? range.start.row : row, getProp).theme;
|
|
41489
|
+
cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table);
|
|
41490
|
+
cellTheme.group.width = colWidth;
|
|
41491
|
+
cellTheme.group.height = Array.isArray(defaultRowHeight) ? defaultRowHeight[row] : defaultRowHeight;
|
|
41492
|
+
if (cellTheme._vtable.padding) {
|
|
41493
|
+
padding = cellTheme._vtable.padding;
|
|
41494
|
+
}
|
|
41495
|
+
if (cellTheme.text.textAlign) {
|
|
41496
|
+
textAlign = cellTheme.text.textAlign;
|
|
41497
|
+
}
|
|
41498
|
+
if (cellTheme.text.textBaseline) {
|
|
41499
|
+
textBaseline = cellTheme.text.textBaseline;
|
|
41500
|
+
}
|
|
41501
|
+
if (cellLocation !== 'body' && !cellTheme.group.fill) {
|
|
41502
|
+
cellTheme.group.fill = '#fff';
|
|
41503
|
+
}
|
|
41504
|
+
createCell(type, value, define, table, col, row, colWidth, cellWidth, cellHeight, columnGroup, y, padding, textAlign, textBaseline, mayHaveIcon, cellTheme, range, customResult);
|
|
41505
|
+
}
|
|
41435
41506
|
function dealMerge(range, mergeMap, table, forceUpdate) {
|
|
41436
41507
|
let cellWidth = 0;
|
|
41437
41508
|
let cellHeight = 0;
|
|
@@ -44237,15 +44308,17 @@
|
|
|
44237
44308
|
return;
|
|
44238
44309
|
}
|
|
44239
44310
|
const allColsWidth = table.getAllColsWidth();
|
|
44311
|
+
const tableNoFrameWidth = Math.min(allColsWidth, table.tableNoFrameWidth);
|
|
44240
44312
|
const frozenColsWidth = table.getFrozenColsWidth();
|
|
44241
44313
|
const rightFrozenColsWidth = table.getRightFrozenColsWidth();
|
|
44242
44314
|
const totalFrozenColsWidth = frozenColsWidth + rightFrozenColsWidth;
|
|
44243
|
-
const bodyWidth = Math.min(allColsWidth - totalFrozenColsWidth,
|
|
44315
|
+
const bodyWidth = Math.min(allColsWidth - totalFrozenColsWidth, tableNoFrameWidth - totalFrozenColsWidth);
|
|
44244
44316
|
const allRowsHeight = table.getAllRowsHeight();
|
|
44317
|
+
const tableNoFrameHeight = Math.min(allRowsHeight, table.tableNoFrameHeight);
|
|
44245
44318
|
const frozenRowsHeight = table.getFrozenRowsHeight();
|
|
44246
44319
|
const bottomFrozenRowsHeight = table.getBottomFrozenRowsHeight();
|
|
44247
44320
|
const totalFrozenRowsHeight = frozenRowsHeight + bottomFrozenRowsHeight;
|
|
44248
|
-
const bodyHeight = Math.min(allRowsHeight - totalFrozenRowsHeight,
|
|
44321
|
+
const bodyHeight = Math.min(allRowsHeight - totalFrozenRowsHeight, tableNoFrameHeight - totalFrozenRowsHeight);
|
|
44249
44322
|
if (table.frozenColCount > 0) {
|
|
44250
44323
|
headerDomContainer.style.left = `${table.tableX + frozenColsWidth}px`;
|
|
44251
44324
|
bodyDomContainer.style.left = `${table.tableX + frozenColsWidth}px`;
|
|
@@ -44273,21 +44346,21 @@
|
|
|
44273
44346
|
rightFrozenBodyDomContainer.style.width = `${rightFrozenColsWidth}px`;
|
|
44274
44347
|
rightFrozenBodyDomContainer.style.height = `${bodyHeight}px`;
|
|
44275
44348
|
rightFrozenBodyDomContainer.style.top = `${table.tableY + frozenRowsHeight}px`;
|
|
44276
|
-
rightFrozenBodyDomContainer.style.left = `${table.tableX +
|
|
44349
|
+
rightFrozenBodyDomContainer.style.left = `${table.tableX + tableNoFrameWidth - rightFrozenColsWidth}px`;
|
|
44277
44350
|
rightFrozenHeaderDomContainer.style.width = `${rightFrozenColsWidth}px`;
|
|
44278
44351
|
rightFrozenHeaderDomContainer.style.height = `${frozenRowsHeight}px`;
|
|
44279
44352
|
rightFrozenHeaderDomContainer.style.top = `${table.tableY}px`;
|
|
44280
|
-
rightFrozenHeaderDomContainer.style.left = `${table.tableX +
|
|
44353
|
+
rightFrozenHeaderDomContainer.style.left = `${table.tableX + tableNoFrameWidth - rightFrozenColsWidth}px`;
|
|
44281
44354
|
bottomDomContainer.style.width = `${bodyWidth}px`;
|
|
44282
44355
|
bottomDomContainer.style.height = `${bottomFrozenRowsHeight}px`;
|
|
44283
|
-
bottomDomContainer.style.top = `${table.tableY +
|
|
44356
|
+
bottomDomContainer.style.top = `${table.tableY + tableNoFrameHeight - bottomFrozenRowsHeight}px`;
|
|
44284
44357
|
frozenBottomDomContainer.style.width = `${frozenColsWidth}px`;
|
|
44285
44358
|
frozenBottomDomContainer.style.height = `${bottomFrozenRowsHeight}px`;
|
|
44286
|
-
frozenBottomDomContainer.style.top = `${table.tableY +
|
|
44359
|
+
frozenBottomDomContainer.style.top = `${table.tableY + tableNoFrameHeight - bottomFrozenRowsHeight}px`;
|
|
44287
44360
|
rightFrozenBottomDomContainer.style.width = `${rightFrozenColsWidth}px`;
|
|
44288
44361
|
rightFrozenBottomDomContainer.style.height = `${bottomFrozenRowsHeight}px`;
|
|
44289
|
-
rightFrozenBottomDomContainer.style.top = `${table.tableY +
|
|
44290
|
-
rightFrozenBottomDomContainer.style.left = `${table.tableX +
|
|
44362
|
+
rightFrozenBottomDomContainer.style.top = `${table.tableY + tableNoFrameHeight - bottomFrozenRowsHeight}px`;
|
|
44363
|
+
rightFrozenBottomDomContainer.style.left = `${table.tableX + tableNoFrameWidth - rightFrozenColsWidth}px`;
|
|
44291
44364
|
}
|
|
44292
44365
|
function updateReactComponentContainer(scene) {
|
|
44293
44366
|
if (!scene.table.reactCustomLayout) {
|
|
@@ -45806,6 +45879,7 @@
|
|
|
45806
45879
|
initSceneGraph(this);
|
|
45807
45880
|
}
|
|
45808
45881
|
clearCells() {
|
|
45882
|
+
this.table.animationManager.clear();
|
|
45809
45883
|
if (this.table.isPivotChart() || this.table._hasCustomRenderOrLayout()) {
|
|
45810
45884
|
this.stage.pluginService.findPluginsByName('poptipForText').forEach(plugin => {
|
|
45811
45885
|
plugin.deactivate(this.stage.pluginService);
|
|
@@ -47592,6 +47666,19 @@
|
|
|
47592
47666
|
col,
|
|
47593
47667
|
row
|
|
47594
47668
|
};
|
|
47669
|
+
const cellRange = skipBodyMerge ? { start: { col, row }, end: { col, row } } : table.getCellRange(col, row);
|
|
47670
|
+
if (currentRange.start.col < cellRange.end.col) {
|
|
47671
|
+
currentRange.end.col = cellRange.end.col;
|
|
47672
|
+
}
|
|
47673
|
+
else if (currentRange.start.col > cellRange.start.col) {
|
|
47674
|
+
currentRange.end.col = cellRange.start.col;
|
|
47675
|
+
}
|
|
47676
|
+
if (currentRange.start.row < cellRange.end.row) {
|
|
47677
|
+
currentRange.end.row = cellRange.end.row;
|
|
47678
|
+
}
|
|
47679
|
+
else if (currentRange.start.row > cellRange.start.row) {
|
|
47680
|
+
currentRange.end.row = cellRange.start.row;
|
|
47681
|
+
}
|
|
47595
47682
|
if (skipBodyMerge) {
|
|
47596
47683
|
currentRange.skipBodyMerge = true;
|
|
47597
47684
|
}
|
|
@@ -47888,7 +47975,8 @@
|
|
|
47888
47975
|
state.columnMove.colSource >= 0 &&
|
|
47889
47976
|
state.columnMove.rowSource >= 0 &&
|
|
47890
47977
|
state.columnMove.colTarget >= 0 &&
|
|
47891
|
-
state.columnMove.rowTarget >= 0
|
|
47978
|
+
state.columnMove.rowTarget >= 0 &&
|
|
47979
|
+
state.table.options.customConfig?.notUpdateInColumnRowMove !== true) {
|
|
47892
47980
|
const oldSourceMergeInfo = state.table.getCellRange(state.columnMove.colSource, state.columnMove.rowSource);
|
|
47893
47981
|
const oldTargetMergeInfo = state.table.getCellRange(state.columnMove.colTarget, state.columnMove.rowTarget);
|
|
47894
47982
|
const moveContext = state.table._moveHeaderPosition({ col: state.columnMove.colSource, row: state.columnMove.rowSource }, { col: state.columnMove.colTarget, row: state.columnMove.rowTarget });
|
|
@@ -47993,6 +48081,9 @@
|
|
|
47993
48081
|
state.table.scenegraph.component.setRightFrozenColumnShadow(state.table.colCount - state.table.rightFrozenColCount);
|
|
47994
48082
|
}
|
|
47995
48083
|
state.table.scenegraph.updateNextFrame();
|
|
48084
|
+
if (state.table.options.customConfig?.notUpdateInColumnRowMove === true) {
|
|
48085
|
+
return true;
|
|
48086
|
+
}
|
|
47996
48087
|
return moveColResult;
|
|
47997
48088
|
}
|
|
47998
48089
|
function clearWidthsAndHeightsCache(colMin, colMax, rowMin, rowMax, table) {
|
|
@@ -48697,6 +48788,7 @@
|
|
|
48697
48788
|
class StateManager {
|
|
48698
48789
|
table;
|
|
48699
48790
|
interactionState;
|
|
48791
|
+
interactionStateBeforeScroll;
|
|
48700
48792
|
select;
|
|
48701
48793
|
fillHandle;
|
|
48702
48794
|
hover;
|
|
@@ -48720,8 +48812,8 @@
|
|
|
48720
48812
|
_checkboxCellTypeFields = [];
|
|
48721
48813
|
_headerCheckFuncs = {};
|
|
48722
48814
|
radioState = {};
|
|
48723
|
-
resetInteractionState = debounce(() => {
|
|
48724
|
-
this.updateInteractionState(InteractionState.default);
|
|
48815
|
+
resetInteractionState = debounce((state) => {
|
|
48816
|
+
this.updateInteractionState(state ?? InteractionState.default);
|
|
48725
48817
|
}, 100);
|
|
48726
48818
|
constructor(table) {
|
|
48727
48819
|
this.table = table;
|
|
@@ -48990,6 +49082,9 @@
|
|
|
48990
49082
|
if (this.interactionState === mode) {
|
|
48991
49083
|
return;
|
|
48992
49084
|
}
|
|
49085
|
+
if (mode === InteractionState.scrolling) {
|
|
49086
|
+
this.interactionStateBeforeScroll = this.interactionState;
|
|
49087
|
+
}
|
|
48993
49088
|
const oldState = this.interactionState;
|
|
48994
49089
|
this.interactionState = mode;
|
|
48995
49090
|
if (oldState === InteractionState.scrolling && mode === InteractionState.default) ;
|
|
@@ -49196,8 +49291,9 @@
|
|
|
49196
49291
|
this.fillHandle.beforeFillMinCol = undefined;
|
|
49197
49292
|
this.fillHandle.beforeFillMinRow = undefined;
|
|
49198
49293
|
}
|
|
49199
|
-
startMoveCol(col, row, x, y) {
|
|
49294
|
+
startMoveCol(col, row, x, y, event) {
|
|
49200
49295
|
startMoveCol(col, row, x, y, this);
|
|
49296
|
+
this.table.fireListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION_START, { col, row, x, y, event });
|
|
49201
49297
|
}
|
|
49202
49298
|
updateMoveCol(col, row, x, y) {
|
|
49203
49299
|
updateMoveCol(col, row, x, y, this);
|
|
@@ -49938,7 +50034,7 @@
|
|
|
49938
50034
|
state.setScrollTop(state.scroll.verticalBarPos + optimizedDeltaY, event);
|
|
49939
50035
|
state.showVerticalScrollBar(true);
|
|
49940
50036
|
}
|
|
49941
|
-
isWheelEvent && state.resetInteractionState();
|
|
50037
|
+
isWheelEvent && state.resetInteractionState(state.interactionStateBeforeScroll);
|
|
49942
50038
|
if (event.nativeEvent?.cancelable &&
|
|
49943
50039
|
(state.table.internalProps.overscrollBehavior === 'none' ||
|
|
49944
50040
|
(Math.abs(deltaY) >= Math.abs(deltaX) && deltaY !== 0 && isVerticalScrollable(deltaY, state)) ||
|
|
@@ -50056,6 +50152,17 @@
|
|
|
50056
50152
|
eventManager.touchSetTimeout = undefined;
|
|
50057
50153
|
}
|
|
50058
50154
|
const eventArgsSet = getCellEventArgsSet(e);
|
|
50155
|
+
if (eventArgsSet.eventArgs && table.hasListeners(TABLE_EVENT_TYPE.MOUSEMOVE_TABLE)) {
|
|
50156
|
+
table.fireListeners(TABLE_EVENT_TYPE.MOUSEMOVE_TABLE, {
|
|
50157
|
+
col: eventArgsSet.eventArgs.col,
|
|
50158
|
+
row: eventArgsSet.eventArgs.row,
|
|
50159
|
+
x: eventArgsSet.abstractPos.x,
|
|
50160
|
+
y: eventArgsSet.abstractPos.y,
|
|
50161
|
+
event: e.nativeEvent,
|
|
50162
|
+
target: eventArgsSet?.eventArgs?.target,
|
|
50163
|
+
mergeCellInfo: eventArgsSet.eventArgs?.mergeInfo
|
|
50164
|
+
});
|
|
50165
|
+
}
|
|
50059
50166
|
if (stateManager.interactionState === InteractionState.grabing &&
|
|
50060
50167
|
!table.editorManager?.editingEditor) {
|
|
50061
50168
|
if (Math.abs(lastX - e.x) + Math.abs(lastY - e.y) >= 1) {
|
|
@@ -50264,7 +50371,8 @@
|
|
|
50264
50371
|
source: {
|
|
50265
50372
|
col: table.stateManager.columnMove.colSource,
|
|
50266
50373
|
row: table.stateManager.columnMove.rowSource
|
|
50267
|
-
}
|
|
50374
|
+
},
|
|
50375
|
+
event: e.nativeEvent
|
|
50268
50376
|
});
|
|
50269
50377
|
}
|
|
50270
50378
|
}
|
|
@@ -50299,6 +50407,17 @@
|
|
|
50299
50407
|
}
|
|
50300
50408
|
stateManager.updateInteractionState(InteractionState.default);
|
|
50301
50409
|
eventManager.dealTableHover();
|
|
50410
|
+
});
|
|
50411
|
+
}
|
|
50412
|
+
};
|
|
50413
|
+
const globalPointerdownCallback = (e) => {
|
|
50414
|
+
const target = e.target;
|
|
50415
|
+
if (!table.getElement().contains(target)) {
|
|
50416
|
+
const isCompleteEdit = table.editorManager?.completeEdit(e);
|
|
50417
|
+
getPromiseValue(isCompleteEdit, isCompleteEdit => {
|
|
50418
|
+
if (isCompleteEdit === false) {
|
|
50419
|
+
return;
|
|
50420
|
+
}
|
|
50302
50421
|
if (table.options.select?.outsideClickDeselect) {
|
|
50303
50422
|
const isHasSelected = !!stateManager.select.ranges?.length;
|
|
50304
50423
|
eventManager.dealTableSelect();
|
|
@@ -50312,7 +50431,13 @@
|
|
|
50312
50431
|
env: 'document',
|
|
50313
50432
|
callback: globalPointerupCallback
|
|
50314
50433
|
});
|
|
50434
|
+
eventManager.globalEventListeners.push({
|
|
50435
|
+
name: 'pointerdown',
|
|
50436
|
+
env: 'document',
|
|
50437
|
+
callback: globalPointerdownCallback
|
|
50438
|
+
});
|
|
50315
50439
|
vglobal.addEventListener('pointerup', globalPointerupCallback);
|
|
50440
|
+
vglobal.addEventListener('pointerdown', globalPointerdownCallback);
|
|
50316
50441
|
table.scenegraph.tableGroup.addEventListener('pointerdown', (e) => {
|
|
50317
50442
|
if (table.hasListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE)) {
|
|
50318
50443
|
table.fireListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE, {
|
|
@@ -50392,7 +50517,7 @@
|
|
|
50392
50517
|
}
|
|
50393
50518
|
}
|
|
50394
50519
|
else if (hitIcon.attribute.funcType === IconFuncTypeEnum.dragReorder) {
|
|
50395
|
-
stateManager.startMoveCol(eventArgsSet.eventArgs.col, eventArgsSet.eventArgs.row, eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y);
|
|
50520
|
+
stateManager.startMoveCol(eventArgsSet.eventArgs.col, eventArgsSet.eventArgs.row, eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y, eventArgsSet.eventArgs?.event?.nativeEvent);
|
|
50396
50521
|
stateManager.updateInteractionState(InteractionState.grabing);
|
|
50397
50522
|
}
|
|
50398
50523
|
if (table.hasListeners(TABLE_EVENT_TYPE.MOUSEDOWN_CELL)) {
|
|
@@ -50432,7 +50557,8 @@
|
|
|
50432
50557
|
source: {
|
|
50433
50558
|
col: table.stateManager.columnMove.colSource,
|
|
50434
50559
|
row: table.stateManager.columnMove.rowSource
|
|
50435
|
-
}
|
|
50560
|
+
},
|
|
50561
|
+
event: e.nativeEvent
|
|
50436
50562
|
});
|
|
50437
50563
|
}
|
|
50438
50564
|
}
|
|
@@ -51535,7 +51661,7 @@
|
|
|
51535
51661
|
let left = false;
|
|
51536
51662
|
if (y > drawRange.bottom - bottomFrozenRowHeight &&
|
|
51537
51663
|
canScrollY &&
|
|
51538
|
-
table.scrollTop + table.
|
|
51664
|
+
table.scrollTop + table.tableNoFrameHeight < table.getAllRowsHeight()) {
|
|
51539
51665
|
bottom = true;
|
|
51540
51666
|
table.eventManager.scrollYSpeed = -(y - drawRange.bottom + bottomFrozenRowHeight) / 50;
|
|
51541
51667
|
}
|
|
@@ -52166,7 +52292,7 @@
|
|
|
52166
52292
|
this.table.options.select?.disableHeaderSelect ||
|
|
52167
52293
|
this.table.options.select?.disableSelect) &&
|
|
52168
52294
|
this.table._canDragHeaderPosition(eventArgs.col, eventArgs.row)) {
|
|
52169
|
-
this.table.stateManager.startMoveCol(eventArgs.col, eventArgs.row, eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y);
|
|
52295
|
+
this.table.stateManager.startMoveCol(eventArgs.col, eventArgs.row, eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y, eventArgs?.event?.nativeEvent);
|
|
52170
52296
|
return true;
|
|
52171
52297
|
}
|
|
52172
52298
|
return false;
|
|
@@ -56294,6 +56420,55 @@
|
|
|
56294
56420
|
return cacheStyle;
|
|
56295
56421
|
}
|
|
56296
56422
|
|
|
56423
|
+
class Animateaaa extends ACustomAnimate {
|
|
56424
|
+
onUpdate(end, ratio, out) {
|
|
56425
|
+
if (this.from.x !== this.to.x) {
|
|
56426
|
+
const x = end ? this.to.x : this.from.x + Math.floor((this.to.x - this.from.x) * ratio);
|
|
56427
|
+
this.params.table.scrollLeft = x;
|
|
56428
|
+
}
|
|
56429
|
+
if (this.from.y !== this.to.y) {
|
|
56430
|
+
const y = end ? this.to.y : this.from.y + Math.floor((this.to.y - this.from.y) * ratio);
|
|
56431
|
+
this.params.table.scrollTop = y;
|
|
56432
|
+
}
|
|
56433
|
+
}
|
|
56434
|
+
}
|
|
56435
|
+
class TableAnimationManager {
|
|
56436
|
+
table;
|
|
56437
|
+
timeline;
|
|
56438
|
+
ticker;
|
|
56439
|
+
animation;
|
|
56440
|
+
tempGraphic;
|
|
56441
|
+
constructor(table) {
|
|
56442
|
+
this.table = table;
|
|
56443
|
+
this.timeline = new DefaultTimeline();
|
|
56444
|
+
this.ticker = new DefaultTicker([this.timeline]);
|
|
56445
|
+
this.tempGraphic = createRect({});
|
|
56446
|
+
}
|
|
56447
|
+
scrollTo(position, animationOption) {
|
|
56448
|
+
const from = {
|
|
56449
|
+
x: this.table.scrollLeft,
|
|
56450
|
+
y: this.table.scrollTop
|
|
56451
|
+
};
|
|
56452
|
+
const cellRect = this.table.getCellRect(position.col ?? 0, position.row ?? 0);
|
|
56453
|
+
const to = {
|
|
56454
|
+
x: isNumber$2(position.col) ? cellRect.left - this.table.getFrozenColsWidth() : this.table.scrollLeft,
|
|
56455
|
+
y: isNumber$2(position.row) ? cellRect.top - this.table.getFrozenRowsHeight() : this.table.scrollTop
|
|
56456
|
+
};
|
|
56457
|
+
const duration = !isBoolean$2(animationOption) ? animationOption?.duration ?? 3000 : animationOption ? 3000 : 0;
|
|
56458
|
+
const easing = !isBoolean$2(animationOption) ? animationOption?.easing ?? 'linear' : animationOption ? 'linear' : '';
|
|
56459
|
+
const animation = new Animate().bind(this.tempGraphic).play(new Animateaaa(from, to, duration, easing, {
|
|
56460
|
+
graphic: this.tempGraphic,
|
|
56461
|
+
table: this.table
|
|
56462
|
+
}));
|
|
56463
|
+
this.timeline.addAnimate(animation);
|
|
56464
|
+
this.ticker.start();
|
|
56465
|
+
}
|
|
56466
|
+
clear() {
|
|
56467
|
+
this.timeline.clear();
|
|
56468
|
+
this.ticker.stop();
|
|
56469
|
+
}
|
|
56470
|
+
}
|
|
56471
|
+
|
|
56297
56472
|
const { toBoxArray } = style;
|
|
56298
56473
|
const { isTouchEvent } = event;
|
|
56299
56474
|
const rangeReg = /^\$(\d+)\$(\d+)$/;
|
|
@@ -56321,13 +56496,14 @@
|
|
|
56321
56496
|
stateManager;
|
|
56322
56497
|
eventManager;
|
|
56323
56498
|
editorManager;
|
|
56499
|
+
animationManager;
|
|
56324
56500
|
_pixelRatio;
|
|
56325
56501
|
canvasSizeSeted;
|
|
56326
56502
|
static get EVENT_TYPE() {
|
|
56327
56503
|
return TABLE_EVENT_TYPE;
|
|
56328
56504
|
}
|
|
56329
56505
|
options;
|
|
56330
|
-
version = "1.
|
|
56506
|
+
version = "1.9.0";
|
|
56331
56507
|
pagination;
|
|
56332
56508
|
id = `VTable${Date.now()}`;
|
|
56333
56509
|
headerStyleCache;
|
|
@@ -56479,6 +56655,7 @@
|
|
|
56479
56655
|
this.scenegraph = new Scenegraph(this);
|
|
56480
56656
|
this.stateManager = new StateManager(this);
|
|
56481
56657
|
this.eventManager = new EventManager(this);
|
|
56658
|
+
this.animationManager = new TableAnimationManager(this);
|
|
56482
56659
|
if (options.legends) {
|
|
56483
56660
|
internalProps.legends = [];
|
|
56484
56661
|
const createLegend = Factory.getFunction('createLegend');
|
|
@@ -58389,20 +58566,6 @@
|
|
|
58389
58566
|
.fill(0)
|
|
58390
58567
|
.map((_, j) => this.getCellInfo(j + start.col, i + start.row)));
|
|
58391
58568
|
}
|
|
58392
|
-
scrollToCell(cellAddr) {
|
|
58393
|
-
const drawRange = this.getDrawRange();
|
|
58394
|
-
if (isValid$1(cellAddr.col) && cellAddr.col >= this.frozenColCount) {
|
|
58395
|
-
const frozenWidth = this.getFrozenColsWidth();
|
|
58396
|
-
const left = this.getColsWidth(0, cellAddr.col - 1);
|
|
58397
|
-
this.scrollLeft = Math.min(left - frozenWidth, this.getAllColsWidth() - drawRange.width);
|
|
58398
|
-
}
|
|
58399
|
-
if (isValid$1(cellAddr.row) && cellAddr.row >= this.frozenRowCount) {
|
|
58400
|
-
const frozenHeight = this.getFrozenRowsHeight();
|
|
58401
|
-
const top = this.getRowsHeight(0, cellAddr.row - 1);
|
|
58402
|
-
this.scrollTop = Math.min(top - frozenHeight, this.getAllRowsHeight() - drawRange.height);
|
|
58403
|
-
}
|
|
58404
|
-
this.render();
|
|
58405
|
-
}
|
|
58406
58569
|
getCopyValue() {
|
|
58407
58570
|
if (this.stateManager.select?.ranges?.length > 0) {
|
|
58408
58571
|
const ranges = this.stateManager.select.ranges;
|
|
@@ -58968,6 +59131,38 @@
|
|
|
58968
59131
|
getGroupTitleLevel(col, row) {
|
|
58969
59132
|
return undefined;
|
|
58970
59133
|
}
|
|
59134
|
+
scrollToRow(row, animationOption) {
|
|
59135
|
+
if (!animationOption) {
|
|
59136
|
+
this.scrollToCell({ row });
|
|
59137
|
+
return;
|
|
59138
|
+
}
|
|
59139
|
+
this.animationManager.scrollTo({ row }, animationOption);
|
|
59140
|
+
}
|
|
59141
|
+
scrollToCol(col, animationOption) {
|
|
59142
|
+
if (!animationOption) {
|
|
59143
|
+
this.scrollToCell({ col });
|
|
59144
|
+
return;
|
|
59145
|
+
}
|
|
59146
|
+
this.animationManager.scrollTo({ col }, animationOption);
|
|
59147
|
+
}
|
|
59148
|
+
scrollToCell(cellAddr, animationOption) {
|
|
59149
|
+
if (animationOption) {
|
|
59150
|
+
this.animationManager.scrollTo(cellAddr, animationOption);
|
|
59151
|
+
return;
|
|
59152
|
+
}
|
|
59153
|
+
const drawRange = this.getDrawRange();
|
|
59154
|
+
if (isValid$1(cellAddr.col) && cellAddr.col >= this.frozenColCount) {
|
|
59155
|
+
const frozenWidth = this.getFrozenColsWidth();
|
|
59156
|
+
const left = this.getColsWidth(0, cellAddr.col - 1);
|
|
59157
|
+
this.scrollLeft = Math.min(left - frozenWidth, this.getAllColsWidth() - drawRange.width);
|
|
59158
|
+
}
|
|
59159
|
+
if (isValid$1(cellAddr.row) && cellAddr.row >= this.frozenRowCount) {
|
|
59160
|
+
const frozenHeight = this.getFrozenRowsHeight();
|
|
59161
|
+
const top = this.getRowsHeight(0, cellAddr.row - 1);
|
|
59162
|
+
this.scrollTop = Math.min(top - frozenHeight, this.getAllRowsHeight() - drawRange.height);
|
|
59163
|
+
}
|
|
59164
|
+
this.render();
|
|
59165
|
+
}
|
|
58971
59166
|
}
|
|
58972
59167
|
|
|
58973
59168
|
var core = /*#__PURE__*/Object.freeze({
|
|
@@ -60311,13 +60506,18 @@
|
|
|
60311
60506
|
return false;
|
|
60312
60507
|
}
|
|
60313
60508
|
isSeriesNumber(col, row) {
|
|
60314
|
-
if (
|
|
60315
|
-
|
|
60316
|
-
|
|
60317
|
-
|
|
60318
|
-
|
|
60319
|
-
|
|
60320
|
-
|
|
60509
|
+
if (isValid$1(col) && isValid$1(row)) {
|
|
60510
|
+
if (this.leftRowSeriesNumberColumnCount > 0 &&
|
|
60511
|
+
col >= 0 &&
|
|
60512
|
+
row >= 0 &&
|
|
60513
|
+
col < this.leftRowSeriesNumberColumnCount) {
|
|
60514
|
+
return true;
|
|
60515
|
+
}
|
|
60516
|
+
if (this.rightRowSeriesNumberColumnCount > 0 &&
|
|
60517
|
+
row >= 0 &&
|
|
60518
|
+
col >= this.colCount - this.rightRowSeriesNumberColumnCount) {
|
|
60519
|
+
return true;
|
|
60520
|
+
}
|
|
60321
60521
|
}
|
|
60322
60522
|
return false;
|
|
60323
60523
|
}
|
|
@@ -62214,6 +62414,10 @@
|
|
|
62214
62414
|
this.internalProps.headerHelper.setTableColumnsEditor();
|
|
62215
62415
|
this._hasAutoImageColumn = undefined;
|
|
62216
62416
|
this.refreshHeader();
|
|
62417
|
+
this.dataSource.updateColumns?.(this.internalProps.columns);
|
|
62418
|
+
if (this.records && checkHasAggregationOnColumnDefine(columns)) {
|
|
62419
|
+
this.dataSource.processRecords(this.dataSource.dataSourceObj?.records ?? this.dataSource.dataSourceObj);
|
|
62420
|
+
}
|
|
62217
62421
|
this.internalProps.useOneRowHeightFillAll = false;
|
|
62218
62422
|
this.scenegraph.clearCells();
|
|
62219
62423
|
this.headerStyleCache = new Map();
|
|
@@ -65209,12 +65413,14 @@
|
|
|
65209
65413
|
}
|
|
65210
65414
|
getLegendAttributes(rect) {
|
|
65211
65415
|
const layout = this.orient === 'bottom' || this.orient === 'top' ? 'horizontal' : 'vertical';
|
|
65416
|
+
const legendAttrs = getLegendAttributes(this.option, rect);
|
|
65417
|
+
const padding = getQuadProps(legendAttrs.padding ?? this.option.padding ?? 10);
|
|
65212
65418
|
const attrs = {
|
|
65213
65419
|
layout,
|
|
65214
65420
|
items: this.getLegendItems(),
|
|
65215
|
-
maxWidth: rect.width,
|
|
65216
|
-
maxHeight: rect.height,
|
|
65217
|
-
...
|
|
65421
|
+
maxWidth: rect.width - padding[1] - padding[3],
|
|
65422
|
+
maxHeight: rect.height - padding[0] - padding[2],
|
|
65423
|
+
...legendAttrs
|
|
65218
65424
|
};
|
|
65219
65425
|
return attrs;
|
|
65220
65426
|
}
|
|
@@ -69309,6 +69515,8 @@
|
|
|
69309
69515
|
dimensionKey: dimensionKey,
|
|
69310
69516
|
id,
|
|
69311
69517
|
value: dimensionKey,
|
|
69518
|
+
headerCustomRender: this.cornerSetting.customRender,
|
|
69519
|
+
headerCustomLayout: this.cornerSetting.customLayout,
|
|
69312
69520
|
headerEditor: this.cornerSetting.headerEditor,
|
|
69313
69521
|
disableHeaderHover: !!this.cornerSetting.disableHeaderHover,
|
|
69314
69522
|
disableHeaderSelect: !!this.cornerSetting.disableHeaderSelect
|
|
@@ -69354,7 +69562,8 @@
|
|
|
69354
69562
|
define: {
|
|
69355
69563
|
dimensionKey: '维度名称',
|
|
69356
69564
|
id,
|
|
69357
|
-
|
|
69565
|
+
headerCustomRender: this.cornerSetting.customRender,
|
|
69566
|
+
headerCustomLayout: this.cornerSetting.customLayout,
|
|
69358
69567
|
disableHeaderHover: !!this.cornerSetting.disableHeaderHover,
|
|
69359
69568
|
disableHeaderSelect: !!this.cornerSetting.disableHeaderSelect
|
|
69360
69569
|
}
|
|
@@ -69440,7 +69649,14 @@
|
|
|
69440
69649
|
});
|
|
69441
69650
|
}
|
|
69442
69651
|
else {
|
|
69443
|
-
const rowDimensionKeys = this.rowDimensionTree.
|
|
69652
|
+
const rowDimensionKeys = this.rowDimensionTree.totalLevel > 0
|
|
69653
|
+
? this.rowDimensionTree.dimensionKeysIncludeVirtual.valueArr()
|
|
69654
|
+
: this.rowsDefine.map(dimension => {
|
|
69655
|
+
if (typeof dimension === 'string') {
|
|
69656
|
+
return dimension;
|
|
69657
|
+
}
|
|
69658
|
+
return dimension.dimensionKey;
|
|
69659
|
+
});
|
|
69444
69660
|
rowDimensionKeys.forEach((objKey, index) => {
|
|
69445
69661
|
const dimension = this.rowsDefine?.find(dimension => typeof dimension === 'string' ? false : dimension.dimensionKey === objKey);
|
|
69446
69662
|
dimension &&
|
|
@@ -71403,13 +71619,18 @@
|
|
|
71403
71619
|
return false;
|
|
71404
71620
|
}
|
|
71405
71621
|
isSeriesNumber(col, row) {
|
|
71406
|
-
if (
|
|
71407
|
-
|
|
71408
|
-
|
|
71409
|
-
|
|
71410
|
-
|
|
71411
|
-
|
|
71412
|
-
|
|
71622
|
+
if (isValid$1(col) && isValid$1(row)) {
|
|
71623
|
+
if (this.leftRowSeriesNumberColumnCount > 0 &&
|
|
71624
|
+
col >= 0 &&
|
|
71625
|
+
row >= 0 &&
|
|
71626
|
+
col < this.leftRowSeriesNumberColumnCount) {
|
|
71627
|
+
return true;
|
|
71628
|
+
}
|
|
71629
|
+
if (this.rightRowSeriesNumberColumnCount > 0 &&
|
|
71630
|
+
row >= 0 &&
|
|
71631
|
+
col >= this.colCount - this.rightRowSeriesNumberColumnCount) {
|
|
71632
|
+
return true;
|
|
71633
|
+
}
|
|
71413
71634
|
}
|
|
71414
71635
|
return false;
|
|
71415
71636
|
}
|
|
@@ -76472,7 +76693,7 @@
|
|
|
76472
76693
|
}
|
|
76473
76694
|
|
|
76474
76695
|
registerForVrender();
|
|
76475
|
-
const version = "1.
|
|
76696
|
+
const version = "1.9.0";
|
|
76476
76697
|
function getIcons() {
|
|
76477
76698
|
return get$2();
|
|
76478
76699
|
}
|