@visactor/vtable-calendar 1.19.4-alpha.1 → 1.19.4-alpha.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/dist/vtable-calendar.js +293 -222
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +4 -4
package/dist/vtable-calendar.js
CHANGED
|
@@ -9856,7 +9856,7 @@
|
|
|
9856
9856
|
}
|
|
9857
9857
|
removeChild(child) {
|
|
9858
9858
|
const data = super.removeChild(child);
|
|
9859
|
-
return
|
|
9859
|
+
return this.getGraphicService().onRemove(child), child.stage = null, this.addUpdateBoundTag(), data;
|
|
9860
9860
|
}
|
|
9861
9861
|
removeAllChild(deep = !1) {
|
|
9862
9862
|
this.forEachChildren(child => {
|
|
@@ -12786,9 +12786,10 @@
|
|
|
12786
12786
|
return super.needUpdateTag(key, POLYGON_UPDATE_TAG_KEY);
|
|
12787
12787
|
}
|
|
12788
12788
|
toCustomPath() {
|
|
12789
|
-
|
|
12790
|
-
|
|
12791
|
-
|
|
12789
|
+
let path = super.toCustomPath();
|
|
12790
|
+
if (path) return path;
|
|
12791
|
+
const points = this.attribute.points;
|
|
12792
|
+
return path = new CustomPath2D(), points.forEach((point, index) => {
|
|
12792
12793
|
0 === index ? path.moveTo(point.x, point.y) : path.lineTo(point.x, point.y);
|
|
12793
12794
|
}), path.closePath(), path;
|
|
12794
12795
|
}
|
|
@@ -16048,6 +16049,7 @@
|
|
|
16048
16049
|
drawContext.updateBounds ? this.useDirtyBounds = !0 : this.useDirtyBounds = !drawContext.stage.params.optimize.disableCheckGraphicWidthOutRange;
|
|
16049
16050
|
}
|
|
16050
16051
|
draw(renderService, drawContext) {
|
|
16052
|
+
var _a;
|
|
16051
16053
|
this.prepareForDraw(renderService, drawContext), drawContext.drawContribution = this, this.currentRenderMap = this.styleRenderMap.get(drawContext.renderStyle) || this.defaultRenderMap, this.currentRenderService = renderService;
|
|
16052
16054
|
const {
|
|
16053
16055
|
context: context,
|
|
@@ -16062,7 +16064,7 @@
|
|
|
16062
16064
|
dirtyBounds.x1 = Math.floor(b.x1), dirtyBounds.y1 = Math.floor(b.y1), dirtyBounds.x2 = Math.ceil(b.x2), dirtyBounds.y2 = Math.ceil(b.y2);
|
|
16063
16065
|
}
|
|
16064
16066
|
const d = context.dpr % 1;
|
|
16065
|
-
(d || .5 !== d) && (dirtyBounds.x1 = Math.floor(dirtyBounds.x1 * context.dpr) / context.dpr, dirtyBounds.y1 = Math.floor(dirtyBounds.y1 * context.dpr) / context.dpr, dirtyBounds.x2 = Math.ceil(dirtyBounds.x2 * context.dpr) / context.dpr, dirtyBounds.y2 = Math.ceil(dirtyBounds.y2 * context.dpr) / context.dpr), this.backupDirtyBounds.copy(dirtyBounds), context.reset(!1), context.save(), context.setClearMatrix(transMatrix.a, transMatrix.b, transMatrix.c, transMatrix.d, transMatrix.e, transMatrix.f), context.clearMatrix(!1), context.translate(viewBox.x1, viewBox.y1, !0), context.beginPath(), context.rect(dirtyBounds.x1, dirtyBounds.y1, dirtyBounds.width(), dirtyBounds.height()), context.clip(), stage.camera && (this.dirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0), this.backupDirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0)), this.clearScreen(renderService, context, drawContext), renderService.renderTreeRoots.sort((a, b) => {
|
|
16067
|
+
(d || .5 !== d) && (dirtyBounds.x1 = Math.floor(dirtyBounds.x1 * context.dpr) / context.dpr, dirtyBounds.y1 = Math.floor(dirtyBounds.y1 * context.dpr) / context.dpr, dirtyBounds.x2 = Math.ceil(dirtyBounds.x2 * context.dpr) / context.dpr, dirtyBounds.y2 = Math.ceil(dirtyBounds.y2 * context.dpr) / context.dpr), this.backupDirtyBounds.copy(dirtyBounds), context.reset(!1), context.save(), context.setClearMatrix(transMatrix.a, transMatrix.b, transMatrix.c, transMatrix.d, transMatrix.e, transMatrix.f), context.clearMatrix(!1), context.translate(viewBox.x1, viewBox.y1, !0), context.beginPath(), context.rect(dirtyBounds.x1, dirtyBounds.y1, dirtyBounds.width(), dirtyBounds.height()), context.clip(), stage.camera && (this.dirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0), this.backupDirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0)), this.clearScreen(renderService, context, drawContext), (null === (_a = renderService.drawParams) || void 0 === _a ? void 0 : _a.stage) && renderService.drawParams.stage.hooks.afterClearScreen.call(renderService.drawParams), renderService.renderTreeRoots.sort((a, b) => {
|
|
16066
16068
|
var _a, _b;
|
|
16067
16069
|
return (null !== (_a = a.attribute.zIndex) && void 0 !== _a ? _a : DefaultAttribute.zIndex) - (null !== (_b = b.attribute.zIndex) && void 0 !== _b ? _b : DefaultAttribute.zIndex);
|
|
16068
16070
|
}).forEach(group => {
|
|
@@ -16741,13 +16743,16 @@
|
|
|
16741
16743
|
} else this._skipRender = 1;
|
|
16742
16744
|
}, this.beforeRender = stage => {
|
|
16743
16745
|
this._beforeRender && this._beforeRender(stage);
|
|
16746
|
+
}, this.afterClearScreen = drawParams => {
|
|
16747
|
+
this._afterClearScreen && this._afterClearScreen(drawParams);
|
|
16744
16748
|
}, this.afterRender = stage => {
|
|
16745
16749
|
this.renderCount++, this._afterRender && this._afterRender(stage), this._afterNextRenderCbs && this._afterNextRenderCbs.forEach(cb => cb(stage)), this._afterNextRenderCbs = null, this.tickedBeforeRender = !1;
|
|
16746
16750
|
}, this.afterTickCb = () => {
|
|
16747
16751
|
this.tickedBeforeRender = !0, "rendering" !== this.state && this.renderNextFrame();
|
|
16748
16752
|
}, this.params = params, this.theme = new Theme(), this.hooks = {
|
|
16749
16753
|
beforeRender: new SyncHook(["stage"]),
|
|
16750
|
-
afterRender: new SyncHook(["stage"])
|
|
16754
|
+
afterRender: new SyncHook(["stage"]),
|
|
16755
|
+
afterClearScreen: new SyncHook(["stage"])
|
|
16751
16756
|
}, this.global = application.global, !this.global.env && isBrowserEnv() && this.global.setEnv("browser"), this.window = container.get(VWindow), this.renderService = container.get(RenderService), this.pluginService = container.get(PluginService), this.layerService = container.get(LayerService), this.graphicService = container.get(GraphicService), this.pluginService.active(this, params), this.window.create({
|
|
16752
16757
|
width: params.width,
|
|
16753
16758
|
height: params.height,
|
|
@@ -16759,7 +16764,7 @@
|
|
|
16759
16764
|
canvas: params.canvas
|
|
16760
16765
|
}), this.state = "normal", this.renderCount = 0, this.tryInitEventSystem(), this._background = null !== (_a = params.background) && void 0 !== _a ? _a : DefaultConfig.BACKGROUND, this.appendChild(this.layerService.createLayer(this, {
|
|
16761
16766
|
main: !0
|
|
16762
|
-
})), this.nextFrameRenderLayerSet = new Set(), this.willNextFrameRender = !1, this.stage = this, this.renderStyle = params.renderStyle, params.autoRender && this.enableAutoRender(), params.autoRefresh && this.enableAutoRefresh(), !1 === params.disableDirtyBounds && this.enableDirtyBounds(), params.enableHtmlAttribute && this.enableHtmlAttribute(params.enableHtmlAttribute), params.ReactDOM && this.enableReactAttribute(params.ReactDOM), params.enableLayout && this.enableLayout(), this.hooks.beforeRender.tap("constructor", this.beforeRender), this.hooks.afterRender.tap("constructor", this.afterRender), this._beforeRender = params.beforeRender, this._afterRender = params.afterRender, this.supportInteractiveLayer = !1 !== params.interactiveLayer, params.optimize || (params.optimize = {
|
|
16767
|
+
})), this.nextFrameRenderLayerSet = new Set(), this.willNextFrameRender = !1, this.stage = this, this.renderStyle = params.renderStyle, params.autoRender && this.enableAutoRender(), params.autoRefresh && this.enableAutoRefresh(), !1 === params.disableDirtyBounds && this.enableDirtyBounds(), params.enableHtmlAttribute && this.enableHtmlAttribute(params.enableHtmlAttribute), params.ReactDOM && this.enableReactAttribute(params.ReactDOM), params.enableLayout && this.enableLayout(), this.hooks.beforeRender.tap("constructor", this.beforeRender), this.hooks.afterRender.tap("constructor", this.afterRender), this.hooks.afterClearScreen.tap("constructor", this.afterClearScreen), this._beforeRender = params.beforeRender, this._afterRender = params.afterRender, this._afterClearScreen = params.afterClearScreen, this.supportInteractiveLayer = !1 !== params.interactiveLayer, params.optimize || (params.optimize = {
|
|
16763
16768
|
tickRenderMode: "effect"
|
|
16764
16769
|
}), this.optmize(params.optimize), params.background && isString$6(this._background) && this._background.includes("/") && this.setAttributes({
|
|
16765
16770
|
background: this._background
|
|
@@ -17154,7 +17159,7 @@
|
|
|
17154
17159
|
return this._cursor;
|
|
17155
17160
|
}
|
|
17156
17161
|
eventPointTransform(e) {
|
|
17157
|
-
const point = this.global.mapToCanvasPoint(e, this.window
|
|
17162
|
+
const point = this.global.mapToCanvasPoint(e, this.window);
|
|
17158
17163
|
return this.stage.window.pointTransform(point.x, point.y);
|
|
17159
17164
|
}
|
|
17160
17165
|
pauseTriggerEvent() {
|
|
@@ -24462,6 +24467,14 @@
|
|
|
24462
24467
|
state.executor.stop();
|
|
24463
24468
|
}), this.stateList = null;
|
|
24464
24469
|
}
|
|
24470
|
+
reApplyState(state) {
|
|
24471
|
+
var _a;
|
|
24472
|
+
const stateInfo = null === (_a = this.stateList) || void 0 === _a ? void 0 : _a.find(stateInfo => stateInfo.state === state);
|
|
24473
|
+
if (stateInfo) {
|
|
24474
|
+
const stateList = this.stateList.slice();
|
|
24475
|
+
stateInfo.executor.stop(), this.stateList = stateList, stateInfo.executor.execute(stateInfo.animationConfig);
|
|
24476
|
+
}
|
|
24477
|
+
}
|
|
24465
24478
|
}
|
|
24466
24479
|
|
|
24467
24480
|
class GraphicStateExtension {
|
|
@@ -24492,11 +24505,20 @@
|
|
|
24492
24505
|
applyUnhighlightState(animationConfig, callback) {
|
|
24493
24506
|
return this._getAnimationStateManager(this).applyUnhighlightState(animationConfig, callback), this;
|
|
24494
24507
|
}
|
|
24495
|
-
stopAnimationState(state, type) {
|
|
24496
|
-
return this._getAnimationStateManager(this).stopState(state, type), this
|
|
24508
|
+
stopAnimationState(state, type, deep = !1) {
|
|
24509
|
+
return this._getAnimationStateManager(this).stopState(state, type), deep && this.isContainer && this.forEachChildren(child => {
|
|
24510
|
+
child.stopAnimationState(state, type, deep);
|
|
24511
|
+
}), this;
|
|
24497
24512
|
}
|
|
24498
24513
|
clearAnimationStates() {
|
|
24499
|
-
|
|
24514
|
+
const stateManager = this._animationStateManager;
|
|
24515
|
+
return stateManager && stateManager.clearState(), this;
|
|
24516
|
+
}
|
|
24517
|
+
reApplyAnimationState(state, deep = !1) {
|
|
24518
|
+
const stateManager = this._animationStateManager;
|
|
24519
|
+
return stateManager && stateManager.reApplyState(state), deep && this.isContainer && this.forEachChildren(child => {
|
|
24520
|
+
child.reApplyAnimationState(state, deep);
|
|
24521
|
+
}), this;
|
|
24500
24522
|
}
|
|
24501
24523
|
static extend(graphic) {
|
|
24502
24524
|
return new GraphicStateExtension()._getAnimationStateManager(graphic), graphic;
|
|
@@ -24549,6 +24571,21 @@
|
|
|
24549
24571
|
getGraphicAttribute(key, prev = !1) {
|
|
24550
24572
|
return !prev && this.finalAttribute ? this.finalAttribute[key] : this.attribute[key];
|
|
24551
24573
|
}
|
|
24574
|
+
pauseAnimation(deep = !1) {
|
|
24575
|
+
this.animates && this.animates.forEach(animate => animate.pause()), deep && this.isContainer && this.forEachChildren(child => {
|
|
24576
|
+
child.pauseAnimation(deep);
|
|
24577
|
+
});
|
|
24578
|
+
}
|
|
24579
|
+
resumeAnimation(deep = !1) {
|
|
24580
|
+
this.animates && this.animates.forEach(animate => animate.resume()), deep && this.isContainer && this.forEachChildren(child => {
|
|
24581
|
+
child.resumeAnimation(deep);
|
|
24582
|
+
});
|
|
24583
|
+
}
|
|
24584
|
+
stopAnimation(deep = !1) {
|
|
24585
|
+
this.animates && this.animates.forEach(animate => animate.stop()), deep && this.isContainer && this.forEachChildren(child => {
|
|
24586
|
+
child.stopAnimation(deep);
|
|
24587
|
+
});
|
|
24588
|
+
}
|
|
24552
24589
|
}
|
|
24553
24590
|
|
|
24554
24591
|
function registerAnimate() {
|
|
@@ -25110,7 +25147,7 @@
|
|
|
25110
25147
|
super(from, to, duration, easing, params);
|
|
25111
25148
|
}
|
|
25112
25149
|
onBind() {
|
|
25113
|
-
var _a, _b;
|
|
25150
|
+
var _a, _b, _c;
|
|
25114
25151
|
super.onBind();
|
|
25115
25152
|
const {
|
|
25116
25153
|
from: from,
|
|
@@ -25119,7 +25156,7 @@
|
|
|
25119
25156
|
fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
|
|
25120
25157
|
this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to;
|
|
25121
25158
|
const finalAttribute = this.target.getFinalAttribute();
|
|
25122
|
-
finalAttribute && this.target.setAttributes(finalAttribute), this.target.setAttributes(fromAttrs);
|
|
25159
|
+
finalAttribute && this.target.setAttributes(finalAttribute), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && this.target.setAttributes(fromAttrs);
|
|
25123
25160
|
}
|
|
25124
25161
|
onEnd(cb) {
|
|
25125
25162
|
super.onEnd(cb);
|
|
@@ -25217,7 +25254,7 @@
|
|
|
25217
25254
|
super(from, to, duration, easing, params);
|
|
25218
25255
|
}
|
|
25219
25256
|
onBind() {
|
|
25220
|
-
var _a, _b;
|
|
25257
|
+
var _a, _b, _c;
|
|
25221
25258
|
super.onBind();
|
|
25222
25259
|
const {
|
|
25223
25260
|
from: from,
|
|
@@ -25226,7 +25263,7 @@
|
|
|
25226
25263
|
fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
|
|
25227
25264
|
this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to;
|
|
25228
25265
|
const finalAttribute = this.target.getFinalAttribute();
|
|
25229
|
-
finalAttribute && this.target.setAttributes(finalAttribute), this.target.setAttributes(fromAttrs);
|
|
25266
|
+
finalAttribute && this.target.setAttributes(finalAttribute), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && this.target.setAttributes(fromAttrs);
|
|
25230
25267
|
}
|
|
25231
25268
|
onEnd(cb) {
|
|
25232
25269
|
super.onEnd(cb);
|
|
@@ -27077,16 +27114,15 @@
|
|
|
27077
27114
|
changedY = 0;
|
|
27078
27115
|
"negative" === orient && (changedX = null !== (_a = layoutRect.width) && void 0 !== _a ? _a : graphic.stage.viewWidth, changedY = null !== (_b = layoutRect.height) && void 0 !== _b ? _b : graphic.stage.viewHeight), changedX += offset, changedY += offset;
|
|
27079
27116
|
const point = isFunction$7(pointOpt) ? pointOpt.call(null, null === (_d = null === (_c = graphic.context) || void 0 === _c ? void 0 : _c.data) || void 0 === _d ? void 0 : _d[0], graphic, animationParameters) : pointOpt,
|
|
27080
|
-
|
|
27081
|
-
|
|
27082
|
-
|
|
27083
|
-
|
|
27084
|
-
finalAttrsY = excludeChannels.includes("y") ? graphic.attribute.y : finalAttrs.y;
|
|
27117
|
+
finalAttrsX = graphic.getGraphicAttribute("x"),
|
|
27118
|
+
finalAttrsY = graphic.getGraphicAttribute("y"),
|
|
27119
|
+
fromX = excludeChannels.includes("x") ? finalAttrsX : point && isValidNumber$3(point.x) ? point.x : changedX,
|
|
27120
|
+
fromY = excludeChannels.includes("y") ? finalAttrsY : point && isValidNumber$3(point.y) ? point.y : changedY;
|
|
27085
27121
|
switch (direction) {
|
|
27086
27122
|
case "x":
|
|
27087
27123
|
return {
|
|
27088
27124
|
from: {
|
|
27089
|
-
x: fromX
|
|
27125
|
+
x: excludeChannels.includes("x") ? finalAttrsX : fromX
|
|
27090
27126
|
},
|
|
27091
27127
|
to: {
|
|
27092
27128
|
x: finalAttrsX
|
|
@@ -27134,7 +27170,7 @@
|
|
|
27134
27170
|
case "x":
|
|
27135
27171
|
return {
|
|
27136
27172
|
from: {
|
|
27137
|
-
x: graphic.
|
|
27173
|
+
x: graphic.getGraphicAttribute("x")
|
|
27138
27174
|
},
|
|
27139
27175
|
to: {
|
|
27140
27176
|
x: fromX
|
|
@@ -27143,7 +27179,7 @@
|
|
|
27143
27179
|
case "y":
|
|
27144
27180
|
return {
|
|
27145
27181
|
from: {
|
|
27146
|
-
y: graphic.
|
|
27182
|
+
y: graphic.getGraphicAttribute("y")
|
|
27147
27183
|
},
|
|
27148
27184
|
to: {
|
|
27149
27185
|
y: fromY
|
|
@@ -27152,8 +27188,8 @@
|
|
|
27152
27188
|
default:
|
|
27153
27189
|
return {
|
|
27154
27190
|
from: {
|
|
27155
|
-
x: graphic.
|
|
27156
|
-
y: graphic.
|
|
27191
|
+
x: graphic.getGraphicAttribute("x"),
|
|
27192
|
+
y: graphic.getGraphicAttribute("y")
|
|
27157
27193
|
},
|
|
27158
27194
|
to: {
|
|
27159
27195
|
x: fromX,
|
|
@@ -27371,9 +27407,8 @@
|
|
|
27371
27407
|
w = Math.min(Math.min(currentX + maxLength, maxLength), streamLength - currentX),
|
|
27372
27408
|
width = w + x > parentWidth ? Math.max(parentWidth - x, 0) : w;
|
|
27373
27409
|
this.rect.setAttributes({
|
|
27374
|
-
x: x,
|
|
27375
|
-
width: width
|
|
27376
|
-
dx: Math.min(parentAttr.x1 - parentAttr.x, 0)
|
|
27410
|
+
x: x + Math.min(parentAttr.x1 - parentAttr.x, 0),
|
|
27411
|
+
width: width
|
|
27377
27412
|
}, !1, {
|
|
27378
27413
|
type: AttributeUpdateType.ANIMATE_PLAY,
|
|
27379
27414
|
animationState: {
|
|
@@ -27390,9 +27425,8 @@
|
|
|
27390
27425
|
const h = Math.min(parentHeight - currentY, maxLength);
|
|
27391
27426
|
let height;
|
|
27392
27427
|
y <= 0 ? (height = Math.max(y + h, 0), y = 0) : height = h, this.rect.setAttributes({
|
|
27393
|
-
y: y,
|
|
27394
|
-
height: height
|
|
27395
|
-
dy: Math.min(parentAttr.y1 - parentAttr.y, 0)
|
|
27428
|
+
y: y + Math.min(parentAttr.y1 - parentAttr.y, 0),
|
|
27429
|
+
height: height
|
|
27396
27430
|
}, !1, {
|
|
27397
27431
|
type: AttributeUpdateType.ANIMATE_PLAY,
|
|
27398
27432
|
animationState: {
|
|
@@ -37297,7 +37331,7 @@
|
|
|
37297
37331
|
cacheBeforeChangedRecord(dataIndex, table) {
|
|
37298
37332
|
var _a;
|
|
37299
37333
|
const originRecord = this.getOriginalRecord(dataIndex);
|
|
37300
|
-
table.
|
|
37334
|
+
table.internalProps.groupBy && (dataIndex = this.getOriginRecordIndexForGroup(dataIndex)), this.beforeChangedRecordsMap.has(dataIndex.toString()) || this.beforeChangedRecordsMap.set(dataIndex.toString(), null !== (_a = cloneDeep$1(originRecord, void 0, ["vtable_gantt_linkedFrom", "vtable_gantt_linkedTo"])) && void 0 !== _a ? _a : {});
|
|
37301
37335
|
}
|
|
37302
37336
|
getGroupSeriesNumber(showIndex) {
|
|
37303
37337
|
const recordIndex = this.dataSource.currentIndexedData[showIndex],
|
|
@@ -37750,7 +37784,7 @@
|
|
|
37750
37784
|
}
|
|
37751
37785
|
function getHierarchyExpandLevel(table) {
|
|
37752
37786
|
var _a;
|
|
37753
|
-
return table.options.hierarchyExpandLevel ? table.options.hierarchyExpandLevel : table.
|
|
37787
|
+
return table.options.hierarchyExpandLevel ? table.options.hierarchyExpandLevel : table.internalProps.groupBy ? 1 / 0 : (null === (_a = table._hasHierarchyTreeHeader) || void 0 === _a ? void 0 : _a.call(table)) ? 1 : void 0;
|
|
37754
37788
|
}
|
|
37755
37789
|
function _setDataSource(table, dataSource) {
|
|
37756
37790
|
_dealWithUpdateDataSource(table, () => {
|
|
@@ -39034,7 +39068,7 @@
|
|
|
39034
39068
|
if (layoutMap.isHeader(col, row)) {
|
|
39035
39069
|
const hd = layoutMap.getHeader(col, row);
|
|
39036
39070
|
isValid$3(null == hd ? void 0 : hd.hierarchyLevel) && (cellHierarchyIndent = (null !== (_a = hd.hierarchyLevel) && void 0 !== _a ? _a : 0) * ("tree" === layoutMap.rowHierarchyType && null !== (_b = layoutMap.rowHierarchyIndent) && void 0 !== _b ? _b : 0), layoutMap.rowHierarchyTextStartAlignment && !table.internalProps.headerHelper.getHierarchyIcon(col, row) && (cellHierarchyIndent += table.internalProps.headerHelper.getHierarchyIconWidth()));
|
|
39037
|
-
} else if (table.
|
|
39071
|
+
} else if (table.internalProps.groupBy || (null === (_c = table.getBodyColumnDefine(col, row)) || void 0 === _c ? void 0 : _c.tree)) {
|
|
39038
39072
|
const indexArr = table.dataSource.getIndexKey(table.getRecordShowIndexByCell(col, row)),
|
|
39039
39073
|
groupLength = null !== (_d = table.dataSource.getGroupLength()) && void 0 !== _d ? _d : 0;
|
|
39040
39074
|
let indexArrLngth = isArray$7(indexArr) ? indexArr.length - 1 : 0;
|
|
@@ -39733,7 +39767,7 @@
|
|
|
39733
39767
|
vtableMergeName: vtableMergeName,
|
|
39734
39768
|
vtableMerge: vtableMerge
|
|
39735
39769
|
} = null != rawRecord ? rawRecord : {};
|
|
39736
|
-
isVtableMerge = vtableMerge, vtableMerge && (mayHaveIcon = !0, table.
|
|
39770
|
+
isVtableMerge = vtableMerge, vtableMerge && (mayHaveIcon = !0, table.internalProps.groupTitleCustomLayout && (customResult = dealWithCustom(table.internalProps.groupTitleCustomLayout, void 0, range.start.col, range.start.row, table.getColsWidth(range.start.col, range.end.col), table.getRowsHeight(range.start.row, range.end.row), !1, table.isAutoRowHeight(row), [0, 0, 0, 0], range, table)), table.internalProps.groupTitleFieldFormat ? value = table.internalProps.groupTitleFieldFormat(rawRecord, col, row, table) : void 0 !== vtableMergeName && (value = vtableMergeName));
|
|
39737
39771
|
}
|
|
39738
39772
|
const cellStyle = customStyle || table._getCellStyle(range ? range.start.col : col, range ? range.start.row : row),
|
|
39739
39773
|
autoWrapText = null !== (_a = cellStyle.autoWrapText) && void 0 !== _a ? _a : table.internalProps.autoWrapText,
|
|
@@ -39762,9 +39796,12 @@
|
|
|
39762
39796
|
});
|
|
39763
39797
|
const textMark = oldCellGroup.getChildByName("text");
|
|
39764
39798
|
if (forceFastUpdate && textMark) {
|
|
39765
|
-
const
|
|
39766
|
-
|
|
39767
|
-
|
|
39799
|
+
const textAlign = cellTheme.text.textAlign,
|
|
39800
|
+
hierarchyOffset = getHierarchyOffset(col, row, table),
|
|
39801
|
+
attribute = {
|
|
39802
|
+
textBaseline: "top",
|
|
39803
|
+
dx: "left" === textAlign ? hierarchyOffset : 0
|
|
39804
|
+
};
|
|
39768
39805
|
textMark.setAttributes(cellTheme.text ? Object.assign({}, cellTheme.text, attribute) : attribute);
|
|
39769
39806
|
} else if (textMark) {
|
|
39770
39807
|
const text = table.getCellValue(col, row),
|
|
@@ -40668,7 +40705,7 @@
|
|
|
40668
40705
|
{
|
|
40669
40706
|
vtableMerge: vtableMerge
|
|
40670
40707
|
} = scene.table.getCellRawRecord(col, row) || {};
|
|
40671
|
-
if (vtableMerge && scene.table.
|
|
40708
|
+
if (vtableMerge && scene.table.internalProps.groupTitleCustomLayout) customLayout = scene.table.internalProps.groupTitleCustomLayout;else if ("body" !== cellLocation) {
|
|
40672
40709
|
const define = scene.table.getHeaderDefine(col, row);
|
|
40673
40710
|
customRender = null == define ? void 0 : define.headerCustomRender, customLayout = null == define ? void 0 : define.headerCustomLayout;
|
|
40674
40711
|
} else {
|
|
@@ -40877,7 +40914,7 @@
|
|
|
40877
40914
|
{
|
|
40878
40915
|
vtableMerge: vtableMerge
|
|
40879
40916
|
} = scene.table.getCellRawRecord(col, row) || {};
|
|
40880
|
-
if (vtableMerge && scene.table.
|
|
40917
|
+
if (vtableMerge && scene.table.internalProps.groupTitleCustomLayout) customLayout = scene.table.internalProps.groupTitleCustomLayout;else if ("body" !== cellType) {
|
|
40881
40918
|
const define = scene.table.getHeaderDefine(col, row);
|
|
40882
40919
|
customRender = null == define ? void 0 : define.headerCustomRender, customLayout = null == define ? void 0 : define.headerCustomLayout;
|
|
40883
40920
|
} else {
|
|
@@ -42099,6 +42136,51 @@
|
|
|
42099
42136
|
group.setAttribute("cornerRadius", cornerRadius), group.border && group.border.setAttribute("cornerRadius", cornerRadius);
|
|
42100
42137
|
}
|
|
42101
42138
|
|
|
42139
|
+
function getCellHoverColor(cellGroup, table) {
|
|
42140
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
42141
|
+
let colorKey, hoverStyle;
|
|
42142
|
+
if ("cell" === cellGroup.role && isValid$3(cellGroup.mergeStartCol) && isValid$3(cellGroup.mergeStartRow) && isValid$3(cellGroup.mergeEndCol) && isValid$3(cellGroup.mergeEndRow)) {
|
|
42143
|
+
const {
|
|
42144
|
+
colStart: colStart,
|
|
42145
|
+
colEnd: colEnd,
|
|
42146
|
+
rowStart: rowStart,
|
|
42147
|
+
rowEnd: rowEnd
|
|
42148
|
+
} = getCellMergeRange(cellGroup, table.scenegraph);
|
|
42149
|
+
for (let col = colStart; col <= colEnd; col++) for (let row = rowStart; row <= rowEnd; row++) {
|
|
42150
|
+
const key = isCellHover(table.stateManager, col, row, cellGroup);
|
|
42151
|
+
!key || colorKey && "cellBgColor" !== key || (colorKey = key);
|
|
42152
|
+
}
|
|
42153
|
+
} else "cell" === cellGroup.role && (colorKey = isCellHover(table.stateManager, cellGroup.col, cellGroup.row, cellGroup));
|
|
42154
|
+
if (!colorKey) return;
|
|
42155
|
+
const layout = table.internalProps.layoutMap;
|
|
42156
|
+
layout.isCornerHeader(cellGroup.col, cellGroup.row) ? hoverStyle = (null === (_a = table.theme.cornerHeaderStyle) || void 0 === _a ? void 0 : _a.hover) || (null === (_b = table.theme.headerStyle) || void 0 === _b ? void 0 : _b.hover) : layout.isColumnHeader(cellGroup.col, cellGroup.row) ? hoverStyle = null === (_c = table.theme.headerStyle) || void 0 === _c ? void 0 : _c.hover : layout.isRowHeader(cellGroup.col, cellGroup.row) ? hoverStyle = null === (_d = table.theme.rowHeaderStyle) || void 0 === _d ? void 0 : _d.hover : layout.isBottomFrozenRow(cellGroup.col, cellGroup.row) ? hoverStyle = (null === (_e = table.theme.bottomFrozenStyle) || void 0 === _e ? void 0 : _e.hover) || (table.isListTable() ? null === (_f = table.theme.bodyStyle) || void 0 === _f ? void 0 : _f.hover : null === (_g = table.theme.headerStyle) || void 0 === _g ? void 0 : _g.hover) : layout.isRightFrozenColumn(cellGroup.col, cellGroup.row) ? hoverStyle = (null === (_h = table.theme.rightFrozenStyle) || void 0 === _h ? void 0 : _h.hover) || (table.isListTable() ? null === (_j = table.theme.bodyStyle) || void 0 === _j ? void 0 : _j.hover : null === (_k = table.theme.rowHeaderStyle) || void 0 === _k ? void 0 : _k.hover) : table.isHeader(cellGroup.col, cellGroup.row) || (hoverStyle = null === (_l = table.theme.bodyStyle) || void 0 === _l ? void 0 : _l.hover);
|
|
42157
|
+
return getProp(colorKey, hoverStyle, cellGroup.col, cellGroup.row, table);
|
|
42158
|
+
}
|
|
42159
|
+
function isCellHover(state, col, row, cellGroup) {
|
|
42160
|
+
var _a;
|
|
42161
|
+
const {
|
|
42162
|
+
highlightScope: highlightScope,
|
|
42163
|
+
disableHeader: disableHeader,
|
|
42164
|
+
cellPos: cellPos
|
|
42165
|
+
} = state.hover,
|
|
42166
|
+
table = state.table,
|
|
42167
|
+
isHeader = table.isHeader(col, row);
|
|
42168
|
+
if (isHeader && disableHeader) return;
|
|
42169
|
+
let hoverMode;
|
|
42170
|
+
if (highlightScope === HighlightScope.single && cellPos.col === col && cellPos.row === row ? hoverMode = "cellBgColor" : highlightScope === HighlightScope.column && cellPos.col === col ? hoverMode = cellPos.col === col && cellPos.row === row ? "cellBgColor" : "inlineColumnBgColor" : highlightScope === HighlightScope.row && cellPos.row === row ? hoverMode = cellPos.col === col && cellPos.row === row ? "cellBgColor" : "inlineRowBgColor" : highlightScope === HighlightScope.cross && (cellPos.col === col && cellPos.row === row ? hoverMode = "cellBgColor" : cellPos.col === col ? hoverMode = "inlineColumnBgColor" : cellPos.row === row && (hoverMode = "inlineRowBgColor")), hoverMode) {
|
|
42171
|
+
let cellDisable;
|
|
42172
|
+
if (isHeader) {
|
|
42173
|
+
const define = table.getHeaderDefine(col, row);
|
|
42174
|
+
cellDisable = null == define ? void 0 : define.disableHeaderHover, cellGroup.firstChild && "axis" === cellGroup.firstChild.name && (null === (_a = table.options.hover) || void 0 === _a ? void 0 : _a.disableAxisHover) && (cellDisable = !0);
|
|
42175
|
+
} else {
|
|
42176
|
+
const define = table.getBodyColumnDefine(col, row);
|
|
42177
|
+
cellDisable = null == define ? void 0 : define.disableHover;
|
|
42178
|
+
}
|
|
42179
|
+
cellDisable && (hoverMode = void 0);
|
|
42180
|
+
}
|
|
42181
|
+
return hoverMode;
|
|
42182
|
+
}
|
|
42183
|
+
|
|
42102
42184
|
const CHART_NUMBER_TYPE = genNumberType();
|
|
42103
42185
|
class Chart extends Rect$1 {
|
|
42104
42186
|
constructor(isShareChartSpec, params) {
|
|
@@ -42129,6 +42211,7 @@
|
|
|
42129
42211
|
col: col,
|
|
42130
42212
|
row: row
|
|
42131
42213
|
} = this.parent,
|
|
42214
|
+
hoverColor = getCellHoverColor(this.parent, table),
|
|
42132
42215
|
{
|
|
42133
42216
|
x1: x1,
|
|
42134
42217
|
y1: y1,
|
|
@@ -42164,6 +42247,14 @@
|
|
|
42164
42247
|
},
|
|
42165
42248
|
afterRender(stage) {
|
|
42166
42249
|
stage.window.getContext().inuse = !1, stage.needRender = !1, chartStage.resumeRender();
|
|
42250
|
+
},
|
|
42251
|
+
afterClearScreen(drawParams) {
|
|
42252
|
+
const {
|
|
42253
|
+
context: context,
|
|
42254
|
+
layer: layer,
|
|
42255
|
+
viewBox: viewBox
|
|
42256
|
+
} = drawParams;
|
|
42257
|
+
layer.main && (context.beginPath(), context.fillStyle = hoverColor, context.rect(viewBox.x1, viewBox.y1, viewBox.x2 - viewBox.x1, viewBox.y2 - viewBox.y1), context.fill());
|
|
42167
42258
|
}
|
|
42168
42259
|
}));
|
|
42169
42260
|
const chartStage = this.activeChartInstance.getStage(),
|
|
@@ -42542,51 +42633,6 @@
|
|
|
42542
42633
|
};
|
|
42543
42634
|
AfterGifImageRenderContribution = __decorate$5([injectable()], AfterGifImageRenderContribution);
|
|
42544
42635
|
|
|
42545
|
-
function getCellHoverColor(cellGroup, table) {
|
|
42546
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
42547
|
-
let colorKey, hoverStyle;
|
|
42548
|
-
if ("cell" === cellGroup.role && isValid$3(cellGroup.mergeStartCol) && isValid$3(cellGroup.mergeStartRow) && isValid$3(cellGroup.mergeEndCol) && isValid$3(cellGroup.mergeEndRow)) {
|
|
42549
|
-
const {
|
|
42550
|
-
colStart: colStart,
|
|
42551
|
-
colEnd: colEnd,
|
|
42552
|
-
rowStart: rowStart,
|
|
42553
|
-
rowEnd: rowEnd
|
|
42554
|
-
} = getCellMergeRange(cellGroup, table.scenegraph);
|
|
42555
|
-
for (let col = colStart; col <= colEnd; col++) for (let row = rowStart; row <= rowEnd; row++) {
|
|
42556
|
-
const key = isCellHover(table.stateManager, col, row, cellGroup);
|
|
42557
|
-
!key || colorKey && "cellBgColor" !== key || (colorKey = key);
|
|
42558
|
-
}
|
|
42559
|
-
} else "cell" === cellGroup.role && (colorKey = isCellHover(table.stateManager, cellGroup.col, cellGroup.row, cellGroup));
|
|
42560
|
-
if (!colorKey) return;
|
|
42561
|
-
const layout = table.internalProps.layoutMap;
|
|
42562
|
-
layout.isCornerHeader(cellGroup.col, cellGroup.row) ? hoverStyle = (null === (_a = table.theme.cornerHeaderStyle) || void 0 === _a ? void 0 : _a.hover) || (null === (_b = table.theme.headerStyle) || void 0 === _b ? void 0 : _b.hover) : layout.isColumnHeader(cellGroup.col, cellGroup.row) ? hoverStyle = null === (_c = table.theme.headerStyle) || void 0 === _c ? void 0 : _c.hover : layout.isRowHeader(cellGroup.col, cellGroup.row) ? hoverStyle = null === (_d = table.theme.rowHeaderStyle) || void 0 === _d ? void 0 : _d.hover : layout.isBottomFrozenRow(cellGroup.col, cellGroup.row) ? hoverStyle = (null === (_e = table.theme.bottomFrozenStyle) || void 0 === _e ? void 0 : _e.hover) || (table.isListTable() ? null === (_f = table.theme.bodyStyle) || void 0 === _f ? void 0 : _f.hover : null === (_g = table.theme.headerStyle) || void 0 === _g ? void 0 : _g.hover) : layout.isRightFrozenColumn(cellGroup.col, cellGroup.row) ? hoverStyle = (null === (_h = table.theme.rightFrozenStyle) || void 0 === _h ? void 0 : _h.hover) || (table.isListTable() ? null === (_j = table.theme.bodyStyle) || void 0 === _j ? void 0 : _j.hover : null === (_k = table.theme.rowHeaderStyle) || void 0 === _k ? void 0 : _k.hover) : table.isHeader(cellGroup.col, cellGroup.row) || (hoverStyle = null === (_l = table.theme.bodyStyle) || void 0 === _l ? void 0 : _l.hover);
|
|
42563
|
-
return getProp(colorKey, hoverStyle, cellGroup.col, cellGroup.row, table);
|
|
42564
|
-
}
|
|
42565
|
-
function isCellHover(state, col, row, cellGroup) {
|
|
42566
|
-
var _a;
|
|
42567
|
-
const {
|
|
42568
|
-
highlightScope: highlightScope,
|
|
42569
|
-
disableHeader: disableHeader,
|
|
42570
|
-
cellPos: cellPos
|
|
42571
|
-
} = state.hover,
|
|
42572
|
-
table = state.table,
|
|
42573
|
-
isHeader = table.isHeader(col, row);
|
|
42574
|
-
if (isHeader && disableHeader) return;
|
|
42575
|
-
let hoverMode;
|
|
42576
|
-
if (highlightScope === HighlightScope.single && cellPos.col === col && cellPos.row === row ? hoverMode = "cellBgColor" : highlightScope === HighlightScope.column && cellPos.col === col ? hoverMode = cellPos.col === col && cellPos.row === row ? "cellBgColor" : "inlineColumnBgColor" : highlightScope === HighlightScope.row && cellPos.row === row ? hoverMode = cellPos.col === col && cellPos.row === row ? "cellBgColor" : "inlineRowBgColor" : highlightScope === HighlightScope.cross && (cellPos.col === col && cellPos.row === row ? hoverMode = "cellBgColor" : cellPos.col === col ? hoverMode = "inlineColumnBgColor" : cellPos.row === row && (hoverMode = "inlineRowBgColor")), hoverMode) {
|
|
42577
|
-
let cellDisable;
|
|
42578
|
-
if (isHeader) {
|
|
42579
|
-
const define = table.getHeaderDefine(col, row);
|
|
42580
|
-
cellDisable = null == define ? void 0 : define.disableHeaderHover, cellGroup.firstChild && "axis" === cellGroup.firstChild.name && (null === (_a = table.options.hover) || void 0 === _a ? void 0 : _a.disableAxisHover) && (cellDisable = !0);
|
|
42581
|
-
} else {
|
|
42582
|
-
const define = table.getBodyColumnDefine(col, row);
|
|
42583
|
-
cellDisable = null == define ? void 0 : define.disableHover;
|
|
42584
|
-
}
|
|
42585
|
-
cellDisable && (hoverMode = void 0);
|
|
42586
|
-
}
|
|
42587
|
-
return hoverMode;
|
|
42588
|
-
}
|
|
42589
|
-
|
|
42590
42636
|
function getCellSelectColor(cellGroup, table) {
|
|
42591
42637
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
42592
42638
|
let colorKey, selectStyle;
|
|
@@ -43628,7 +43674,7 @@
|
|
|
43628
43674
|
vtableMergeName: vtableMergeName,
|
|
43629
43675
|
vtableMerge: vtableMerge
|
|
43630
43676
|
} = null != rawRecord ? rawRecord : {};
|
|
43631
|
-
isVtableMerge = vtableMerge, vtableMerge && (mayHaveIcon = !0, table.
|
|
43677
|
+
isVtableMerge = vtableMerge, vtableMerge && (mayHaveIcon = !0, table.internalProps.groupTitleCustomLayout && (customResult = dealWithCustom(table.internalProps.groupTitleCustomLayout, void 0, range.start.col, range.start.row, table.getColsWidth(range.start.col, range.end.col), table.getRowsHeight(range.start.row, range.end.row), !1, table.isAutoRowHeight(row), [0, 0, 0, 0], range, table)), table.internalProps.groupTitleFieldFormat ? value = table.internalProps.groupTitleFieldFormat(rawRecord, col, row, table) : void 0 !== vtableMergeName && (value = vtableMergeName));
|
|
43632
43678
|
}
|
|
43633
43679
|
const type = isVtableMerge || isCustomMerge ? "text" : null !== (_b = table.isHeader(col, row) ? null !== (_a = table._getHeaderLayoutMap(col, row).headerType) && void 0 !== _a ? _a : "text" : table.getBodyColumnType(col, row)) && void 0 !== _b ? _b : "text";
|
|
43634
43680
|
if (isPromise(value)) {
|
|
@@ -45225,13 +45271,20 @@
|
|
|
45225
45271
|
const pos = _getUpdateRowIndex(addRows[0] - 1, addRows[addRows.length - 1] + 1, scene);
|
|
45226
45272
|
rowUpdatePos = isValid$3(rowUpdatePos) ? isValid$3(pos) ? Math.min(rowUpdatePos, pos) : rowUpdatePos : pos;
|
|
45227
45273
|
}
|
|
45274
|
+
const batchMergePos = new Set();
|
|
45228
45275
|
for (let col = 0; col < table.colCount; col++) updateRows.forEach(row => {
|
|
45229
45276
|
if (row < table.frozenRowCount) {
|
|
45230
45277
|
const mergeInfo = getCellMergeInfo(scene.table, col, row);
|
|
45231
|
-
if (mergeInfo) for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++)
|
|
45278
|
+
if (mergeInfo) for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {
|
|
45279
|
+
const key = `${col}-${row}`;
|
|
45280
|
+
batchMergePos.has(key) || (updateCell$1(col, row, scene.table, !1), batchMergePos.add(key));
|
|
45281
|
+
} else updateCell$1(col, row, scene.table, !1);
|
|
45232
45282
|
} else if (row > table.rowCount - 1 || row < scene.table.rowCount - scene.table.bottomFrozenRowCount && (row < scene.proxy.rowStart || row > scene.proxy.rowEnd)) removeCellGroup(row, scene);else {
|
|
45233
45283
|
const mergeInfo = getCellMergeInfo(scene.table, col, row);
|
|
45234
|
-
if (mergeInfo) for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++)
|
|
45284
|
+
if (mergeInfo) for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {
|
|
45285
|
+
const key = `${col}-${row}`;
|
|
45286
|
+
batchMergePos.has(key) || (updateCell$1(col, row, scene.table, !1), batchMergePos.add(key));
|
|
45287
|
+
} else updateCell$1(col, row, scene.table, !1);
|
|
45235
45288
|
}
|
|
45236
45289
|
});
|
|
45237
45290
|
if (updateRows.length) {
|
|
@@ -45971,7 +46024,7 @@
|
|
|
45971
46024
|
clip: !0,
|
|
45972
46025
|
pickable: !1
|
|
45973
46026
|
}), scene.tableGroup.role = "table";
|
|
45974
|
-
const colHeaderGroup = createContainerGroup(0, 0, !scene.table.
|
|
46027
|
+
const colHeaderGroup = createContainerGroup(0, 0, !scene.table.internalProps.enableTreeStickCell);
|
|
45975
46028
|
colHeaderGroup.role = "col-header", scene.colHeaderGroup = colHeaderGroup;
|
|
45976
46029
|
const cornerHeaderGroup = createContainerGroup(0, 0, !scene.table.options.enableTreeStickCell);
|
|
45977
46030
|
cornerHeaderGroup.role = "corner-header", scene.cornerHeaderGroup = cornerHeaderGroup;
|
|
@@ -46208,15 +46261,20 @@
|
|
|
46208
46261
|
});
|
|
46209
46262
|
const colWidthsMap = table.colWidthsMap;
|
|
46210
46263
|
let updateAfter;
|
|
46211
|
-
|
|
46264
|
+
removeCols.forEach(col => {
|
|
46212
46265
|
colWidthsMap.delAndReorder(col);
|
|
46213
46266
|
}), removeCols.length && resetColNumber(scene), scene.table._clearColRangeWidthsMap(), addCols.forEach(col => {
|
|
46214
46267
|
const needUpdateAfter = addCol(col, scene);
|
|
46215
46268
|
resetColNumber(scene), updateAfter = null != updateAfter ? updateAfter : needUpdateAfter, colWidthsMap.addAndReorder(col);
|
|
46216
|
-
}), resetColNumberAndX(scene)
|
|
46269
|
+
}), resetColNumberAndX(scene);
|
|
46270
|
+
const batchMergePos = new Set();
|
|
46271
|
+
if (updateCols.forEach(col => {
|
|
46217
46272
|
for (let row = 0; row < table.rowCount; row++) {
|
|
46218
46273
|
const mergeInfo = getCellMergeInfo(scene.table, col, row);
|
|
46219
|
-
if (mergeInfo) for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++)
|
|
46274
|
+
if (mergeInfo) for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) {
|
|
46275
|
+
const key = `${col}-${row}`;
|
|
46276
|
+
batchMergePos.has(key) || (updateCell$1(col, row, scene.table, !1), batchMergePos.add(key));
|
|
46277
|
+
} else updateCell$1(col, row, scene.table, !1);
|
|
46220
46278
|
}
|
|
46221
46279
|
}), isNumber$4(updateAfter)) {
|
|
46222
46280
|
for (let col = updateAfter; col < Math.max(table.colCount, null !== (_a = table.internalProps._oldColCount) && void 0 !== _a ? _a : table.colCount); col++) for (let row = 0; row < Math.max(table.rowCount, null !== (_b = table.internalProps._oldRowCount) && void 0 !== _b ? _b : table.rowCount); row++) {
|
|
@@ -47248,14 +47306,14 @@
|
|
|
47248
47306
|
scenegraph.hideHoverIcon(prevHoverCellCol, prevHoverCellRow), scenegraph.showHoverIcon(col, row), cellPosContainHeader.col = col, cellPosContainHeader.row = row;
|
|
47249
47307
|
}
|
|
47250
47308
|
if ((disableHeader && table.isHeader(col, row) || highlightScope === HighlightScope.none) && (col = -1, row = -1), prevHoverCellCol === col && prevHoverCellRow === row) return;
|
|
47251
|
-
(null === (_a = state.table.options.customConfig) || void 0 === _a ? void 0 : _a.disableBuildInChartActive) || (scenegraph.deactivateChart(prevHoverCellCol, prevHoverCellRow), scenegraph.activateChart(col, row));
|
|
47309
|
+
cellPos.col = col, cellPos.row = row, (null === (_a = state.table.options.customConfig) || void 0 === _a ? void 0 : _a.disableBuildInChartActive) || (scenegraph.deactivateChart(prevHoverCellCol, prevHoverCellRow), scenegraph.activateChart(col, row));
|
|
47252
47310
|
let updateScenegraph = !1;
|
|
47253
47311
|
const {
|
|
47254
47312
|
ranges: ranges,
|
|
47255
47313
|
highlightScope: selectMode
|
|
47256
47314
|
} = state.select;
|
|
47257
47315
|
if (-1 !== prevHoverCellCol && -1 !== prevHoverCellRow && (updateScenegraph = clearHover(scenegraph, prevHoverCellCol, prevHoverCellRow, ranges, singleStyle, highlightScope), disableHeader || scenegraph.hideHoverIcon(prevHoverCellCol, prevHoverCellRow)), -1 === col || -1 === row) return cellPos.col = -1, cellPos.row = -1, void (!updateScenegraph || prevHoverCellCol === col && prevHoverCellRow === row || state.table.scenegraph.updateNextFrame());
|
|
47258
|
-
highlightScope === HighlightScope.single ? updateScenegraph = !!updateSingleHover(scenegraph, col, row) : highlightScope === HighlightScope.row ? updateScenegraph = !!updateRowHover(scenegraph, col, row) : highlightScope === HighlightScope.column ? updateScenegraph = !!updateColHover(scenegraph, col) : highlightScope === HighlightScope.cross && (updateScenegraph = !!updateRowHover(scenegraph, col, row) , updateScenegraph = !!updateColHover(scenegraph, col) ), highlightScope === HighlightScope.none || disableHeader || scenegraph.showHoverIcon(col, row),
|
|
47316
|
+
highlightScope === HighlightScope.single ? updateScenegraph = !!updateSingleHover(scenegraph, col, row) : highlightScope === HighlightScope.row ? updateScenegraph = !!updateRowHover(scenegraph, col, row) : highlightScope === HighlightScope.column ? updateScenegraph = !!updateColHover(scenegraph, col) : highlightScope === HighlightScope.cross && (updateScenegraph = !!updateRowHover(scenegraph, col, row) , updateScenegraph = !!updateColHover(scenegraph, col) ), highlightScope === HighlightScope.none || disableHeader || scenegraph.showHoverIcon(col, row), updateScenegraph && state.table.scenegraph.updateNextFrame();
|
|
47259
47317
|
}
|
|
47260
47318
|
function clearHover(scenegraph, col, row, selectRanges, singleStyle, mode, selectMode) {
|
|
47261
47319
|
let updateScenegraph = !1;
|
|
@@ -48146,9 +48204,9 @@
|
|
|
48146
48204
|
}
|
|
48147
48205
|
function setHeaderCheckedState(field, checked, state) {
|
|
48148
48206
|
var _a;
|
|
48149
|
-
state.headerCheckedState[field] = checked, null === (_a = state.checkedState) || void 0 === _a || _a.forEach(recordCheckState => {
|
|
48207
|
+
state.headerCheckedState[field] = checked, state.table.internalProps.enableCheckboxCascade && (null === (_a = state.checkedState) || void 0 === _a || _a.forEach(recordCheckState => {
|
|
48150
48208
|
recordCheckState[field] = checked;
|
|
48151
|
-
});
|
|
48209
|
+
}));
|
|
48152
48210
|
}
|
|
48153
48211
|
function syncCheckedState(col, row, field, checked, state) {
|
|
48154
48212
|
var _a, _b;
|
|
@@ -48164,7 +48222,7 @@
|
|
|
48164
48222
|
if (recordIndex >= 0) {
|
|
48165
48223
|
const dataIndex = state.table.dataSource.getIndexKey(recordIndex).toString();
|
|
48166
48224
|
if (isValid$3(null === (_b = state.checkedState.get(dataIndex)) || void 0 === _b ? void 0 : _b[field])) return state.checkedState.get(dataIndex)[field];
|
|
48167
|
-
if (state.checkedState.get(dataIndex)) state.checkedState.get(dataIndex)[field] = checked;else if (dataIndex.includes(",")) {
|
|
48225
|
+
if (state.checkedState.get(dataIndex)) state.checkedState.get(dataIndex)[field] = checked;else if (state.table.internalProps.enableCheckboxCascade && dataIndex.includes(",")) {
|
|
48168
48226
|
const parentDataIndex = dataIndex.split(",").slice(0, -1).join(",");
|
|
48169
48227
|
state.checkedState.has(parentDataIndex) && !0 === state.checkedState.get(parentDataIndex)[field] ? state.checkedState.set(dataIndex, {
|
|
48170
48228
|
[field]: !0
|
|
@@ -48196,12 +48254,12 @@
|
|
|
48196
48254
|
allUnChecked = !0,
|
|
48197
48255
|
hasChecked = !1;
|
|
48198
48256
|
return state.checkedState.forEach((check_state, index) => {
|
|
48199
|
-
var _a
|
|
48257
|
+
var _a;
|
|
48200
48258
|
index = index.includes(",") ? index.split(",").map(item => Number(item)) : Number(index);
|
|
48201
48259
|
const tableIndex = state.table.getTableIndexByRecordIndex(index),
|
|
48202
48260
|
mergeCell = state.table.transpose ? state.table.getCustomMerge(tableIndex, row) : state.table.getCustomMerge(col, tableIndex),
|
|
48203
48261
|
data = null === (_a = state.table.dataSource) || void 0 === _a ? void 0 : _a.get(index);
|
|
48204
|
-
mergeCell || !
|
|
48262
|
+
mergeCell || !state.table.internalProps.enableCheckboxCascade && (null == data ? void 0 : data.vtableMerge) || (!0 !== (null == check_state ? void 0 : check_state[field]) ? allChecked = !1 : (allUnChecked = !1, hasChecked = !0));
|
|
48205
48263
|
}), allChecked ? (state.headerCheckedState[field] = !0, allChecked) : allUnChecked ? (state.headerCheckedState[field] = !1, !1) : !!hasChecked && (state.headerCheckedState[field] = "indeterminate", "indeterminate");
|
|
48206
48264
|
}
|
|
48207
48265
|
function initLeftRecordsCheckState(records, state) {
|
|
@@ -49783,10 +49841,10 @@
|
|
|
49783
49841
|
checked: e.detail.checked
|
|
49784
49842
|
});
|
|
49785
49843
|
if (table.isHeader(col, row)) {
|
|
49786
|
-
table.stateManager.setHeaderCheckedState(cellInfo.field, e.detail.checked)
|
|
49787
|
-
|
|
49788
|
-
|
|
49789
|
-
|
|
49844
|
+
if (table.stateManager.setHeaderCheckedState(cellInfo.field, e.detail.checked), table.internalProps.enableCheckboxCascade) {
|
|
49845
|
+
"checkbox" === table.getCellType(col, row) && table.scenegraph.updateCheckboxCellState(col, row, e.detail.checked);
|
|
49846
|
+
}
|
|
49847
|
+
} else if (table.stateManager.setCheckedState(col, row, cellInfo.field, e.detail.checked), table.internalProps.enableCheckboxCascade) {
|
|
49790
49848
|
if ("checkbox" === table.getCellType(col, row)) {
|
|
49791
49849
|
const oldHeaderCheckedState = table.stateManager.headerCheckedState[cellInfo.field],
|
|
49792
49850
|
newHeaderCheckedState = table.stateManager.updateHeaderCheckedState(cellInfo.field, col, row);
|
|
@@ -50559,20 +50617,20 @@
|
|
|
50559
50617
|
|
|
50560
50618
|
function bindGroupTitleCheckboxChange(table) {
|
|
50561
50619
|
table.on("checkbox_state_change", args => {
|
|
50562
|
-
var _a
|
|
50620
|
+
var _a;
|
|
50563
50621
|
const {
|
|
50564
50622
|
col: col,
|
|
50565
50623
|
row: row,
|
|
50566
50624
|
checked: checked,
|
|
50567
50625
|
field: field
|
|
50568
50626
|
} = args;
|
|
50569
|
-
if (!table.internalProps.layoutMap.isSeriesNumber(col, row) || !0 !==
|
|
50627
|
+
if (!table.internalProps.layoutMap.isSeriesNumber(col, row) || !0 !== table.internalProps.enableCheckboxCascade) return;
|
|
50570
50628
|
if (table.isHeader(col, row)) return;
|
|
50571
50629
|
const record = table.getCellOriginRecord(col, row),
|
|
50572
50630
|
indexedData = table.dataSource.currentPagerIndexedData,
|
|
50573
50631
|
titleShowIndex = table.getRecordShowIndexByCell(col, row);
|
|
50574
50632
|
let titleIndex = indexedData[titleShowIndex];
|
|
50575
|
-
if (isNumber$4(titleIndex) && (titleIndex = [titleIndex]), record.vtableMerge || (null === (
|
|
50633
|
+
if (isNumber$4(titleIndex) && (titleIndex = [titleIndex]), record.vtableMerge || (null === (_a = record.children) || void 0 === _a ? void 0 : _a.length)) {
|
|
50576
50634
|
if (checked) getHierarchyState(table, col, row) === HierarchyState.collapse ? updateChildrenCheckboxState(!0, titleIndex, table, field) : setAllChildrenCheckboxState(!0, titleShowIndex, titleIndex, indexedData, table, col), updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table, col);else {
|
|
50577
50635
|
getHierarchyState(table, col, row) === HierarchyState.collapse ? updateChildrenCheckboxState(!1, titleIndex, table, field) : setAllChildrenCheckboxState(!1, titleShowIndex, titleIndex, indexedData, table, col), updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table, col);
|
|
50578
50636
|
const oldHeaderCheckedState = table.stateManager.headerCheckedState._vtable_rowSeries_number,
|
|
@@ -50583,7 +50641,7 @@
|
|
|
50583
50641
|
});
|
|
50584
50642
|
}
|
|
50585
50643
|
function bindGroupCheckboxTreeChange(table) {
|
|
50586
|
-
table.on("checkbox_state_change", args => {
|
|
50644
|
+
!0 === table.internalProps.enableCheckboxCascade && table.on("checkbox_state_change", args => {
|
|
50587
50645
|
var _a;
|
|
50588
50646
|
const {
|
|
50589
50647
|
col: col,
|
|
@@ -50692,7 +50750,7 @@
|
|
|
50692
50750
|
});
|
|
50693
50751
|
}
|
|
50694
50752
|
function bindHeaderCheckboxChange(table) {
|
|
50695
|
-
table.on("checkbox_state_change", args => {
|
|
50753
|
+
!0 === table.internalProps.enableCheckboxCascade && table.on("checkbox_state_change", args => {
|
|
50696
50754
|
const {
|
|
50697
50755
|
col: col,
|
|
50698
50756
|
row: row,
|
|
@@ -50892,7 +50950,7 @@
|
|
|
50892
50950
|
const {
|
|
50893
50951
|
eventArgs: eventArgs
|
|
50894
50952
|
} = eventArgsSet;
|
|
50895
|
-
if (this.table.
|
|
50953
|
+
if (this.table.internalProps.enableTreeStickCell && !eventArgs) return !1;
|
|
50896
50954
|
const resizeCol = this.table.scenegraph.getResizeColAt(eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y, null == eventArgs ? void 0 : eventArgs.targetCell);
|
|
50897
50955
|
return this.table._canResizeColumn(resizeCol.col, resizeCol.row) && resizeCol.col >= 0 ? (update && this.table.stateManager.startResizeCol(resizeCol.col, eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y, resizeCol.rightFrozen), !0) : (this.table.stateManager.isResizeCol() && this.table.stateManager.endResizeCol(), !1);
|
|
50898
50956
|
}
|
|
@@ -52508,7 +52566,7 @@
|
|
|
52508
52566
|
return count;
|
|
52509
52567
|
}
|
|
52510
52568
|
function checkHasTreeDefine(layoutMap) {
|
|
52511
|
-
if (layoutMap._table.
|
|
52569
|
+
if (layoutMap._table.internalProps.groupBy) return !0;
|
|
52512
52570
|
const {
|
|
52513
52571
|
columns: columns
|
|
52514
52572
|
} = layoutMap._table.options;
|
|
@@ -53651,58 +53709,65 @@
|
|
|
53651
53709
|
return TABLE_EVENT_TYPE;
|
|
53652
53710
|
}
|
|
53653
53711
|
constructor(container, options = {}) {
|
|
53654
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
53655
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.19.4-alpha.
|
|
53712
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
53713
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.19.4-alpha.2", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
|
|
53656
53714
|
this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
|
|
53657
53715
|
options: options,
|
|
53658
53716
|
container: container
|
|
53659
53717
|
}), container = options.container && options.container instanceof HTMLElement ? options.container : container, !1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vglobal.isImageAnonymous = !1);
|
|
53660
53718
|
const {
|
|
53661
|
-
|
|
53662
|
-
|
|
53663
|
-
|
|
53664
|
-
|
|
53665
|
-
|
|
53666
|
-
|
|
53667
|
-
|
|
53668
|
-
|
|
53669
|
-
|
|
53670
|
-
|
|
53671
|
-
|
|
53672
|
-
|
|
53673
|
-
|
|
53674
|
-
|
|
53675
|
-
|
|
53676
|
-
|
|
53677
|
-
|
|
53678
|
-
|
|
53679
|
-
|
|
53680
|
-
|
|
53681
|
-
|
|
53682
|
-
|
|
53683
|
-
|
|
53684
|
-
|
|
53685
|
-
|
|
53686
|
-
|
|
53687
|
-
|
|
53688
|
-
|
|
53689
|
-
|
|
53690
|
-
|
|
53691
|
-
|
|
53692
|
-
|
|
53693
|
-
|
|
53694
|
-
|
|
53695
|
-
|
|
53696
|
-
|
|
53697
|
-
|
|
53698
|
-
|
|
53699
|
-
|
|
53700
|
-
|
|
53701
|
-
|
|
53702
|
-
|
|
53703
|
-
|
|
53704
|
-
|
|
53705
|
-
|
|
53719
|
+
frozenColCount = 0,
|
|
53720
|
+
unfreezeAllOnExceedsMaxWidth: unfreezeAllOnExceedsMaxWidth,
|
|
53721
|
+
frozenRowCount: frozenRowCount,
|
|
53722
|
+
defaultRowHeight = 40,
|
|
53723
|
+
defaultHeaderRowHeight: defaultHeaderRowHeight,
|
|
53724
|
+
defaultColWidth = 80,
|
|
53725
|
+
defaultHeaderColWidth: defaultHeaderColWidth,
|
|
53726
|
+
widthMode = "standard",
|
|
53727
|
+
heightMode = "standard",
|
|
53728
|
+
autoFillWidth = !1,
|
|
53729
|
+
autoFillHeight = !1,
|
|
53730
|
+
containerFit = {
|
|
53731
|
+
width: !1,
|
|
53732
|
+
height: !1
|
|
53733
|
+
},
|
|
53734
|
+
widthAdaptiveMode = "only-body",
|
|
53735
|
+
heightAdaptiveMode = "only-body",
|
|
53736
|
+
keyboardOptions: keyboardOptions,
|
|
53737
|
+
eventOptions: eventOptions,
|
|
53738
|
+
rowSeriesNumber: rowSeriesNumber,
|
|
53739
|
+
enableCheckboxCascade: enableCheckboxCascade,
|
|
53740
|
+
columnResizeMode: columnResizeMode,
|
|
53741
|
+
rowResizeMode = "none",
|
|
53742
|
+
resize: resize,
|
|
53743
|
+
dragHeaderMode: dragHeaderMode,
|
|
53744
|
+
dragOrder: dragOrder,
|
|
53745
|
+
showFrozenIcon: showFrozenIcon,
|
|
53746
|
+
allowFrozenColCount: allowFrozenColCount,
|
|
53747
|
+
padding: padding,
|
|
53748
|
+
hover: hover,
|
|
53749
|
+
menu: menu,
|
|
53750
|
+
select: click,
|
|
53751
|
+
customRender: customRender,
|
|
53752
|
+
pixelRatio = defaultPixelRatio,
|
|
53753
|
+
renderChartAsync: renderChartAsync,
|
|
53754
|
+
renderChartAsyncBatchCount: renderChartAsyncBatchCount,
|
|
53755
|
+
mode: mode,
|
|
53756
|
+
modeParams: modeParams,
|
|
53757
|
+
canvasWidth: canvasWidth,
|
|
53758
|
+
canvasHeight: canvasHeight,
|
|
53759
|
+
overscrollBehavior: overscrollBehavior,
|
|
53760
|
+
limitMinWidth: limitMinWidth,
|
|
53761
|
+
limitMinHeight: limitMinHeight,
|
|
53762
|
+
clearDOM = !0
|
|
53763
|
+
} = options,
|
|
53764
|
+
{
|
|
53765
|
+
groupConfig: groupConfig,
|
|
53766
|
+
groupBy: groupBy,
|
|
53767
|
+
groupTitleFieldFormat: groupTitleFieldFormat,
|
|
53768
|
+
groupTitleCustomLayout: groupTitleCustomLayout,
|
|
53769
|
+
enableTreeStickCell: enableTreeStickCell
|
|
53770
|
+
} = options;
|
|
53706
53771
|
this.container = container, this.options = options, this._widthMode = widthMode, this._heightMode = heightMode, this._widthAdaptiveMode = widthAdaptiveMode, this._heightAdaptiveMode = heightAdaptiveMode, this._autoFillWidth = autoFillWidth, this._autoFillHeight = autoFillHeight, void 0 !== containerFit && (this._containerFit = "boolean" == typeof containerFit ? {
|
|
53707
53772
|
width: containerFit,
|
|
53708
53773
|
height: containerFit
|
|
@@ -53719,7 +53784,7 @@
|
|
|
53719
53784
|
bottom: 0
|
|
53720
53785
|
}, padding && ("number" == typeof padding ? (this.padding.top = padding, this.padding.left = padding, this.padding.bottom = padding, this.padding.right = padding) : (padding.top && (this.padding.top = padding.top), padding.bottom && (this.padding.bottom = padding.bottom), padding.left && (this.padding.left = padding.left), padding.right && (this.padding.right = padding.right))), (isValid$3(canvasHeight) || isValid$3(canvasWidth)) && (this.canvasSizeSeted = !0), this.tableNoFrameWidth = 0, this.tableNoFrameHeight = 0, this.canvasWidth = isNumber$4(canvasWidth) ? canvasWidth : void 0, this.canvasHeight = isNumber$4(canvasHeight) ? canvasHeight : void 0, this.columnWidthComputeMode = null !== (_d = options.columnWidthComputeMode) && void 0 !== _d ? _d : "normal";
|
|
53721
53786
|
const internalProps = this.internalProps = {};
|
|
53722
|
-
void 0 !== showFrozenIcon && (this.showFrozenIcon = showFrozenIcon), "number" == typeof allowFrozenColCount && allowFrozenColCount <= 0 && (this.showFrozenIcon = !1), this.options.canvas ? ("node" !== Env.mode && (internalProps.element = this.options.canvas.parentElement, internalProps.element.style.position = "relative"), internalProps.focusControl = new FocusInput(this, internalProps.element), internalProps.canvas = this.options.canvas, internalProps.context = internalProps.canvas.getContext("2d")) : "node" !== Env.mode && (internalProps.element = createRootElement(this.padding), internalProps.focusControl = new FocusInput(this, internalProps.element), internalProps.canvas = document.createElement("canvas"), internalProps.element.appendChild(internalProps.canvas), internalProps.context = internalProps.canvas.getContext("2d"), (null === (_e = options.customConfig) || void 0 === _e ? void 0 : _e.createReactContainer) && createReactContainer(this)), internalProps.handler = new EventHandler(), isNumber$4(this.options.resizeTime) && (internalProps.handler.resizeTime = this.options.resizeTime), internalProps.pixelRatio = pixelRatio, internalProps.frozenColCount = frozenColCount, internalProps.frozenRowCount = frozenRowCount, internalProps.unfreezeAllOnExceedsMaxWidth = null == unfreezeAllOnExceedsMaxWidth || unfreezeAllOnExceedsMaxWidth, internalProps.defaultRowHeight = defaultRowHeight, internalProps.defaultHeaderRowHeight = null != defaultHeaderRowHeight ? defaultHeaderRowHeight : defaultRowHeight, internalProps.defaultColWidth = defaultColWidth, internalProps.defaultHeaderColWidth = null != defaultHeaderColWidth ? defaultHeaderColWidth : defaultColWidth, internalProps.keyboardOptions = keyboardOptions, internalProps.eventOptions = eventOptions, internalProps.rowSeriesNumber = rowSeriesNumber, internalProps.enableCheckboxCascade = enableCheckboxCascade, internalProps.columnResizeMode = null !== (
|
|
53787
|
+
void 0 !== showFrozenIcon && (this.showFrozenIcon = showFrozenIcon), "number" == typeof allowFrozenColCount && allowFrozenColCount <= 0 && (this.showFrozenIcon = !1), this.options.canvas ? ("node" !== Env.mode && (internalProps.element = this.options.canvas.parentElement, internalProps.element.style.position = "relative"), internalProps.focusControl = new FocusInput(this, internalProps.element), internalProps.canvas = this.options.canvas, internalProps.context = internalProps.canvas.getContext("2d")) : "node" !== Env.mode && (internalProps.element = createRootElement(this.padding), internalProps.focusControl = new FocusInput(this, internalProps.element), internalProps.canvas = document.createElement("canvas"), internalProps.element.appendChild(internalProps.canvas), internalProps.context = internalProps.canvas.getContext("2d"), (null === (_e = options.customConfig) || void 0 === _e ? void 0 : _e.createReactContainer) && createReactContainer(this)), internalProps.handler = new EventHandler(), isNumber$4(this.options.resizeTime) && (internalProps.handler.resizeTime = this.options.resizeTime), internalProps.pixelRatio = pixelRatio, internalProps.frozenColCount = frozenColCount, internalProps.frozenRowCount = frozenRowCount, internalProps.unfreezeAllOnExceedsMaxWidth = null == unfreezeAllOnExceedsMaxWidth || unfreezeAllOnExceedsMaxWidth, internalProps.defaultRowHeight = defaultRowHeight, internalProps.defaultHeaderRowHeight = null != defaultHeaderRowHeight ? defaultHeaderRowHeight : defaultRowHeight, internalProps.defaultColWidth = defaultColWidth, internalProps.defaultHeaderColWidth = null != defaultHeaderColWidth ? defaultHeaderColWidth : defaultColWidth, internalProps.keyboardOptions = keyboardOptions, internalProps.eventOptions = eventOptions, internalProps.rowSeriesNumber = rowSeriesNumber, internalProps.enableCheckboxCascade = null === (_f = null != enableCheckboxCascade ? enableCheckboxCascade : null == rowSeriesNumber ? void 0 : rowSeriesNumber.enableTreeCheckbox) || void 0 === _f || _f, internalProps.columnResizeMode = null !== (_g = null == resize ? void 0 : resize.columnResizeMode) && void 0 !== _g ? _g : columnResizeMode, internalProps.rowResizeMode = null !== (_h = null == resize ? void 0 : resize.rowResizeMode) && void 0 !== _h ? _h : rowResizeMode, internalProps.dragHeaderMode = null !== (_k = null !== (_j = null == dragOrder ? void 0 : dragOrder.dragHeaderMode) && void 0 !== _j ? _j : dragHeaderMode) && void 0 !== _k ? _k : "none", internalProps.renderChartAsync = renderChartAsync, setBatchRenderChartCount(renderChartAsyncBatchCount), internalProps.overscrollBehavior = null != overscrollBehavior ? overscrollBehavior : "auto", internalProps.groupBy = null !== (_l = null == groupConfig ? void 0 : groupConfig.groupBy) && void 0 !== _l ? _l : groupBy, internalProps.titleCheckbox = null == groupConfig ? void 0 : groupConfig.titleCheckbox, internalProps.groupTitleFieldFormat = null !== (_m = null == groupConfig ? void 0 : groupConfig.titleFieldFormat) && void 0 !== _m ? _m : groupTitleFieldFormat, internalProps.groupTitleCustomLayout = null !== (_o = null == groupConfig ? void 0 : groupConfig.titleCustomLayout) && void 0 !== _o ? _o : groupTitleCustomLayout, internalProps.enableTreeStickCell = null !== (_p = null == groupConfig ? void 0 : groupConfig.enableTreeStickCell) && void 0 !== _p ? _p : enableTreeStickCell, internalProps._rowHeightsMap = new NumberRangeMap(this), internalProps._rowRangeHeightsMap = new Map(), internalProps._colRangeWidthsMap = new Map(), internalProps._widthResizedColMap = new Set(), internalProps._heightResizedRowMap = new Set(), this.colWidthsMap = new NumberMap(), this.colContentWidthsMap = new NumberMap(), this.colWidthsLimit = {};
|
|
53723
53788
|
const that = this;
|
|
53724
53789
|
if (internalProps.calcWidthContext = {
|
|
53725
53790
|
_: internalProps,
|
|
@@ -53727,7 +53792,7 @@
|
|
|
53727
53792
|
var _a;
|
|
53728
53793
|
return "node" === Env.mode ? that.canvasWidth / (null != pixelRatio ? pixelRatio : 1) : this._.canvas.width / (null !== (_a = this._.context.pixelRatio) && void 0 !== _a ? _a : window.devicePixelRatio);
|
|
53729
53794
|
}
|
|
53730
|
-
}, internalProps.cellTextOverflows = {}, internalProps.focusedTable = !1, internalProps.theme = themes.of(null !== (
|
|
53795
|
+
}, internalProps.cellTextOverflows = {}, internalProps.focusedTable = !1, internalProps.theme = themes.of(null !== (_q = options.theme) && void 0 !== _q ? _q : themes.DEFAULT), internalProps.theme.isPivot = this.isPivotTable(), setIconColor(internalProps.theme.functionalIconsStyle), container ? (clearDOM && (container.innerHTML = ""), container.appendChild(internalProps.element), this._updateSize()) : this._updateSize(), internalProps.bodyHelper = new BodyHelper(this), internalProps.headerHelper = new HeaderHelper(this), internalProps.rowSeriesNumberHelper = new RowSeriesNumberHelper(this), internalProps.autoWrapText = options.autoWrapText, internalProps.enableLineBreak = options.enableLineBreak, internalProps.allowFrozenColCount = null !== (_r = options.allowFrozenColCount) && void 0 !== _r ? _r : 0, internalProps.limitMaxAutoWidth = null !== (_s = options.limitMaxAutoWidth) && void 0 !== _s ? _s : 450, internalProps.limitMinWidth = null != limitMinWidth ? "number" == typeof limitMinWidth ? limitMinWidth : limitMinWidth ? 10 : 0 : 10, internalProps.limitMinHeight = null != limitMinHeight ? "number" == typeof limitMinHeight ? limitMinHeight : limitMinHeight ? 10 : 0 : 10, this.scenegraph = new Scenegraph(this), this.stateManager = new StateManager(this), this.eventManager = new EventManager(this), this.animationManager = new TableAnimationManager(this), options.legends) {
|
|
53731
53796
|
internalProps.legends = [];
|
|
53732
53797
|
const createLegend = Factory.getFunction("createLegend");
|
|
53733
53798
|
if (Array.isArray(options.legends)) {
|
|
@@ -53753,7 +53818,7 @@
|
|
|
53753
53818
|
}
|
|
53754
53819
|
if (internalProps.menu = Object.assign({
|
|
53755
53820
|
renderMode: "html"
|
|
53756
|
-
}, options.menu), Array.isArray(null === (
|
|
53821
|
+
}, options.menu), Array.isArray(null === (_t = options.menu) || void 0 === _t ? void 0 : _t.dropDownMenuHighlight) && this.setDropDownMenuHighlight(null === (_u = options.menu) || void 0 === _u ? void 0 : _u.dropDownMenuHighlight), (Array.isArray(null === (_v = options.menu) || void 0 === _v ? void 0 : _v.defaultHeaderMenuItems) || "function" == typeof (null === (_w = options.menu) || void 0 === _w ? void 0 : _w.defaultHeaderMenuItems)) && (this.globalDropDownMenu = options.menu.defaultHeaderMenuItems), "html" === internalProps.menu.renderMode) {
|
|
53757
53822
|
const MenuHandler = Factory.getComponent("menuHandler");
|
|
53758
53823
|
internalProps.menuHandler = new MenuHandler(this);
|
|
53759
53824
|
}
|
|
@@ -53761,7 +53826,7 @@
|
|
|
53761
53826
|
changedCells: new Map()
|
|
53762
53827
|
}, internalProps.customMergeCell = getCustomMergeCellFunc(options.customMergeCell);
|
|
53763
53828
|
const CustomCellStylePlugin = Factory.getComponent("customCellStylePlugin");
|
|
53764
|
-
CustomCellStylePlugin && (this.customCellStylePlugin = new CustomCellStylePlugin(this, null !== (
|
|
53829
|
+
CustomCellStylePlugin && (this.customCellStylePlugin = new CustomCellStylePlugin(this, null !== (_x = options.customCellStyle) && void 0 !== _x ? _x : [], null !== (_y = options.customCellStyleArrangement) && void 0 !== _y ? _y : [])), this._adjustCanvasSizeByOption();
|
|
53765
53830
|
}
|
|
53766
53831
|
_adjustCanvasSizeByOption() {
|
|
53767
53832
|
"auto" !== this.options.canvasHeight && "auto" !== this.options.canvasWidth || setTimeout(() => {
|
|
@@ -54538,47 +54603,54 @@
|
|
|
54538
54603
|
return super.fireListeners(type, event);
|
|
54539
54604
|
}
|
|
54540
54605
|
updateOption(options) {
|
|
54541
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
54606
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1;
|
|
54542
54607
|
null === (_a = this.editorManager) || void 0 === _a || _a.cancelEdit(), this.options = options, this._hasAutoImageColumn = void 0;
|
|
54543
54608
|
const {
|
|
54544
|
-
|
|
54545
|
-
|
|
54546
|
-
|
|
54547
|
-
|
|
54548
|
-
|
|
54549
|
-
|
|
54550
|
-
|
|
54551
|
-
|
|
54552
|
-
|
|
54553
|
-
|
|
54554
|
-
|
|
54555
|
-
|
|
54556
|
-
|
|
54557
|
-
|
|
54558
|
-
|
|
54559
|
-
|
|
54560
|
-
|
|
54561
|
-
|
|
54562
|
-
|
|
54563
|
-
|
|
54564
|
-
|
|
54565
|
-
|
|
54566
|
-
|
|
54567
|
-
|
|
54568
|
-
|
|
54569
|
-
|
|
54570
|
-
|
|
54571
|
-
|
|
54572
|
-
|
|
54573
|
-
|
|
54574
|
-
|
|
54575
|
-
|
|
54576
|
-
|
|
54577
|
-
|
|
54578
|
-
|
|
54579
|
-
|
|
54580
|
-
|
|
54581
|
-
|
|
54609
|
+
frozenColCount = 0,
|
|
54610
|
+
unfreezeAllOnExceedsMaxWidth: unfreezeAllOnExceedsMaxWidth,
|
|
54611
|
+
defaultRowHeight = 40,
|
|
54612
|
+
defaultHeaderRowHeight: defaultHeaderRowHeight,
|
|
54613
|
+
defaultColWidth = 80,
|
|
54614
|
+
defaultHeaderColWidth = 80,
|
|
54615
|
+
keyboardOptions: keyboardOptions,
|
|
54616
|
+
eventOptions: eventOptions,
|
|
54617
|
+
rowSeriesNumber: rowSeriesNumber,
|
|
54618
|
+
enableCheckboxCascade: enableCheckboxCascade,
|
|
54619
|
+
columnResizeMode: columnResizeMode,
|
|
54620
|
+
rowResizeMode = "none",
|
|
54621
|
+
resize: resize,
|
|
54622
|
+
dragHeaderMode: dragHeaderMode,
|
|
54623
|
+
dragOrder: dragOrder,
|
|
54624
|
+
showFrozenIcon: showFrozenIcon,
|
|
54625
|
+
allowFrozenColCount: allowFrozenColCount,
|
|
54626
|
+
padding: padding,
|
|
54627
|
+
hover: hover,
|
|
54628
|
+
menu: menu,
|
|
54629
|
+
select: click,
|
|
54630
|
+
pixelRatio: pixelRatio,
|
|
54631
|
+
widthMode: widthMode,
|
|
54632
|
+
heightMode: heightMode,
|
|
54633
|
+
autoFillWidth: autoFillWidth,
|
|
54634
|
+
autoFillHeight: autoFillHeight,
|
|
54635
|
+
containerFit: containerFit,
|
|
54636
|
+
widthAdaptiveMode: widthAdaptiveMode,
|
|
54637
|
+
heightAdaptiveMode: heightAdaptiveMode,
|
|
54638
|
+
customRender: customRender,
|
|
54639
|
+
renderChartAsync: renderChartAsync,
|
|
54640
|
+
renderChartAsyncBatchCount: renderChartAsyncBatchCount,
|
|
54641
|
+
canvasWidth: canvasWidth,
|
|
54642
|
+
canvasHeight: canvasHeight,
|
|
54643
|
+
overscrollBehavior: overscrollBehavior,
|
|
54644
|
+
limitMinWidth: limitMinWidth,
|
|
54645
|
+
limitMinHeight: limitMinHeight
|
|
54646
|
+
} = options,
|
|
54647
|
+
{
|
|
54648
|
+
groupConfig: groupConfig,
|
|
54649
|
+
groupBy: groupBy,
|
|
54650
|
+
groupTitleFieldFormat: groupTitleFieldFormat,
|
|
54651
|
+
groupTitleCustomLayout: groupTitleCustomLayout,
|
|
54652
|
+
enableTreeStickCell: enableTreeStickCell
|
|
54653
|
+
} = options;
|
|
54582
54654
|
pixelRatio && pixelRatio !== this.internalProps.pixelRatio && (this.internalProps.pixelRatio = pixelRatio), padding && ("number" == typeof padding ? (this.padding.top = padding, this.padding.left = padding, this.padding.bottom = padding, this.padding.right = padding) : (padding.top && (this.padding.top = padding.top), padding.bottom && (this.padding.bottom = padding.bottom), padding.left && (this.padding.left = padding.left), padding.right && (this.padding.right = padding.right))), this.showFrozenIcon = "boolean" != typeof showFrozenIcon || showFrozenIcon, "number" == typeof allowFrozenColCount && allowFrozenColCount <= 0 && (this.showFrozenIcon = !1), this.widthMode = null != widthMode ? widthMode : "standard", this.heightMode = null != heightMode ? heightMode : "standard", this._widthAdaptiveMode = null != widthAdaptiveMode ? widthAdaptiveMode : "only-body", this._heightAdaptiveMode = null != heightAdaptiveMode ? heightAdaptiveMode : "only-body", this.autoFillWidth = null != autoFillWidth && autoFillWidth, this.autoFillHeight = null != autoFillHeight && autoFillHeight, void 0 !== containerFit && (this._containerFit = "boolean" == typeof containerFit ? {
|
|
54583
54655
|
width: containerFit,
|
|
54584
54656
|
height: containerFit
|
|
@@ -54590,9 +54662,9 @@
|
|
|
54590
54662
|
height: !1
|
|
54591
54663
|
}), this.customRender = customRender, this.canvasWidth = isNumber$4(canvasWidth) ? canvasWidth : void 0, this.canvasHeight = isNumber$4(canvasHeight) ? canvasHeight : void 0;
|
|
54592
54664
|
const internalProps = this.internalProps;
|
|
54593
|
-
if ("node" === Env.mode || options.canvas || updateRootElementPadding(internalProps.element, this.padding), this.columnWidthComputeMode = null !== (_d = options.columnWidthComputeMode) && void 0 !== _d ? _d : "normal", internalProps.frozenColCount = frozenColCount, internalProps.unfreezeAllOnExceedsMaxWidth = null == unfreezeAllOnExceedsMaxWidth || unfreezeAllOnExceedsMaxWidth, internalProps.defaultRowHeight = defaultRowHeight, internalProps.defaultHeaderRowHeight = null != defaultHeaderRowHeight ? defaultHeaderRowHeight : defaultRowHeight, internalProps.defaultColWidth = defaultColWidth, internalProps.defaultHeaderColWidth = null != defaultHeaderColWidth ? defaultHeaderColWidth : defaultColWidth, internalProps.keyboardOptions = keyboardOptions, internalProps.eventOptions = eventOptions, internalProps.rowSeriesNumber = rowSeriesNumber, internalProps.enableCheckboxCascade = enableCheckboxCascade, internalProps.columnResizeMode = null !== (
|
|
54665
|
+
if ("node" === Env.mode || options.canvas || updateRootElementPadding(internalProps.element, this.padding), this.columnWidthComputeMode = null !== (_d = options.columnWidthComputeMode) && void 0 !== _d ? _d : "normal", internalProps.frozenColCount = frozenColCount, internalProps.unfreezeAllOnExceedsMaxWidth = null == unfreezeAllOnExceedsMaxWidth || unfreezeAllOnExceedsMaxWidth, internalProps.defaultRowHeight = defaultRowHeight, internalProps.defaultHeaderRowHeight = null != defaultHeaderRowHeight ? defaultHeaderRowHeight : defaultRowHeight, internalProps.defaultColWidth = defaultColWidth, internalProps.defaultHeaderColWidth = null != defaultHeaderColWidth ? defaultHeaderColWidth : defaultColWidth, internalProps.keyboardOptions = keyboardOptions, internalProps.eventOptions = eventOptions, internalProps.rowSeriesNumber = rowSeriesNumber, internalProps.enableCheckboxCascade = null === (_e = null != enableCheckboxCascade ? enableCheckboxCascade : null == rowSeriesNumber ? void 0 : rowSeriesNumber.enableTreeCheckbox) || void 0 === _e || _e, internalProps.columnResizeMode = null !== (_f = null == resize ? void 0 : resize.columnResizeMode) && void 0 !== _f ? _f : columnResizeMode, internalProps.rowResizeMode = null !== (_g = null == resize ? void 0 : resize.rowResizeMode) && void 0 !== _g ? _g : rowResizeMode, internalProps.dragHeaderMode = null !== (_j = null !== (_h = null == dragOrder ? void 0 : dragOrder.dragHeaderMode) && void 0 !== _h ? _h : dragHeaderMode) && void 0 !== _j ? _j : "none", internalProps.renderChartAsync = renderChartAsync, setBatchRenderChartCount(renderChartAsyncBatchCount), internalProps.overscrollBehavior = null != overscrollBehavior ? overscrollBehavior : "auto", internalProps.cellTextOverflows = {}, internalProps.groupBy = null !== (_k = null == groupConfig ? void 0 : groupConfig.groupBy) && void 0 !== _k ? _k : groupBy, internalProps.titleCheckbox = null == groupConfig ? void 0 : groupConfig.titleCheckbox, internalProps.groupTitleFieldFormat = null !== (_l = null == groupConfig ? void 0 : groupConfig.titleFieldFormat) && void 0 !== _l ? _l : groupTitleFieldFormat, internalProps.groupTitleCustomLayout = null !== (_m = null == groupConfig ? void 0 : groupConfig.titleCustomLayout) && void 0 !== _m ? _m : groupTitleCustomLayout, internalProps.enableTreeStickCell = null !== (_o = null == groupConfig ? void 0 : groupConfig.enableTreeStickCell) && void 0 !== _o ? _o : enableTreeStickCell, internalProps._rowHeightsMap = new NumberRangeMap(this), internalProps._rowRangeHeightsMap = new Map(), internalProps._colRangeWidthsMap = new Map(), internalProps._widthResizedColMap = new Set(), internalProps._heightResizedRowMap = new Set(), this.colWidthsMap = new NumberMap(), this.colContentWidthsMap = new NumberMap(), this.colWidthsLimit = {}, internalProps.stick.changedCells.clear(), internalProps.theme = themes.of(null !== (_p = options.theme) && void 0 !== _p ? _p : themes.DEFAULT), internalProps.theme.isPivot = this.isPivotTable(), setIconColor(internalProps.theme.functionalIconsStyle), this.scenegraph.updateStageBackground(), internalProps.autoWrapText = options.autoWrapText, internalProps.enableLineBreak = options.enableLineBreak, internalProps.allowFrozenColCount = null !== (_q = options.allowFrozenColCount) && void 0 !== _q ? _q : 0, internalProps.limitMaxAutoWidth = null !== (_r = options.limitMaxAutoWidth) && void 0 !== _r ? _r : 450, internalProps.limitMinWidth = null != limitMinWidth ? "number" == typeof limitMinWidth ? limitMinWidth : limitMinWidth ? 10 : 0 : 10, internalProps.limitMinHeight = null != limitMinHeight ? "number" == typeof limitMinHeight ? limitMinHeight : limitMinHeight ? 10 : 0 : 10, null === (_s = internalProps.legends) || void 0 === _s || _s.forEach(legend => {
|
|
54594
54666
|
null == legend || legend.release();
|
|
54595
|
-
}), null === (
|
|
54667
|
+
}), null === (_t = internalProps.title) || void 0 === _t || _t.release(), internalProps.title = null, null === (_u = internalProps.emptyTip) || void 0 === _u || _u.release(), internalProps.emptyTip = null, internalProps.layoutMap.release(), clearChartRenderQueue(), this.scenegraph.clearCells(), this.scenegraph.updateComponent(), this.stateManager.updateOptionSetState(), this._updateSize(), this.eventManager.updateEventBinder(), options.legends) {
|
|
54596
54668
|
internalProps.legends = [];
|
|
54597
54669
|
const createLegend = Factory.getFunction("createLegend");
|
|
54598
54670
|
if (Array.isArray(options.legends)) {
|
|
@@ -54618,11 +54690,11 @@
|
|
|
54618
54690
|
}
|
|
54619
54691
|
if (internalProps.menu = Object.assign({
|
|
54620
54692
|
renderMode: "html"
|
|
54621
|
-
}, options.menu), Array.isArray(null === (
|
|
54693
|
+
}, options.menu), Array.isArray(null === (_v = options.menu) || void 0 === _v ? void 0 : _v.dropDownMenuHighlight) && this.setDropDownMenuHighlight(null === (_w = options.menu) || void 0 === _w ? void 0 : _w.dropDownMenuHighlight), (Array.isArray(null === (_x = options.menu) || void 0 === _x ? void 0 : _x.defaultHeaderMenuItems) || "function" == typeof (null === (_y = options.menu) || void 0 === _y ? void 0 : _y.defaultHeaderMenuItems)) && (this.globalDropDownMenu = options.menu.defaultHeaderMenuItems), "html" === internalProps.menu.renderMode && !internalProps.menuHandler) {
|
|
54622
54694
|
const MenuHandler = Factory.getComponent("menuHandler");
|
|
54623
54695
|
internalProps.menuHandler = new MenuHandler(this);
|
|
54624
54696
|
}
|
|
54625
|
-
this.clearCellStyleCache(), this.clearColWidthCache(), this.clearRowHeightCache(), internalProps.customMergeCell = getCustomMergeCellFunc(options.customMergeCell), null === (
|
|
54697
|
+
this.clearCellStyleCache(), this.clearColWidthCache(), this.clearRowHeightCache(), internalProps.customMergeCell = getCustomMergeCellFunc(options.customMergeCell), null === (_z = this.customCellStylePlugin) || void 0 === _z || _z.updateCustomCell(null !== (_0 = options.customCellStyle) && void 0 !== _0 ? _0 : [], null !== (_1 = options.customCellStyleArrangement) && void 0 !== _1 ? _1 : []), this._adjustCanvasSizeByOption();
|
|
54626
54698
|
}
|
|
54627
54699
|
renderWithRecreateCells() {
|
|
54628
54700
|
this.internalProps.stick.changedCells.clear();
|
|
@@ -55064,7 +55136,7 @@
|
|
|
55064
55136
|
var _a, _b, _c;
|
|
55065
55137
|
let icons;
|
|
55066
55138
|
if (this.isHeader(col, row)) icons = this.internalProps.headerHelper.getIcons(col, row);else if (this.internalProps.layoutMap.isSeriesNumber(col, row)) {
|
|
55067
|
-
if (!this.
|
|
55139
|
+
if (!this.internalProps.groupBy || !(null === (_a = this.getCellRawRecord(col, row)) || void 0 === _a ? void 0 : _a.vtableMerge)) {
|
|
55068
55140
|
(null === (_c = null === (_b = this.internalProps.layoutMap.getSeriesNumberBody(col, row)) || void 0 === _b ? void 0 : _b.define) || void 0 === _c ? void 0 : _c.dragOrder) && (icons = this.internalProps.rowSeriesNumberHelper.getIcons(col, row));
|
|
55069
55141
|
}
|
|
55070
55142
|
const cellValue = this.getCellValue(col, row),
|
|
@@ -56954,10 +57026,9 @@
|
|
|
56954
57026
|
return layout._cellRangeMap.set(`$${col}$${row}`, cellRange), cellRange;
|
|
56955
57027
|
}
|
|
56956
57028
|
function getTreeTitleMerge(col, row, cellRange, layout) {
|
|
56957
|
-
var _a;
|
|
56958
57029
|
if ("tree" !== layout.rowHierarchyType) return;
|
|
56959
57030
|
const cellRecord = layout._table.getCellRawRecord(col, row);
|
|
56960
|
-
|
|
57031
|
+
layout._table.internalProps.titleCheckbox && layout._table.internalProps.rowSeriesNumber ? (null == cellRecord ? void 0 : cellRecord.vtableMerge) && col >= layout.leftRowSeriesNumberColumnCount && (cellRange.start.col = layout.rowHeaderLevelCount + layout.leftRowSeriesNumberColumnCount, cellRange.end.col = layout.colCount - 1, cellRange.start.row = cellRange.end.row = row) : (null == cellRecord ? void 0 : cellRecord.vtableMerge) && (cellRange.start.col = layout.rowHeaderLevelCount, cellRange.end.col = layout.colCount - 1, cellRange.start.row = cellRange.end.row = row);
|
|
56961
57032
|
}
|
|
56962
57033
|
function getCellRangeTranspose(col, row, layout) {
|
|
56963
57034
|
var _a, _b, _c, _d;
|
|
@@ -57027,7 +57098,7 @@
|
|
|
57027
57098
|
}, null !== (_b = this.columnHierarchyType) && void 0 !== _b ? _b : null, "grid-tree" === this.columnHierarchyType ? this.columnExpandLevel : void 0), this._headerObjectsIncludeHided = this._addHeaders(0, columns, []), this._headerObjects = this._headerObjectsIncludeHided.filter(col => !0 !== col.define.hide), this._headerObjectMap = this._headerObjects.reduce((o, e) => (o[e.id] = e, o), {}), this.rowHierarchyType = checkHasTreeDefine(this) ? "tree" : "grid", this._hasAggregation = checkHasAggregation(this), this._hasAggregationOnBottomCount = checkHasAggregationOnBottom(this), this._hasAggregationOnTopCount = checkHasAggregationOnTop(this), this.handleRowSeriesNumber(table.internalProps.rowSeriesNumber);
|
|
57028
57099
|
}
|
|
57029
57100
|
handleRowSeriesNumber(rowSeriesNumber) {
|
|
57030
|
-
var _a, _b;
|
|
57101
|
+
var _a, _b, _c;
|
|
57031
57102
|
rowSeriesNumber && (Array.isArray(rowSeriesNumber) ? this.rowSeriesNumberColumn = rowSeriesNumber.map((seriesNumber, index) => {
|
|
57032
57103
|
var _a, _b;
|
|
57033
57104
|
return {
|
|
@@ -57053,11 +57124,11 @@
|
|
|
57053
57124
|
field: "_vtable_rowSeries_number"
|
|
57054
57125
|
}, rowSeriesNumber),
|
|
57055
57126
|
cellType: null !== (_a = rowSeriesNumber.cellType) && void 0 !== _a ? _a : "text",
|
|
57056
|
-
headerType: "checkbox" === rowSeriesNumber.cellType ? "checkbox" : "text",
|
|
57127
|
+
headerType: null !== (_b = rowSeriesNumber.headerType) && void 0 !== _b ? _b : "checkbox" === rowSeriesNumber.cellType ? "checkbox" : "text",
|
|
57057
57128
|
style: rowSeriesNumber.style,
|
|
57058
57129
|
width: rowSeriesNumber.width,
|
|
57059
57130
|
format: rowSeriesNumber.format,
|
|
57060
|
-
field: null !== (
|
|
57131
|
+
field: null !== (_c = rowSeriesNumber.field) && void 0 !== _c ? _c : "_vtable_rowSeries_number",
|
|
57061
57132
|
icon: rowSeriesNumber.icon,
|
|
57062
57133
|
headerIcon: rowSeriesNumber.headerIcon,
|
|
57063
57134
|
isChildNode: !1
|
|
@@ -58099,9 +58170,9 @@
|
|
|
58099
58170
|
}
|
|
58100
58171
|
function getCellUpdateType(col, row, table, oldCellUpdateType) {
|
|
58101
58172
|
if ("group" === oldCellUpdateType) return oldCellUpdateType;
|
|
58102
|
-
if ("sort" === oldCellUpdateType && !table.
|
|
58173
|
+
if ("sort" === oldCellUpdateType && !table.internalProps.groupBy) return oldCellUpdateType;
|
|
58103
58174
|
let cellUpdateType = "normal";
|
|
58104
|
-
if (table.
|
|
58175
|
+
if (table.internalProps.groupBy) cellUpdateType = "group";else if (!table.isHeader(col, row) && table.dataSource.lastOrderField) {
|
|
58105
58176
|
table.getBodyField(col, row) === table.dataSource.lastOrderField && (cellUpdateType = "sort");
|
|
58106
58177
|
}
|
|
58107
58178
|
return cellUpdateType;
|
|
@@ -58115,7 +58186,7 @@
|
|
|
58115
58186
|
}
|
|
58116
58187
|
function listTableAddRecord(record, recordIndex, table) {
|
|
58117
58188
|
var _a, _b, _c, _d;
|
|
58118
|
-
if (table.
|
|
58189
|
+
if (table.internalProps.groupBy) null === (_b = (_a = table.dataSource).addRecordsForGroup) || void 0 === _b || _b.call(_a, [record], recordIndex), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if ("tree" === table.dataSource.rowHierarchyType) null === (_d = (_c = table.dataSource).addRecordsForTree) || void 0 === _d || _d.call(_c, [record], recordIndex), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if (table.sortState) table.dataSource.addRecordForSorted(record), sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else {
|
|
58119
58190
|
(void 0 === recordIndex || recordIndex > table.dataSource.sourceLength) && (recordIndex = table.dataSource.sourceLength);
|
|
58120
58191
|
const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount;
|
|
58121
58192
|
table.dataSource.addRecord(record, recordIndex);
|
|
@@ -58184,7 +58255,7 @@
|
|
|
58184
58255
|
}
|
|
58185
58256
|
function listTableAddRecords(records, recordIndex, table) {
|
|
58186
58257
|
var _a, _b, _c, _d;
|
|
58187
|
-
if (table.
|
|
58258
|
+
if (table.internalProps.groupBy) null === (_b = (_a = table.dataSource).addRecordsForGroup) || void 0 === _b || _b.call(_a, records, recordIndex), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if ("tree" === table.dataSource.rowHierarchyType) null === (_d = (_c = table.dataSource).addRecordsForTree) || void 0 === _d || _d.call(_c, records, recordIndex), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if (table.sortState) table.dataSource.addRecordsForSorted(records), sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else {
|
|
58188
58259
|
void 0 === recordIndex || recordIndex > table.dataSource.sourceLength ? recordIndex = table.dataSource.sourceLength : recordIndex < 0 && (recordIndex = 0);
|
|
58189
58260
|
const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount;
|
|
58190
58261
|
table.dataSource.addRecords(records, recordIndex);
|
|
@@ -58253,7 +58324,7 @@
|
|
|
58253
58324
|
}
|
|
58254
58325
|
function listTableDeleteRecords(recordIndexs, table) {
|
|
58255
58326
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
58256
|
-
if ((null == recordIndexs ? void 0 : recordIndexs.length) > 0) if (table.
|
|
58327
|
+
if ((null == recordIndexs ? void 0 : recordIndexs.length) > 0) if (table.internalProps.groupBy) null === (_b = (_a = table.dataSource).deleteRecordsForGroup) || void 0 === _b || _b.call(_a, recordIndexs), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if ("tree" === table.dataSource.rowHierarchyType) null === (_d = (_c = table.dataSource).deleteRecordsForTree) || void 0 === _d || _d.call(_c, recordIndexs), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if (table.sortState) table.dataSource.deleteRecordsForSorted(recordIndexs), sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else {
|
|
58257
58328
|
const deletedRecordIndexs = table.dataSource.deleteRecords(recordIndexs);
|
|
58258
58329
|
if (0 === deletedRecordIndexs.length) return;
|
|
58259
58330
|
const oldRowCount = table.transpose ? table.colCount : table.rowCount;
|
|
@@ -58331,7 +58402,7 @@
|
|
|
58331
58402
|
}
|
|
58332
58403
|
function listTableUpdateRecords(records, recordIndexs, table) {
|
|
58333
58404
|
var _a, _b, _c, _d;
|
|
58334
|
-
if ((null == recordIndexs ? void 0 : recordIndexs.length) > 0) if (table.
|
|
58405
|
+
if ((null == recordIndexs ? void 0 : recordIndexs.length) > 0) if (table.internalProps.groupBy) null === (_b = (_a = table.dataSource).updateRecordsForGroup) || void 0 === _b || _b.call(_a, records, recordIndexs), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if ("tree" === table.dataSource.rowHierarchyType) null === (_d = (_c = table.dataSource).updateRecordsForTree) || void 0 === _d || _d.call(_c, records, recordIndexs), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if (table.sortState) table.dataSource.updateRecordsForSorted(records, recordIndexs), sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else {
|
|
58335
58406
|
const updateRecordIndexs = table.dataSource.updateRecords(records, recordIndexs);
|
|
58336
58407
|
if (0 === updateRecordIndexs.length) return;
|
|
58337
58408
|
const recordIndexsMinToMax = updateRecordIndexs.map(index => table.getBodyRowIndexByRecordIndex(index)).sort((a, b) => a - b);
|
|
@@ -58462,7 +58533,7 @@
|
|
|
58462
58533
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
58463
58534
|
super(container, options), this.showHeader = !0, options = this.options;
|
|
58464
58535
|
const internalProps = this.internalProps;
|
|
58465
|
-
if (internalProps.frozenColDragHeaderMode = null !== (_b = null === (_a = options.dragOrder) || void 0 === _a ? void 0 : _a.frozenColDragHeaderMode) && void 0 !== _b ? _b : options.frozenColDragHeaderMode, this.pagination = options.pagination, internalProps.sortState = options.sortState, internalProps.multipleSort = !!options.multipleSort, internalProps.dataConfig =
|
|
58536
|
+
if (internalProps.frozenColDragHeaderMode = null !== (_b = null === (_a = options.dragOrder) || void 0 === _a ? void 0 : _a.frozenColDragHeaderMode) && void 0 !== _b ? _b : options.frozenColDragHeaderMode, this.pagination = options.pagination, internalProps.sortState = options.sortState, internalProps.multipleSort = !!options.multipleSort, internalProps.dataConfig = this.internalProps.groupBy ? getGroupByDataConfig(this.internalProps.groupBy) : {}, internalProps.columns = options.columns ? cloneDeepSpec(options.columns, ["children"]) : options.header ? cloneDeepSpec(options.header, ["children"]) : [], generateAggregationForColumn(this), internalProps.enableTreeNodeMerge = null !== (_d = null !== (_c = options.enableTreeNodeMerge) && void 0 !== _c ? _c : isValid$3(this.internalProps.groupBy)) && void 0 !== _d && _d, this.internalProps.headerHelper.setTableColumnsEditor(), this.showHeader = null === (_e = options.showHeader) || void 0 === _e || _e, this.internalProps.columnWidthConfig = options.columnWidthConfig, this.transpose = null !== (_f = options.transpose) && void 0 !== _f && _f, "node" !== Env.mode && (this.editorManager = new EditManager(this)), this.refreshHeader(), this.internalProps.useOneRowHeightFillAll = !1, options.dataSource ? this.dataSource = options.dataSource : options.records ? this.setRecords(options.records, {
|
|
58466
58537
|
sortState: internalProps.sortState
|
|
58467
58538
|
}) : this.setRecords([]), options.title) {
|
|
58468
58539
|
const Title = Factory.getComponent("title");
|
|
@@ -58472,7 +58543,7 @@
|
|
|
58472
58543
|
const EmptyTip = Factory.getComponent("emptyTip");
|
|
58473
58544
|
this.internalProps.emptyTip = new EmptyTip(this.options.emptyTip, this), null === (_h = this.internalProps.emptyTip) || void 0 === _h || _h.resetVisible();
|
|
58474
58545
|
}
|
|
58475
|
-
if (
|
|
58546
|
+
if (this.internalProps.enableTreeStickCell) {
|
|
58476
58547
|
const ListTreeStickCellPlugin = Factory.getComponent("listTreeStickCellPlugin");
|
|
58477
58548
|
this.listTreeStickCellPlugin = new ListTreeStickCellPlugin(this);
|
|
58478
58549
|
}
|
|
@@ -58552,7 +58623,7 @@
|
|
|
58552
58623
|
return title;
|
|
58553
58624
|
}
|
|
58554
58625
|
let value;
|
|
58555
|
-
if (this.
|
|
58626
|
+
if (this.internalProps.groupBy) {
|
|
58556
58627
|
const record = table.getCellRawRecord(col, row);
|
|
58557
58628
|
if (null == record ? void 0 : record.vtableMerge) return "";
|
|
58558
58629
|
table.internalProps.layoutMap.isAggregation(col, row) || (value = this.dataSource.getGroupSeriesNumber(row - this.columnHeaderLevelCount));
|
|
@@ -58688,7 +58759,7 @@
|
|
|
58688
58759
|
updateOption(options) {
|
|
58689
58760
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
58690
58761
|
const internalProps = this.internalProps;
|
|
58691
|
-
if (super.updateOption(options), internalProps.frozenColDragHeaderMode = null !== (_b = null === (_a = options.dragOrder) || void 0 === _a ? void 0 : _a.frozenColDragHeaderMode) && void 0 !== _b ? _b : options.frozenColDragHeaderMode, this.pagination = options.pagination, internalProps.sortState = options.sortState, internalProps.dataConfig =
|
|
58762
|
+
if (super.updateOption(options), internalProps.frozenColDragHeaderMode = null !== (_b = null === (_a = options.dragOrder) || void 0 === _a ? void 0 : _a.frozenColDragHeaderMode) && void 0 !== _b ? _b : options.frozenColDragHeaderMode, this.pagination = options.pagination, internalProps.sortState = options.sortState, internalProps.dataConfig = this.internalProps.groupBy ? getGroupByDataConfig(this.internalProps.groupBy) : {}, this.showHeader = null === (_c = options.showHeader) || void 0 === _c || _c, internalProps.columns = options.columns ? cloneDeepSpec(options.columns, ["children"]) : options.header ? cloneDeepSpec(options.header, ["children"]) : [], generateAggregationForColumn(this), internalProps.enableTreeNodeMerge = null !== (_e = null !== (_d = options.enableTreeNodeMerge) && void 0 !== _d ? _d : isValid$3(this.internalProps.groupBy)) && void 0 !== _e && _e, this.internalProps.headerHelper.setTableColumnsEditor(), this.transpose = null !== (_f = options.transpose) && void 0 !== _f && _f, this.refreshHeader(), this.internalProps.useOneRowHeightFillAll = !1, this.internalProps.columnWidthConfig = options.columnWidthConfig, internalProps.releaseList) for (let i = internalProps.releaseList.length - 1; i >= 0; i--) {
|
|
58692
58763
|
const releaseObj = internalProps.releaseList[i];
|
|
58693
58764
|
releaseObj instanceof DataSource ? releaseObj.updateColumns(this.internalProps.columns) : (null === (_g = null == releaseObj ? void 0 : releaseObj.release) || void 0 === _g || _g.call(releaseObj), internalProps.releaseList.splice(i, 1));
|
|
58694
58765
|
}
|
|
@@ -58800,7 +58871,7 @@
|
|
|
58800
58871
|
getHierarchyState(col, row) {
|
|
58801
58872
|
var _a;
|
|
58802
58873
|
if (this.isHeader(col, row)) return null === (_a = this._getHeaderLayoutMap(col, row)) || void 0 === _a ? void 0 : _a.hierarchyState;
|
|
58803
|
-
if (!this.
|
|
58874
|
+
if (!this.internalProps.groupBy || isArray$7(this.internalProps.groupBy) && 0 === this.internalProps.groupBy.length) {
|
|
58804
58875
|
if (!this.getBodyColumnDefine(col, row).tree) return HierarchyState.none;
|
|
58805
58876
|
}
|
|
58806
58877
|
const index = this.getRecordShowIndexByCell(col, row);
|
|
@@ -59100,7 +59171,7 @@
|
|
|
59100
59171
|
}
|
|
59101
59172
|
getGroupTitleLevel(col, row) {
|
|
59102
59173
|
var _a;
|
|
59103
|
-
if (!this.
|
|
59174
|
+
if (!this.internalProps.groupBy) return;
|
|
59104
59175
|
const indexArr = this.dataSource.getIndexKey(this.getRecordShowIndexByCell(col, row)),
|
|
59105
59176
|
groupLength = null !== (_a = this.dataSource.getGroupLength()) && void 0 !== _a ? _a : 0;
|
|
59106
59177
|
let indexArrLngth = isArray$7(indexArr) ? indexArr.length - 1 : 0;
|