@visactor/vtable 1.6.0-alpha.0 → 1.6.0-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/cjs/ListTable-all.js +5 -5
- package/cjs/ListTable-all.js.map +1 -1
- package/cjs/ListTable.d.ts +2 -0
- package/cjs/ListTable.js +7 -2
- package/cjs/ListTable.js.map +1 -1
- package/cjs/core/BaseTable.js +1 -1
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/event/event.js +3 -1
- package/cjs/event/event.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/plugins/list-tree-stick-cell.d.ts +16 -0
- package/cjs/plugins/list-tree-stick-cell.js +171 -0
- package/cjs/plugins/list-tree-stick-cell.js.map +1 -0
- package/cjs/scenegraph/graphic/group.js +1 -1
- package/cjs/scenegraph/graphic/group.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.d.ts +2 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +16 -4
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/init-scenegraph.js +2 -2
- package/cjs/scenegraph/group-creater/init-scenegraph.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +1 -0
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/vrender.js +2 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +268 -11
- package/dist/vtable.min.js +2 -2
- package/es/ListTable-all.js +5 -3
- package/es/ListTable-all.js.map +1 -1
- package/es/ListTable.d.ts +2 -0
- package/es/ListTable.js +6 -2
- package/es/ListTable.js.map +1 -1
- package/es/core/BaseTable.js +1 -1
- package/es/core/BaseTable.js.map +1 -1
- package/es/event/event.js +3 -1
- package/es/event/event.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/plugins/list-tree-stick-cell.d.ts +16 -0
- package/es/plugins/list-tree-stick-cell.js +169 -0
- package/es/plugins/list-tree-stick-cell.js.map +1 -0
- package/es/scenegraph/graphic/group.js +1 -1
- package/es/scenegraph/graphic/group.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.d.ts +2 -1
- package/es/scenegraph/group-creater/cell-helper.js +11 -2
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/init-scenegraph.js +2 -2
- package/es/scenegraph/group-creater/init-scenegraph.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +1 -0
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/vrender.js +3 -2
- package/es/vrender.js.map +1 -1
- package/package.json +3 -3
package/dist/vtable.js
CHANGED
|
@@ -9285,7 +9285,7 @@
|
|
|
9285
9285
|
var _a;
|
|
9286
9286
|
const validateToGraphics = toGraphics.filter(graphic => graphic && graphic.toCustomPath && graphic.valid);
|
|
9287
9287
|
validateToGraphics.length || __DEV__ && (void 0), fromGraphic.valid && fromGraphic.toCustomPath || __DEV__ && (void 0);
|
|
9288
|
-
const childGraphics = ("clone" === (null == animationConfig ? void 0 : animationConfig.splitPath) ? cloneGraphic : null !== (_a = null == animationConfig ? void 0 : animationConfig.splitPath) && void 0 !== _a ? _a : splitGraphic)(fromGraphic, validateToGraphics.length, !1),
|
|
9288
|
+
const childGraphics = ("clone" === (null == animationConfig ? void 0 : animationConfig.splitPath) ? cloneGraphic$1 : null !== (_a = null == animationConfig ? void 0 : animationConfig.splitPath) && void 0 !== _a ? _a : splitGraphic)(fromGraphic, validateToGraphics.length, !1),
|
|
9289
9289
|
oldOnEnd = null == animationConfig ? void 0 : animationConfig.onEnd;
|
|
9290
9290
|
let count = validateToGraphics.length;
|
|
9291
9291
|
const onEachEnd = () => {
|
|
@@ -9359,7 +9359,7 @@
|
|
|
9359
9359
|
});
|
|
9360
9360
|
}
|
|
9361
9361
|
};
|
|
9362
|
-
const cloneGraphic = (graphic, count, needAppend) => {
|
|
9362
|
+
const cloneGraphic$1 = (graphic, count, needAppend) => {
|
|
9363
9363
|
const children = [],
|
|
9364
9364
|
childAttrs = needAppend ? null : parseShadowChildAttrs(graphic.attribute),
|
|
9365
9365
|
path = graphic.toCustomPath();
|
|
@@ -9414,7 +9414,7 @@
|
|
|
9414
9414
|
var _a, _b, _c;
|
|
9415
9415
|
const validateFromGraphics = fromGraphics.filter(graphic => graphic.toCustomPath && graphic.valid);
|
|
9416
9416
|
validateFromGraphics.length || __DEV__ && (void 0), toGraphic.valid && toGraphic.toCustomPath || __DEV__ && (void 0);
|
|
9417
|
-
const childGraphics = ("clone" === (null == animationConfig ? void 0 : animationConfig.splitPath) ? cloneGraphic : null !== (_a = null == animationConfig ? void 0 : animationConfig.splitPath) && void 0 !== _a ? _a : splitGraphic)(toGraphic, validateFromGraphics.length, !0),
|
|
9417
|
+
const childGraphics = ("clone" === (null == animationConfig ? void 0 : animationConfig.splitPath) ? cloneGraphic$1 : null !== (_a = null == animationConfig ? void 0 : animationConfig.splitPath) && void 0 !== _a ? _a : splitGraphic)(toGraphic, validateFromGraphics.length, !0),
|
|
9418
9418
|
toAttrs = toGraphic.attribute;
|
|
9419
9419
|
toGraphic.setAttribute("visible", !1);
|
|
9420
9420
|
const morphingData = validateFromGraphics.map((graphic, index) => parseMorphingData(graphic.toCustomPath(), childGraphics[index].toCustomPath(), {
|
|
@@ -42035,6 +42035,7 @@
|
|
|
42035
42035
|
registerLine();
|
|
42036
42036
|
registerRect();
|
|
42037
42037
|
registerRichtext();
|
|
42038
|
+
registerShadowRoot();
|
|
42038
42039
|
registerSymbol();
|
|
42039
42040
|
registerText();
|
|
42040
42041
|
loadPoptip();
|
|
@@ -42473,7 +42474,7 @@
|
|
|
42473
42474
|
circleModule: circleModule,
|
|
42474
42475
|
clampRadian: clampRadian,
|
|
42475
42476
|
clock: clock,
|
|
42476
|
-
cloneGraphic: cloneGraphic,
|
|
42477
|
+
cloneGraphic: cloneGraphic$1,
|
|
42477
42478
|
colorEqual: colorEqual,
|
|
42478
42479
|
colorStringInterpolationToStr: colorStringInterpolationToStr,
|
|
42479
42480
|
container: container,
|
|
@@ -49837,6 +49838,9 @@
|
|
|
49837
49838
|
this._AABBBounds.setValue(-Infinity, -Infinity, Infinity, Infinity);
|
|
49838
49839
|
this.parent && this.parent.addChildUpdateBoundTag();
|
|
49839
49840
|
this.clearUpdateBoundTag();
|
|
49841
|
+
if (this.shadowRoot) {
|
|
49842
|
+
this.shadowRoot.tryUpdateAABBBounds();
|
|
49843
|
+
}
|
|
49840
49844
|
return this._AABBBounds;
|
|
49841
49845
|
}
|
|
49842
49846
|
return super.doUpdateAABBBounds();
|
|
@@ -51258,7 +51262,7 @@
|
|
|
51258
51262
|
}
|
|
51259
51263
|
return cellGroup;
|
|
51260
51264
|
}
|
|
51261
|
-
function updateCell$1(col, row, table, addNew) {
|
|
51265
|
+
function updateCell$1(col, row, table, addNew, isShadow) {
|
|
51262
51266
|
const oldCellGroup = table.scenegraph.highPerformanceGetCell(col, row, true);
|
|
51263
51267
|
const cellStyle = table._getCellStyle(col, row);
|
|
51264
51268
|
const autoWrapText = cellStyle.autoWrapText ?? table.internalProps.autoWrapText;
|
|
@@ -51427,7 +51431,12 @@
|
|
|
51427
51431
|
const { height: contentHeight } = newCellGroup.attribute;
|
|
51428
51432
|
newCellGroup.contentWidth = contentWidth;
|
|
51429
51433
|
newCellGroup.contentHeight = contentHeight;
|
|
51430
|
-
|
|
51434
|
+
if (isShadow) {
|
|
51435
|
+
dealWithMergeCellSizeForShadow(range, cellWidth, cellHeight, padding, textAlign, textBaseline, table, newCellGroup);
|
|
51436
|
+
}
|
|
51437
|
+
else {
|
|
51438
|
+
dealWithMergeCellSize(range, cellWidth, cellHeight, padding, textAlign, textBaseline, table);
|
|
51439
|
+
}
|
|
51431
51440
|
}
|
|
51432
51441
|
return newCellGroup;
|
|
51433
51442
|
}
|
|
@@ -51494,6 +51503,20 @@
|
|
|
51494
51503
|
}
|
|
51495
51504
|
}
|
|
51496
51505
|
}
|
|
51506
|
+
function dealWithMergeCellSizeForShadow(range, cellWidth, cellHeight, padding, textAlign, textBaseline, table, cellGroup) {
|
|
51507
|
+
const { col, row } = cellGroup;
|
|
51508
|
+
if (range.start.row !== range.end.row && cellGroup.contentHeight !== cellHeight) {
|
|
51509
|
+
updateCellContentHeight(cellGroup, cellHeight, cellHeight, table.isAutoRowHeight(row), padding, textAlign, textBaseline);
|
|
51510
|
+
}
|
|
51511
|
+
if (range.start.col !== range.end.col && cellGroup.contentWidth !== cellWidth) {
|
|
51512
|
+
updateCellContentWidth(cellGroup, cellWidth, cellHeight, 0, table.isAutoRowHeight(row), padding, textAlign, textBaseline, table.scenegraph);
|
|
51513
|
+
}
|
|
51514
|
+
cellGroup.contentWidth = cellWidth;
|
|
51515
|
+
cellGroup.contentHeight = cellHeight;
|
|
51516
|
+
const rangeHeight = table.getRowHeight(row);
|
|
51517
|
+
const rangeWidth = table.getColWidth(col);
|
|
51518
|
+
resizeCellGroup(cellGroup, rangeWidth, rangeHeight, range, table);
|
|
51519
|
+
}
|
|
51497
51520
|
function resizeCellGroup(cellGroup, rangeWidth, rangeHeight, range, table) {
|
|
51498
51521
|
const { col, row } = cellGroup;
|
|
51499
51522
|
const dx = -table.getColsWidth(range.start.col, col - 1);
|
|
@@ -59849,10 +59872,10 @@
|
|
|
59849
59872
|
const height = scene.table.tableNoFrameHeight;
|
|
59850
59873
|
scene.tableGroup = new Group$1({ x: 0, y: 0, width, height, clip: true, pickable: false });
|
|
59851
59874
|
scene.tableGroup.role = 'table';
|
|
59852
|
-
const colHeaderGroup = createContainerGroup(0, 0,
|
|
59875
|
+
const colHeaderGroup = createContainerGroup(0, 0, !scene.table.options.enableTreeStickCell);
|
|
59853
59876
|
colHeaderGroup.role = 'col-header';
|
|
59854
59877
|
scene.colHeaderGroup = colHeaderGroup;
|
|
59855
|
-
const cornerHeaderGroup = createContainerGroup(0, 0,
|
|
59878
|
+
const cornerHeaderGroup = createContainerGroup(0, 0, !scene.table.options.enableTreeStickCell);
|
|
59856
59879
|
cornerHeaderGroup.role = 'corner-header';
|
|
59857
59880
|
scene.cornerHeaderGroup = cornerHeaderGroup;
|
|
59858
59881
|
const rowHeaderGroup = createContainerGroup(0, 0, true);
|
|
@@ -66708,6 +66731,9 @@
|
|
|
66708
66731
|
}
|
|
66709
66732
|
checkColumnResize(eventArgsSet, update) {
|
|
66710
66733
|
const { eventArgs } = eventArgsSet;
|
|
66734
|
+
if (this.table.options.enableTreeStickCell && !eventArgs) {
|
|
66735
|
+
return false;
|
|
66736
|
+
}
|
|
66711
66737
|
const resizeCol = this.table.scenegraph.getResizeColAt(eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y, eventArgs?.targetCell);
|
|
66712
66738
|
if (this.table._canResizeColumn(resizeCol.col, resizeCol.row) && resizeCol.col >= 0) {
|
|
66713
66739
|
if (update) {
|
|
@@ -70850,7 +70876,7 @@
|
|
|
70850
70876
|
return TABLE_EVENT_TYPE;
|
|
70851
70877
|
}
|
|
70852
70878
|
options;
|
|
70853
|
-
version = "1.6.0-alpha.
|
|
70879
|
+
version = "1.6.0-alpha.1";
|
|
70854
70880
|
pagination;
|
|
70855
70881
|
id = `VTable${Date.now()}`;
|
|
70856
70882
|
headerStyleCache;
|
|
@@ -76497,6 +76523,7 @@
|
|
|
76497
76523
|
class ListTable extends BaseTable {
|
|
76498
76524
|
showHeader = true;
|
|
76499
76525
|
editorManager;
|
|
76526
|
+
listTreeStickCellPlugin;
|
|
76500
76527
|
constructor(container, options) {
|
|
76501
76528
|
if (Env.mode === 'node') {
|
|
76502
76529
|
options = container;
|
|
@@ -76555,6 +76582,10 @@
|
|
|
76555
76582
|
this.internalProps.emptyTip.resetVisible();
|
|
76556
76583
|
}
|
|
76557
76584
|
}
|
|
76585
|
+
if (options.enableTreeStickCell) {
|
|
76586
|
+
const ListTreeStickCellPlugin = Factory.getComponent('listTreeStickCellPlugin');
|
|
76587
|
+
this.listTreeStickCellPlugin = new ListTreeStickCellPlugin(this);
|
|
76588
|
+
}
|
|
76558
76589
|
setTimeout(() => {
|
|
76559
76590
|
this.fireListeners(TABLE_EVENT_TYPE.INITIALIZED, null);
|
|
76560
76591
|
}, 0);
|
|
@@ -76767,7 +76798,7 @@
|
|
|
76767
76798
|
internalProps.frozenColDragHeaderMode = options.frozenColDragHeaderMode;
|
|
76768
76799
|
this.pagination = options.pagination;
|
|
76769
76800
|
internalProps.sortState = options.sortState;
|
|
76770
|
-
internalProps.dataConfig = {};
|
|
76801
|
+
internalProps.dataConfig = options.groupBy ? getGroupByDataConfig(options.groupBy) : {};
|
|
76771
76802
|
this.showHeader = options.showHeader ?? true;
|
|
76772
76803
|
internalProps.columns = options.columns
|
|
76773
76804
|
? cloneDeepSpec(options.columns, ['children'])
|
|
@@ -80123,6 +80154,231 @@
|
|
|
80123
80154
|
Factory.registerComponent('tooltipHandler', TooltipHandler);
|
|
80124
80155
|
};
|
|
80125
80156
|
|
|
80157
|
+
class ListTreeStickCellPlugin {
|
|
80158
|
+
table;
|
|
80159
|
+
titleRows = [];
|
|
80160
|
+
showedTitleRows = [];
|
|
80161
|
+
rowNow = -1;
|
|
80162
|
+
skipStartRow = -1;
|
|
80163
|
+
skipEndRow = -1;
|
|
80164
|
+
constructor(table) {
|
|
80165
|
+
this.table = table;
|
|
80166
|
+
this.table.on('scroll', e => {
|
|
80167
|
+
if (e.scrollDirection !== 'vertical') {
|
|
80168
|
+
return;
|
|
80169
|
+
}
|
|
80170
|
+
this.updateGroupTitle();
|
|
80171
|
+
});
|
|
80172
|
+
}
|
|
80173
|
+
updateGroupTitle() {
|
|
80174
|
+
if (this.skipStartRow !== -1 &&
|
|
80175
|
+
this.skipEndRow !== -1 &&
|
|
80176
|
+
this.skipStartRow !== this.table.scenegraph.proxy.bodyTopRow - 1) {
|
|
80177
|
+
if (this.table.scenegraph.proxy.screenTopRow <= this.skipStartRow ||
|
|
80178
|
+
this.table.scenegraph.proxy.screenTopRow >= this.skipEndRow) {
|
|
80179
|
+
this.skipStartRow = -1;
|
|
80180
|
+
this.skipEndRow = -1;
|
|
80181
|
+
this.updateGroupTitleInfo();
|
|
80182
|
+
}
|
|
80183
|
+
}
|
|
80184
|
+
else {
|
|
80185
|
+
this.skipStartRow = -1;
|
|
80186
|
+
this.skipEndRow = -1;
|
|
80187
|
+
this.updateGroupTitleInfo();
|
|
80188
|
+
}
|
|
80189
|
+
this.updateScenegraph();
|
|
80190
|
+
}
|
|
80191
|
+
updateGroupTitleInfo() {
|
|
80192
|
+
this.rowNow = this.table.scenegraph.proxy.screenTopRow + this.titleRows.length;
|
|
80193
|
+
const recordIndex = this.table.getRecordIndexByCell(0, this.rowNow);
|
|
80194
|
+
const nextRecordIndex = this.table.getRecordIndexByCell(0, this.rowNow + 1);
|
|
80195
|
+
this.getTitleRowsByRecordIndex(recordIndex, nextRecordIndex);
|
|
80196
|
+
}
|
|
80197
|
+
getTitleRowsByRecordIndex(recordIndex, nextRecordIndex) {
|
|
80198
|
+
if (!isArray$1(recordIndex)) {
|
|
80199
|
+
recordIndex = [recordIndex];
|
|
80200
|
+
}
|
|
80201
|
+
if (!isArray$1(nextRecordIndex)) {
|
|
80202
|
+
nextRecordIndex = [nextRecordIndex];
|
|
80203
|
+
}
|
|
80204
|
+
for (let i = 0; i < recordIndex.length; i++) {
|
|
80205
|
+
const index = recordIndex.slice(0, i + 1);
|
|
80206
|
+
this.table.dataSource.getRaw(index);
|
|
80207
|
+
}
|
|
80208
|
+
const titleRows = [];
|
|
80209
|
+
const isTitle = nextRecordIndex.length === recordIndex.length + 1;
|
|
80210
|
+
let titleIndex = recordIndex.slice(0, !isTitle ? recordIndex.length - 1 : recordIndex.length);
|
|
80211
|
+
const currentIndexedData = this.table.dataSource.currentIndexedData;
|
|
80212
|
+
const startIndex = this.rowNow - this.table.columnHeaderLevelCount;
|
|
80213
|
+
for (let i = startIndex; i >= 0; i--) {
|
|
80214
|
+
const currentIndex = currentIndexedData[i];
|
|
80215
|
+
if (isArray$1(currentIndex) && titleIndex.length === currentIndex.length) {
|
|
80216
|
+
let isMatch = true;
|
|
80217
|
+
for (let j = 0; j < currentIndex.length; j++) {
|
|
80218
|
+
if (currentIndex[j] !== titleIndex[j]) {
|
|
80219
|
+
isMatch = false;
|
|
80220
|
+
break;
|
|
80221
|
+
}
|
|
80222
|
+
}
|
|
80223
|
+
if (isMatch) {
|
|
80224
|
+
titleRows.push(i + this.table.columnHeaderLevelCount);
|
|
80225
|
+
titleIndex = titleIndex.slice(0, titleIndex.length - 1);
|
|
80226
|
+
}
|
|
80227
|
+
}
|
|
80228
|
+
else if (currentIndex === recordIndex[0]) {
|
|
80229
|
+
titleRows.push(i + this.table.columnHeaderLevelCount);
|
|
80230
|
+
break;
|
|
80231
|
+
}
|
|
80232
|
+
}
|
|
80233
|
+
this.titleRows = titleRows.reverse();
|
|
80234
|
+
}
|
|
80235
|
+
updateScenegraph() {
|
|
80236
|
+
const { table } = this;
|
|
80237
|
+
const { shadowGroup, shadowGroupFrozen } = prepareShadowRoot(table);
|
|
80238
|
+
this.showedTitleRows.length = 0;
|
|
80239
|
+
let skip = 0;
|
|
80240
|
+
for (let col = 0; col < table.colCount; col++) {
|
|
80241
|
+
let colGroup;
|
|
80242
|
+
if (col < table.frozenColCount) {
|
|
80243
|
+
colGroup = new Group$1({
|
|
80244
|
+
x: table.getColsWidth(0, col - 1),
|
|
80245
|
+
y: table.getFrozenRowsHeight()
|
|
80246
|
+
});
|
|
80247
|
+
shadowGroupFrozen.add(colGroup);
|
|
80248
|
+
}
|
|
80249
|
+
else {
|
|
80250
|
+
colGroup = new Group$1({
|
|
80251
|
+
x: table.getColsWidth(table.frozenColCount, col - 1),
|
|
80252
|
+
y: table.getFrozenRowsHeight()
|
|
80253
|
+
});
|
|
80254
|
+
shadowGroup.add(colGroup);
|
|
80255
|
+
}
|
|
80256
|
+
colGroup.col = col;
|
|
80257
|
+
for (let i = 0; i < this.titleRows.length; i++) {
|
|
80258
|
+
const row = this.titleRows[i];
|
|
80259
|
+
if (isSkipRow(row, this.rowNow, table.scenegraph.proxy.screenTopRow, this.titleRows)) {
|
|
80260
|
+
col === 0 && skip++;
|
|
80261
|
+
continue;
|
|
80262
|
+
}
|
|
80263
|
+
if (col === 0) {
|
|
80264
|
+
this.showedTitleRows.push(row);
|
|
80265
|
+
}
|
|
80266
|
+
const cell = table.scenegraph.getCell(col, row);
|
|
80267
|
+
if (cell.role === 'cell') {
|
|
80268
|
+
const newCell = cloneGraphic(cell);
|
|
80269
|
+
newCell.setAttributes({
|
|
80270
|
+
y: i * 40
|
|
80271
|
+
});
|
|
80272
|
+
colGroup.add(newCell);
|
|
80273
|
+
}
|
|
80274
|
+
else {
|
|
80275
|
+
const newCell = updateCell$1(col, row, table, true, true);
|
|
80276
|
+
newCell.setAttributes({
|
|
80277
|
+
y: i * 40
|
|
80278
|
+
});
|
|
80279
|
+
colGroup.add(newCell);
|
|
80280
|
+
}
|
|
80281
|
+
}
|
|
80282
|
+
}
|
|
80283
|
+
if (skip > 0 && this.skipStartRow === -1 && this.skipEndRow === -1) {
|
|
80284
|
+
this.skipStartRow = table.scenegraph.proxy.screenTopRow - 1;
|
|
80285
|
+
this.skipEndRow = table.scenegraph.proxy.screenTopRow + 1;
|
|
80286
|
+
}
|
|
80287
|
+
}
|
|
80288
|
+
}
|
|
80289
|
+
function isSkipRow(row, topRow, screenTopRow, titleRows) {
|
|
80290
|
+
if (row === topRow && row !== screenTopRow + titleRows.length - 1) {
|
|
80291
|
+
return true;
|
|
80292
|
+
}
|
|
80293
|
+
const rowIndex = titleRows.indexOf(row);
|
|
80294
|
+
const rowLimit = screenTopRow + rowIndex + 1;
|
|
80295
|
+
if (row === rowLimit && row < topRow) {
|
|
80296
|
+
return true;
|
|
80297
|
+
}
|
|
80298
|
+
return false;
|
|
80299
|
+
}
|
|
80300
|
+
function cloneGraphic(graphic) {
|
|
80301
|
+
const newGraphic = graphic.clone();
|
|
80302
|
+
newGraphic.role = graphic.role;
|
|
80303
|
+
newGraphic.col = graphic.col;
|
|
80304
|
+
newGraphic.row = graphic.row;
|
|
80305
|
+
newGraphic.mergeStartCol = graphic.mergeStartCol;
|
|
80306
|
+
newGraphic.mergeStartRow = graphic.mergeStartRow;
|
|
80307
|
+
newGraphic.mergeEndCol = graphic.mergeEndCol;
|
|
80308
|
+
newGraphic.mergeEndRow = graphic.mergeEndRow;
|
|
80309
|
+
newGraphic.contentWidth = graphic.contentWidth;
|
|
80310
|
+
newGraphic.contentHeight = graphic.contentHeight;
|
|
80311
|
+
if (newGraphic.role === 'cell') {
|
|
80312
|
+
const hackRect = createRect({
|
|
80313
|
+
x: 0,
|
|
80314
|
+
y: 0,
|
|
80315
|
+
width: newGraphic.attribute.width,
|
|
80316
|
+
height: newGraphic.attribute.height
|
|
80317
|
+
});
|
|
80318
|
+
newGraphic.add(hackRect);
|
|
80319
|
+
}
|
|
80320
|
+
if (graphic.type === 'group') {
|
|
80321
|
+
const newGroup = newGraphic;
|
|
80322
|
+
graphic.forEachChildren(child => {
|
|
80323
|
+
const newChild = cloneGraphic(child);
|
|
80324
|
+
newGroup.add(newChild);
|
|
80325
|
+
});
|
|
80326
|
+
}
|
|
80327
|
+
return newGraphic;
|
|
80328
|
+
}
|
|
80329
|
+
function prepareShadowRoot(table) {
|
|
80330
|
+
const colHeaderGroup = table.scenegraph.colHeaderGroup;
|
|
80331
|
+
const cornerHeaderGroup = table.scenegraph.cornerHeaderGroup;
|
|
80332
|
+
if (!colHeaderGroup.border) {
|
|
80333
|
+
const hackBorder = createRect({
|
|
80334
|
+
x: 0,
|
|
80335
|
+
y: 0,
|
|
80336
|
+
width: 0,
|
|
80337
|
+
height: 0
|
|
80338
|
+
});
|
|
80339
|
+
colHeaderGroup.add(hackBorder);
|
|
80340
|
+
colHeaderGroup.border = hackBorder;
|
|
80341
|
+
hackBorder.attachShadow(hackBorder.shadowRoot);
|
|
80342
|
+
hackBorder.name = 'border-rect';
|
|
80343
|
+
hackBorder.addEventListener('click', (e) => {
|
|
80344
|
+
const titleRows = table.listTreeStickCellPlugin.titleRows;
|
|
80345
|
+
const { shadowTarget } = e.pickParams;
|
|
80346
|
+
const cellGroup = getTargetCell(shadowTarget);
|
|
80347
|
+
const { col, row } = cellGroup;
|
|
80348
|
+
const rowIndex = titleRows.indexOf(row);
|
|
80349
|
+
table.scrollToCell({ col, row: row - rowIndex });
|
|
80350
|
+
});
|
|
80351
|
+
}
|
|
80352
|
+
if (!cornerHeaderGroup.border) {
|
|
80353
|
+
const hackBorder = createRect({
|
|
80354
|
+
x: 0,
|
|
80355
|
+
y: 0,
|
|
80356
|
+
width: 0,
|
|
80357
|
+
height: 0
|
|
80358
|
+
});
|
|
80359
|
+
cornerHeaderGroup.add(hackBorder);
|
|
80360
|
+
cornerHeaderGroup.border = hackBorder;
|
|
80361
|
+
hackBorder.attachShadow(hackBorder.shadowRoot);
|
|
80362
|
+
hackBorder.name = 'border-rect';
|
|
80363
|
+
hackBorder.addEventListener('click', (e) => {
|
|
80364
|
+
const titleRows = table.listTreeStickCellPlugin.titleRows;
|
|
80365
|
+
const { shadowTarget } = e.pickParams;
|
|
80366
|
+
const cellGroup = getTargetCell(shadowTarget);
|
|
80367
|
+
const { col, row } = cellGroup;
|
|
80368
|
+
const rowIndex = titleRows.indexOf(row);
|
|
80369
|
+
table.scrollToCell({ col, row: row - rowIndex });
|
|
80370
|
+
});
|
|
80371
|
+
}
|
|
80372
|
+
const shadowGroup = colHeaderGroup.border.shadowRoot;
|
|
80373
|
+
const shadowGroupFrozen = cornerHeaderGroup.border.shadowRoot;
|
|
80374
|
+
shadowGroup.removeAllChild();
|
|
80375
|
+
shadowGroupFrozen.removeAllChild();
|
|
80376
|
+
return { shadowGroup, shadowGroupFrozen };
|
|
80377
|
+
}
|
|
80378
|
+
const registerListTreeStickCellPlugin = () => {
|
|
80379
|
+
Factory.registerComponent('listTreeStickCellPlugin', ListTreeStickCellPlugin);
|
|
80380
|
+
};
|
|
80381
|
+
|
|
80126
80382
|
const builtin = {};
|
|
80127
80383
|
function get() {
|
|
80128
80384
|
return extend(builtin, chartTypes);
|
|
@@ -81717,6 +81973,7 @@
|
|
|
81717
81973
|
registerMenu();
|
|
81718
81974
|
registerTitle();
|
|
81719
81975
|
registerTooltip();
|
|
81976
|
+
registerListTreeStickCellPlugin();
|
|
81720
81977
|
registerChartCell();
|
|
81721
81978
|
registerCheckboxCell();
|
|
81722
81979
|
registerImageCell();
|
|
@@ -89334,7 +89591,7 @@
|
|
|
89334
89591
|
}
|
|
89335
89592
|
|
|
89336
89593
|
registerForVrender();
|
|
89337
|
-
const version = "1.6.0-alpha.
|
|
89594
|
+
const version = "1.6.0-alpha.1";
|
|
89338
89595
|
function getIcons() {
|
|
89339
89596
|
return get$2();
|
|
89340
89597
|
}
|