@visactor/vtable 1.11.2-alpha.3 → 1.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/components/tooltip/TooltipHandler.d.ts +1 -1
- package/cjs/components/tooltip/TooltipHandler.js +3 -3
- package/cjs/components/tooltip/TooltipHandler.js.map +1 -1
- package/cjs/core/BaseTable.js +5 -3
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/event/media-click.js +6 -3
- package/cjs/event/media-click.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/simple-header-layout.js +14 -8
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/cjs/plugins/custom-cell-style.d.ts +2 -2
- package/cjs/plugins/custom-cell-style.js +13 -9
- package/cjs/plugins/custom-cell-style.js.map +1 -1
- package/cjs/scenegraph/layout/update-height.js +6 -6
- package/cjs/scenegraph/layout/update-height.js.map +1 -1
- package/cjs/scenegraph/layout/update-width.js +4 -2
- package/cjs/scenegraph/layout/update-width.js.map +1 -1
- package/cjs/state/checkbox/checkbox.js +25 -6
- package/cjs/state/checkbox/checkbox.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +3 -1
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/list-table/define/Composite-define.d.ts +2 -1
- package/cjs/ts-types/list-table/define/Composite-define.js.map +1 -1
- package/cjs/ts-types/list-table/define/link-define.d.ts +3 -2
- package/cjs/ts-types/list-table/define/link-define.js.map +1 -1
- package/cjs/ts-types/list-table/layout-map/api.d.ts +2 -2
- package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
- package/cjs/ts-types/pivot-table/dimension/link-dimension.d.ts +2 -1
- package/cjs/ts-types/pivot-table/dimension/link-dimension.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/composite-indicator.d.ts +2 -1
- package/cjs/ts-types/pivot-table/indicator/composite-indicator.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/link-indicator.d.ts +3 -2
- package/cjs/ts-types/pivot-table/indicator/link-indicator.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +89 -37
- package/dist/vtable.min.js +2 -2
- package/es/components/tooltip/TooltipHandler.d.ts +1 -1
- package/es/components/tooltip/TooltipHandler.js +2 -4
- package/es/components/tooltip/TooltipHandler.js.map +1 -1
- package/es/core/BaseTable.js +6 -4
- package/es/core/BaseTable.js.map +1 -1
- package/es/event/media-click.js +7 -2
- package/es/event/media-click.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/simple-header-layout.js +15 -9
- package/es/layout/simple-header-layout.js.map +1 -1
- package/es/plugins/custom-cell-style.d.ts +2 -2
- package/es/plugins/custom-cell-style.js +13 -9
- package/es/plugins/custom-cell-style.js.map +1 -1
- package/es/scenegraph/layout/update-height.js +4 -4
- package/es/scenegraph/layout/update-height.js.map +1 -1
- package/es/scenegraph/layout/update-width.js +2 -2
- package/es/scenegraph/layout/update-width.js.map +1 -1
- package/es/state/checkbox/checkbox.js +25 -6
- package/es/state/checkbox/checkbox.js.map +1 -1
- package/es/ts-types/base-table.d.ts +3 -1
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/list-table/define/Composite-define.d.ts +2 -1
- package/es/ts-types/list-table/define/Composite-define.js.map +1 -1
- package/es/ts-types/list-table/define/link-define.d.ts +3 -2
- package/es/ts-types/list-table/define/link-define.js.map +1 -1
- package/es/ts-types/list-table/layout-map/api.d.ts +2 -2
- package/es/ts-types/list-table/layout-map/api.js.map +1 -1
- package/es/ts-types/pivot-table/dimension/link-dimension.d.ts +2 -1
- package/es/ts-types/pivot-table/dimension/link-dimension.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/composite-indicator.d.ts +2 -1
- package/es/ts-types/pivot-table/indicator/composite-indicator.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/link-indicator.d.ts +3 -2
- package/es/ts-types/pivot-table/indicator/link-indicator.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +5 -5
package/dist/vtable.js
CHANGED
|
@@ -37638,7 +37638,8 @@
|
|
|
37638
37638
|
});
|
|
37639
37639
|
if (renderDefault) {
|
|
37640
37640
|
const style = table._getCellStyle(colStart, rowStart);
|
|
37641
|
-
|
|
37641
|
+
const padding = getQuadProps(getProp('padding', style, col, row, table));
|
|
37642
|
+
updateCellContentHeight(singleCellGroup, distHeight, detaY, autoRowHeight, padding, style.textAlign, style.textBaseline, table);
|
|
37642
37643
|
}
|
|
37643
37644
|
const rangeHeight = table.getRowHeight(row);
|
|
37644
37645
|
const rangeWidth = table.getColWidth(col);
|
|
@@ -37661,7 +37662,8 @@
|
|
|
37661
37662
|
}
|
|
37662
37663
|
else {
|
|
37663
37664
|
const style = table._getCellStyle(cellGroup.col, cellGroup.row);
|
|
37664
|
-
|
|
37665
|
+
const padding = getQuadProps(getProp('padding', style, cellGroup.col, cellGroup.row, table));
|
|
37666
|
+
updateCellContentHeight(cellGroup, distHeight, detaY, autoRowHeight, padding, style.textAlign, style.textBaseline, table);
|
|
37665
37667
|
}
|
|
37666
37668
|
}
|
|
37667
37669
|
|
|
@@ -38006,7 +38008,7 @@
|
|
|
38006
38008
|
let changed = false;
|
|
38007
38009
|
if (renderDefault) {
|
|
38008
38010
|
const style = table._getCellStyle(colStart, rowStart);
|
|
38009
|
-
const padding = getQuadProps(style
|
|
38011
|
+
const padding = getQuadProps(getProp('padding', style, col, row, table));
|
|
38010
38012
|
const textAlign = style.textAlign;
|
|
38011
38013
|
const textBaseline = style.textBaseline;
|
|
38012
38014
|
changed = updateCellContentWidth(singleCellGroup, distWidth, cellHeight, detaX, autoRowHeight, padding, textAlign, textBaseline, table.scenegraph);
|
|
@@ -38041,7 +38043,7 @@
|
|
|
38041
38043
|
return isHeightChange;
|
|
38042
38044
|
}
|
|
38043
38045
|
const style = table._getCellStyle(cellGroup.col, cellGroup.row);
|
|
38044
|
-
const padding = getQuadProps(style.
|
|
38046
|
+
const padding = getQuadProps(getProp('padding', style, cellGroup.col, cellGroup.row, table));
|
|
38045
38047
|
const textAlign = style.textAlign;
|
|
38046
38048
|
const textBaseline = style.textBaseline;
|
|
38047
38049
|
return updateCellContentWidth(cellGroup, distWidth, table.getRowHeight(cellGroup.row), detaX, autoRowHeight, padding, textAlign, textBaseline, table.scenegraph);
|
|
@@ -49402,6 +49404,18 @@
|
|
|
49402
49404
|
}
|
|
49403
49405
|
}
|
|
49404
49406
|
});
|
|
49407
|
+
if (state.table.leftRowSeriesNumberCount === 1) {
|
|
49408
|
+
state.headerCheckedState._vtable_rowSeries_number = false;
|
|
49409
|
+
state._checkboxCellTypeFields.push('_vtable_rowSeries_number');
|
|
49410
|
+
isNeedInitHeaderCheckedStateFromRecord = true;
|
|
49411
|
+
}
|
|
49412
|
+
else if (state.table.leftRowSeriesNumberCount > 1) {
|
|
49413
|
+
for (let i = 0; i < state.table.leftRowSeriesNumberCount; i++) {
|
|
49414
|
+
state.headerCheckedState[`_vtable_rowSeries_number_${i}`] = false;
|
|
49415
|
+
state._checkboxCellTypeFields.push(`_vtable_rowSeries_number_${i}`);
|
|
49416
|
+
}
|
|
49417
|
+
isNeedInitHeaderCheckedStateFromRecord = true;
|
|
49418
|
+
}
|
|
49405
49419
|
if (isNeedInitHeaderCheckedStateFromRecord) {
|
|
49406
49420
|
records.forEach((record, index) => {
|
|
49407
49421
|
state._checkboxCellTypeFields.forEach(field => {
|
|
@@ -49493,30 +49507,49 @@
|
|
|
49493
49507
|
}
|
|
49494
49508
|
}
|
|
49495
49509
|
function setCellCheckboxState(col, row, checked, table) {
|
|
49496
|
-
const
|
|
49497
|
-
const
|
|
49498
|
-
if (!
|
|
49510
|
+
const cellGroup = table.scenegraph.getCell(col, row);
|
|
49511
|
+
const checkbox = cellGroup?.getChildByName('checkbox');
|
|
49512
|
+
if (!checkbox) {
|
|
49513
|
+
const field = table.getHeaderField(col, row);
|
|
49514
|
+
if (table.isHeader(col, row)) {
|
|
49515
|
+
table.stateManager.setHeaderCheckedState(field, checked);
|
|
49516
|
+
const cellType = table.getCellType(col, row);
|
|
49517
|
+
if (cellType === 'checkbox') {
|
|
49518
|
+
table.scenegraph.updateCheckboxCellState(col, row, checked);
|
|
49519
|
+
}
|
|
49520
|
+
}
|
|
49521
|
+
else {
|
|
49522
|
+
table.stateManager.setCheckedState(col, row, field, checked);
|
|
49523
|
+
const cellType = table.getCellType(col, row);
|
|
49524
|
+
if (cellType === 'checkbox') {
|
|
49525
|
+
const oldHeaderCheckedState = table.stateManager.headerCheckedState[field];
|
|
49526
|
+
const newHeaderCheckedState = table.stateManager.updateHeaderCheckedState(field, col, row);
|
|
49527
|
+
if (oldHeaderCheckedState !== newHeaderCheckedState) {
|
|
49528
|
+
table.scenegraph.updateHeaderCheckboxCellState(col, row, newHeaderCheckedState);
|
|
49529
|
+
}
|
|
49530
|
+
}
|
|
49531
|
+
}
|
|
49499
49532
|
return;
|
|
49500
49533
|
}
|
|
49501
|
-
const { checked: oldChecked, indeterminate } =
|
|
49534
|
+
const { checked: oldChecked, indeterminate } = checkbox.attribute;
|
|
49502
49535
|
if (indeterminate) {
|
|
49503
49536
|
if (checked) {
|
|
49504
|
-
|
|
49537
|
+
checkbox._handlePointerUp();
|
|
49505
49538
|
}
|
|
49506
49539
|
else {
|
|
49507
|
-
|
|
49508
|
-
|
|
49540
|
+
checkbox._handlePointerUp();
|
|
49541
|
+
checkbox._handlePointerUp();
|
|
49509
49542
|
}
|
|
49510
49543
|
}
|
|
49511
49544
|
else if (oldChecked) {
|
|
49512
49545
|
if (checked) ;
|
|
49513
49546
|
else {
|
|
49514
|
-
|
|
49547
|
+
checkbox._handlePointerUp();
|
|
49515
49548
|
}
|
|
49516
49549
|
}
|
|
49517
49550
|
else {
|
|
49518
49551
|
if (checked) {
|
|
49519
|
-
|
|
49552
|
+
checkbox._handlePointerUp();
|
|
49520
49553
|
}
|
|
49521
49554
|
}
|
|
49522
49555
|
}
|
|
@@ -50803,10 +50836,15 @@
|
|
|
50803
50836
|
__value: cellValue,
|
|
50804
50837
|
__dataValue: cellOriginValue
|
|
50805
50838
|
}, rowData);
|
|
50806
|
-
|
|
50807
|
-
|
|
50808
|
-
|
|
50809
|
-
|
|
50839
|
+
if (isFunction$1(templateLink)) {
|
|
50840
|
+
url = templateLink(data, col, row, table);
|
|
50841
|
+
}
|
|
50842
|
+
else {
|
|
50843
|
+
const re = /\{\s*(\S+?)\s*\}/g;
|
|
50844
|
+
url = templateLink.replace(re, (matchs, key) => {
|
|
50845
|
+
return data[key];
|
|
50846
|
+
});
|
|
50847
|
+
}
|
|
50810
50848
|
}
|
|
50811
50849
|
else if (!linkDetect) {
|
|
50812
50850
|
url = cellValue;
|
|
@@ -55374,15 +55412,21 @@
|
|
|
55374
55412
|
this.customCellStyleArrangement = customCellStyleArrangement;
|
|
55375
55413
|
}
|
|
55376
55414
|
getCustomCellStyle(col, row) {
|
|
55377
|
-
const
|
|
55378
|
-
if (
|
|
55379
|
-
const
|
|
55380
|
-
|
|
55415
|
+
const customStyleIds = this.getCustomCellStyleIds(col, row);
|
|
55416
|
+
if (customStyleIds.length) {
|
|
55417
|
+
const styles = [];
|
|
55418
|
+
customStyleIds.forEach(customStyleId => {
|
|
55419
|
+
const styleOption = this.getCustomCellStyleOption(customStyleId);
|
|
55420
|
+
if (styleOption?.style) {
|
|
55421
|
+
styles.push(styleOption.style);
|
|
55422
|
+
}
|
|
55423
|
+
});
|
|
55424
|
+
return merge({}, ...styles);
|
|
55381
55425
|
}
|
|
55382
55426
|
return undefined;
|
|
55383
55427
|
}
|
|
55384
|
-
|
|
55385
|
-
|
|
55428
|
+
getCustomCellStyleIds(col, row) {
|
|
55429
|
+
const customStyleIds = [];
|
|
55386
55430
|
const range = this.table.getCellRange(col, row);
|
|
55387
55431
|
for (let c = range.start.col; c <= range.end.col; c++) {
|
|
55388
55432
|
for (let r = range.start.row; r <= range.end.row; r++) {
|
|
@@ -55392,16 +55436,16 @@
|
|
|
55392
55436
|
style.cellPosition.range.end.col >= c &&
|
|
55393
55437
|
style.cellPosition.range.start.row <= r &&
|
|
55394
55438
|
style.cellPosition.range.end.row >= r) {
|
|
55395
|
-
|
|
55439
|
+
customStyleIds.push(style.customStyleId);
|
|
55396
55440
|
}
|
|
55397
55441
|
}
|
|
55398
55442
|
else if (style.cellPosition.col === c && style.cellPosition.row === r) {
|
|
55399
|
-
|
|
55443
|
+
customStyleIds.push(style.customStyleId);
|
|
55400
55444
|
}
|
|
55401
55445
|
});
|
|
55402
55446
|
}
|
|
55403
55447
|
}
|
|
55404
|
-
return
|
|
55448
|
+
return customStyleIds;
|
|
55405
55449
|
}
|
|
55406
55450
|
getCustomCellStyleOption(customStyleId) {
|
|
55407
55451
|
return this.customCellStyle.find(style => style.id === customStyleId);
|
|
@@ -57517,7 +57561,7 @@
|
|
|
57517
57561
|
return TABLE_EVENT_TYPE;
|
|
57518
57562
|
}
|
|
57519
57563
|
options;
|
|
57520
|
-
version = "1.11.2
|
|
57564
|
+
version = "1.11.2";
|
|
57521
57565
|
pagination;
|
|
57522
57566
|
id = `VTable${Date.now()}`;
|
|
57523
57567
|
headerStyleCache;
|
|
@@ -57694,7 +57738,8 @@
|
|
|
57694
57738
|
parentElement: this.getElement(),
|
|
57695
57739
|
renderMode: 'html',
|
|
57696
57740
|
isShowOverflowTextTooltip: false,
|
|
57697
|
-
confine: true
|
|
57741
|
+
confine: true,
|
|
57742
|
+
position: Placement.bottom
|
|
57698
57743
|
}, options.tooltip);
|
|
57699
57744
|
if (internalProps.tooltip.renderMode === 'html') {
|
|
57700
57745
|
const TooltipHandler = Factory.getComponent('tooltipHandler');
|
|
@@ -58914,7 +58959,8 @@
|
|
|
58914
58959
|
parentElement: this.getElement(),
|
|
58915
58960
|
renderMode: 'html',
|
|
58916
58961
|
isShowOverflowTextTooltip: false,
|
|
58917
|
-
confine: true
|
|
58962
|
+
confine: true,
|
|
58963
|
+
position: Placement.bottom
|
|
58918
58964
|
}, options.tooltip);
|
|
58919
58965
|
if (internalProps.tooltip.renderMode === 'html' && !internalProps.tooltipHandler) {
|
|
58920
58966
|
const TooltipHandler = Factory.getComponent('tooltipHandler');
|
|
@@ -61447,17 +61493,17 @@
|
|
|
61447
61493
|
handleRowSeriesNumber(rowSeriesNumber) {
|
|
61448
61494
|
if (rowSeriesNumber) {
|
|
61449
61495
|
if (Array.isArray(rowSeriesNumber)) {
|
|
61450
|
-
this.rowSeriesNumberColumn = rowSeriesNumber.map(seriesNumber => {
|
|
61496
|
+
this.rowSeriesNumberColumn = rowSeriesNumber.map((seriesNumber, index) => {
|
|
61451
61497
|
return {
|
|
61452
61498
|
id: this.seqId++,
|
|
61453
61499
|
title: seriesNumber.title,
|
|
61454
|
-
define: seriesNumber,
|
|
61500
|
+
define: merge({ field: '_vtable_rowSeries_number_' + index }, seriesNumber),
|
|
61455
61501
|
cellType: seriesNumber.cellType ?? 'text',
|
|
61456
61502
|
headerType: rowSeriesNumber.cellType ?? 'text',
|
|
61457
61503
|
style: seriesNumber.style,
|
|
61458
61504
|
width: seriesNumber.width,
|
|
61459
61505
|
format: seriesNumber.format,
|
|
61460
|
-
field: seriesNumber.field,
|
|
61506
|
+
field: seriesNumber.field ?? '_vtable_rowSeries_number_' + index,
|
|
61461
61507
|
icon: seriesNumber.icon,
|
|
61462
61508
|
headerIcon: seriesNumber.headerIcon,
|
|
61463
61509
|
isChildNode: false
|
|
@@ -61469,13 +61515,13 @@
|
|
|
61469
61515
|
{
|
|
61470
61516
|
id: this.seqId++,
|
|
61471
61517
|
title: rowSeriesNumber.title,
|
|
61472
|
-
define: rowSeriesNumber,
|
|
61518
|
+
define: merge({ field: '_vtable_rowSeries_number' }, rowSeriesNumber),
|
|
61473
61519
|
cellType: rowSeriesNumber.cellType ?? 'text',
|
|
61474
61520
|
headerType: rowSeriesNumber.cellType ?? 'text',
|
|
61475
61521
|
style: rowSeriesNumber.style,
|
|
61476
61522
|
width: rowSeriesNumber.width,
|
|
61477
61523
|
format: rowSeriesNumber.format,
|
|
61478
|
-
field: '',
|
|
61524
|
+
field: '_vtable_rowSeries_number',
|
|
61479
61525
|
icon: rowSeriesNumber.icon,
|
|
61480
61526
|
headerIcon: rowSeriesNumber.headerIcon,
|
|
61481
61527
|
isChildNode: false
|
|
@@ -62117,6 +62163,12 @@
|
|
|
62117
62163
|
return this._headerObjectMap[id];
|
|
62118
62164
|
}
|
|
62119
62165
|
getHeaderField(col, row) {
|
|
62166
|
+
if (this.isSeriesNumberInHeader(col, row)) {
|
|
62167
|
+
return this.getSeriesNumberHeader(col, row)?.field;
|
|
62168
|
+
}
|
|
62169
|
+
else if (this.isSeriesNumberInBody(col, row)) {
|
|
62170
|
+
return this.getSeriesNumberBody(col, row)?.field;
|
|
62171
|
+
}
|
|
62120
62172
|
const id = this.getCellId(col, row);
|
|
62121
62173
|
return (this._headerObjectMap[id]?.field ||
|
|
62122
62174
|
(this.transpose
|
|
@@ -67053,7 +67105,7 @@
|
|
|
67053
67105
|
tooltipOption = {
|
|
67054
67106
|
content: headerDescription,
|
|
67055
67107
|
referencePosition: {
|
|
67056
|
-
placement:
|
|
67108
|
+
placement: table.internalProps.tooltip.position,
|
|
67057
67109
|
rect
|
|
67058
67110
|
},
|
|
67059
67111
|
disappearDelay: table.internalProps.tooltip.overflowTextTooltipDisappearDelay ?? 0,
|
|
@@ -67072,7 +67124,7 @@
|
|
|
67072
67124
|
${overflowText}`
|
|
67073
67125
|
: overflowText,
|
|
67074
67126
|
referencePosition: {
|
|
67075
|
-
placement:
|
|
67127
|
+
placement: table.internalProps.tooltip.position,
|
|
67076
67128
|
rect
|
|
67077
67129
|
},
|
|
67078
67130
|
disappearDelay: table.internalProps.tooltip.overflowTextTooltipDisappearDelay ?? 0,
|
|
@@ -77184,7 +77236,7 @@
|
|
|
77184
77236
|
}
|
|
77185
77237
|
|
|
77186
77238
|
registerForVrender();
|
|
77187
|
-
const version = "1.11.2
|
|
77239
|
+
const version = "1.11.2";
|
|
77188
77240
|
function getIcons() {
|
|
77189
77241
|
return get$2();
|
|
77190
77242
|
}
|