@visactor/vtable-calendar 1.19.4-alpha.1 → 1.19.4
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 +316 -233
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +5 -5
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 => {
|
|
@@ -16198,7 +16200,7 @@
|
|
|
16198
16200
|
return data || this.currentRenderMap.get(type) || this.defaultRenderMap.get(type);
|
|
16199
16201
|
}
|
|
16200
16202
|
clearScreen(renderService, context, drawContext) {
|
|
16201
|
-
var _a, _b;
|
|
16203
|
+
var _a, _b, _c;
|
|
16202
16204
|
const {
|
|
16203
16205
|
clear: clear,
|
|
16204
16206
|
viewBox: viewBox
|
|
@@ -16206,9 +16208,9 @@
|
|
|
16206
16208
|
width = viewBox.width(),
|
|
16207
16209
|
height = viewBox.height();
|
|
16208
16210
|
if (clear) {
|
|
16209
|
-
context.clearRect(0, 0, width, height);
|
|
16210
|
-
const stage = null === (
|
|
16211
|
-
if (stage && (context.globalAlpha = null !== (
|
|
16211
|
+
context.clearRect(0, 0, width, height), (null === (_a = renderService.drawParams) || void 0 === _a ? void 0 : _a.stage) && renderService.drawParams.stage.hooks.afterClearRect.call(renderService.drawParams);
|
|
16212
|
+
const stage = null === (_b = renderService.drawParams) || void 0 === _b ? void 0 : _b.stage;
|
|
16213
|
+
if (stage && (context.globalAlpha = null !== (_c = stage.attribute.opacity) && void 0 !== _c ? _c : 1), stage && stage.backgroundImg && stage.resources) {
|
|
16212
16214
|
const res = stage.resources.get(clear);
|
|
16213
16215
|
res && "success" === res.state && res.data && context.drawImage(res.data, 0, 0, width, height);
|
|
16214
16216
|
} else context.fillStyle = createColor(context, clear, {
|
|
@@ -16741,13 +16743,19 @@
|
|
|
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);
|
|
16748
|
+
}, this.afterClearRect = drawParams => {
|
|
16749
|
+
this._afterClearRect && this._afterClearRect(drawParams);
|
|
16744
16750
|
}, this.afterRender = stage => {
|
|
16745
16751
|
this.renderCount++, this._afterRender && this._afterRender(stage), this._afterNextRenderCbs && this._afterNextRenderCbs.forEach(cb => cb(stage)), this._afterNextRenderCbs = null, this.tickedBeforeRender = !1;
|
|
16746
16752
|
}, this.afterTickCb = () => {
|
|
16747
16753
|
this.tickedBeforeRender = !0, "rendering" !== this.state && this.renderNextFrame();
|
|
16748
16754
|
}, this.params = params, this.theme = new Theme(), this.hooks = {
|
|
16749
16755
|
beforeRender: new SyncHook(["stage"]),
|
|
16750
|
-
afterRender: new SyncHook(["stage"])
|
|
16756
|
+
afterRender: new SyncHook(["stage"]),
|
|
16757
|
+
afterClearScreen: new SyncHook(["stage"]),
|
|
16758
|
+
afterClearRect: new SyncHook(["stage"])
|
|
16751
16759
|
}, 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
16760
|
width: params.width,
|
|
16753
16761
|
height: params.height,
|
|
@@ -16759,7 +16767,7 @@
|
|
|
16759
16767
|
canvas: params.canvas
|
|
16760
16768
|
}), 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
16769
|
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 = {
|
|
16770
|
+
})), 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.hooks.afterClearRect.tap("constructor", this.afterClearRect), this._beforeRender = params.beforeRender, this._afterRender = params.afterRender, this._afterClearScreen = params.afterClearScreen, this._afterClearRect = params.afterClearRect, this.supportInteractiveLayer = !1 !== params.interactiveLayer, params.optimize || (params.optimize = {
|
|
16763
16771
|
tickRenderMode: "effect"
|
|
16764
16772
|
}), this.optmize(params.optimize), params.background && isString$6(this._background) && this._background.includes("/") && this.setAttributes({
|
|
16765
16773
|
background: this._background
|
|
@@ -17154,7 +17162,7 @@
|
|
|
17154
17162
|
return this._cursor;
|
|
17155
17163
|
}
|
|
17156
17164
|
eventPointTransform(e) {
|
|
17157
|
-
const point = this.global.mapToCanvasPoint(e, this.window
|
|
17165
|
+
const point = this.global.mapToCanvasPoint(e, this.window);
|
|
17158
17166
|
return this.stage.window.pointTransform(point.x, point.y);
|
|
17159
17167
|
}
|
|
17160
17168
|
pauseTriggerEvent() {
|
|
@@ -24462,6 +24470,14 @@
|
|
|
24462
24470
|
state.executor.stop();
|
|
24463
24471
|
}), this.stateList = null;
|
|
24464
24472
|
}
|
|
24473
|
+
reApplyState(state) {
|
|
24474
|
+
var _a;
|
|
24475
|
+
const stateInfo = null === (_a = this.stateList) || void 0 === _a ? void 0 : _a.find(stateInfo => stateInfo.state === state);
|
|
24476
|
+
if (stateInfo) {
|
|
24477
|
+
const stateList = this.stateList.slice();
|
|
24478
|
+
stateInfo.executor.stop(), this.stateList = stateList, stateInfo.executor.execute(stateInfo.animationConfig);
|
|
24479
|
+
}
|
|
24480
|
+
}
|
|
24465
24481
|
}
|
|
24466
24482
|
|
|
24467
24483
|
class GraphicStateExtension {
|
|
@@ -24492,11 +24508,20 @@
|
|
|
24492
24508
|
applyUnhighlightState(animationConfig, callback) {
|
|
24493
24509
|
return this._getAnimationStateManager(this).applyUnhighlightState(animationConfig, callback), this;
|
|
24494
24510
|
}
|
|
24495
|
-
stopAnimationState(state, type) {
|
|
24496
|
-
return this._getAnimationStateManager(this).stopState(state, type), this
|
|
24511
|
+
stopAnimationState(state, type, deep = !1) {
|
|
24512
|
+
return this._getAnimationStateManager(this).stopState(state, type), deep && this.isContainer && this.forEachChildren(child => {
|
|
24513
|
+
child.stopAnimationState(state, type, deep);
|
|
24514
|
+
}), this;
|
|
24497
24515
|
}
|
|
24498
24516
|
clearAnimationStates() {
|
|
24499
|
-
|
|
24517
|
+
const stateManager = this._animationStateManager;
|
|
24518
|
+
return stateManager && stateManager.clearState(), this;
|
|
24519
|
+
}
|
|
24520
|
+
reApplyAnimationState(state, deep = !1) {
|
|
24521
|
+
const stateManager = this._animationStateManager;
|
|
24522
|
+
return stateManager && stateManager.reApplyState(state), deep && this.isContainer && this.forEachChildren(child => {
|
|
24523
|
+
child.reApplyAnimationState(state, deep);
|
|
24524
|
+
}), this;
|
|
24500
24525
|
}
|
|
24501
24526
|
static extend(graphic) {
|
|
24502
24527
|
return new GraphicStateExtension()._getAnimationStateManager(graphic), graphic;
|
|
@@ -24549,6 +24574,21 @@
|
|
|
24549
24574
|
getGraphicAttribute(key, prev = !1) {
|
|
24550
24575
|
return !prev && this.finalAttribute ? this.finalAttribute[key] : this.attribute[key];
|
|
24551
24576
|
}
|
|
24577
|
+
pauseAnimation(deep = !1) {
|
|
24578
|
+
this.animates && this.animates.forEach(animate => animate.pause()), deep && this.isContainer && this.forEachChildren(child => {
|
|
24579
|
+
child.pauseAnimation(deep);
|
|
24580
|
+
});
|
|
24581
|
+
}
|
|
24582
|
+
resumeAnimation(deep = !1) {
|
|
24583
|
+
this.animates && this.animates.forEach(animate => animate.resume()), deep && this.isContainer && this.forEachChildren(child => {
|
|
24584
|
+
child.resumeAnimation(deep);
|
|
24585
|
+
});
|
|
24586
|
+
}
|
|
24587
|
+
stopAnimation(deep = !1) {
|
|
24588
|
+
this.animates && this.animates.forEach(animate => animate.stop()), deep && this.isContainer && this.forEachChildren(child => {
|
|
24589
|
+
child.stopAnimation(deep);
|
|
24590
|
+
});
|
|
24591
|
+
}
|
|
24552
24592
|
}
|
|
24553
24593
|
|
|
24554
24594
|
function registerAnimate() {
|
|
@@ -25110,7 +25150,7 @@
|
|
|
25110
25150
|
super(from, to, duration, easing, params);
|
|
25111
25151
|
}
|
|
25112
25152
|
onBind() {
|
|
25113
|
-
var _a, _b;
|
|
25153
|
+
var _a, _b, _c;
|
|
25114
25154
|
super.onBind();
|
|
25115
25155
|
const {
|
|
25116
25156
|
from: from,
|
|
@@ -25119,7 +25159,7 @@
|
|
|
25119
25159
|
fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
|
|
25120
25160
|
this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to;
|
|
25121
25161
|
const finalAttribute = this.target.getFinalAttribute();
|
|
25122
|
-
finalAttribute && this.target.setAttributes(finalAttribute), this.target.setAttributes(fromAttrs);
|
|
25162
|
+
finalAttribute && this.target.setAttributes(finalAttribute), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && this.target.setAttributes(fromAttrs);
|
|
25123
25163
|
}
|
|
25124
25164
|
onEnd(cb) {
|
|
25125
25165
|
super.onEnd(cb);
|
|
@@ -25217,7 +25257,7 @@
|
|
|
25217
25257
|
super(from, to, duration, easing, params);
|
|
25218
25258
|
}
|
|
25219
25259
|
onBind() {
|
|
25220
|
-
var _a, _b;
|
|
25260
|
+
var _a, _b, _c;
|
|
25221
25261
|
super.onBind();
|
|
25222
25262
|
const {
|
|
25223
25263
|
from: from,
|
|
@@ -25226,7 +25266,7 @@
|
|
|
25226
25266
|
fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
|
|
25227
25267
|
this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to;
|
|
25228
25268
|
const finalAttribute = this.target.getFinalAttribute();
|
|
25229
|
-
finalAttribute && this.target.setAttributes(finalAttribute), this.target.setAttributes(fromAttrs);
|
|
25269
|
+
finalAttribute && this.target.setAttributes(finalAttribute), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && this.target.setAttributes(fromAttrs);
|
|
25230
25270
|
}
|
|
25231
25271
|
onEnd(cb) {
|
|
25232
25272
|
super.onEnd(cb);
|
|
@@ -27077,16 +27117,15 @@
|
|
|
27077
27117
|
changedY = 0;
|
|
27078
27118
|
"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
27119
|
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;
|
|
27120
|
+
finalAttrsX = graphic.getGraphicAttribute("x"),
|
|
27121
|
+
finalAttrsY = graphic.getGraphicAttribute("y"),
|
|
27122
|
+
fromX = excludeChannels.includes("x") ? finalAttrsX : point && isValidNumber$3(point.x) ? point.x : changedX,
|
|
27123
|
+
fromY = excludeChannels.includes("y") ? finalAttrsY : point && isValidNumber$3(point.y) ? point.y : changedY;
|
|
27085
27124
|
switch (direction) {
|
|
27086
27125
|
case "x":
|
|
27087
27126
|
return {
|
|
27088
27127
|
from: {
|
|
27089
|
-
x: fromX
|
|
27128
|
+
x: excludeChannels.includes("x") ? finalAttrsX : fromX
|
|
27090
27129
|
},
|
|
27091
27130
|
to: {
|
|
27092
27131
|
x: finalAttrsX
|
|
@@ -27134,7 +27173,7 @@
|
|
|
27134
27173
|
case "x":
|
|
27135
27174
|
return {
|
|
27136
27175
|
from: {
|
|
27137
|
-
x: graphic.
|
|
27176
|
+
x: graphic.getGraphicAttribute("x")
|
|
27138
27177
|
},
|
|
27139
27178
|
to: {
|
|
27140
27179
|
x: fromX
|
|
@@ -27143,7 +27182,7 @@
|
|
|
27143
27182
|
case "y":
|
|
27144
27183
|
return {
|
|
27145
27184
|
from: {
|
|
27146
|
-
y: graphic.
|
|
27185
|
+
y: graphic.getGraphicAttribute("y")
|
|
27147
27186
|
},
|
|
27148
27187
|
to: {
|
|
27149
27188
|
y: fromY
|
|
@@ -27152,8 +27191,8 @@
|
|
|
27152
27191
|
default:
|
|
27153
27192
|
return {
|
|
27154
27193
|
from: {
|
|
27155
|
-
x: graphic.
|
|
27156
|
-
y: graphic.
|
|
27194
|
+
x: graphic.getGraphicAttribute("x"),
|
|
27195
|
+
y: graphic.getGraphicAttribute("y")
|
|
27157
27196
|
},
|
|
27158
27197
|
to: {
|
|
27159
27198
|
x: fromX,
|
|
@@ -27371,9 +27410,8 @@
|
|
|
27371
27410
|
w = Math.min(Math.min(currentX + maxLength, maxLength), streamLength - currentX),
|
|
27372
27411
|
width = w + x > parentWidth ? Math.max(parentWidth - x, 0) : w;
|
|
27373
27412
|
this.rect.setAttributes({
|
|
27374
|
-
x: x,
|
|
27375
|
-
width: width
|
|
27376
|
-
dx: Math.min(parentAttr.x1 - parentAttr.x, 0)
|
|
27413
|
+
x: x + Math.min(parentAttr.x1 - parentAttr.x, 0),
|
|
27414
|
+
width: width
|
|
27377
27415
|
}, !1, {
|
|
27378
27416
|
type: AttributeUpdateType.ANIMATE_PLAY,
|
|
27379
27417
|
animationState: {
|
|
@@ -27390,9 +27428,8 @@
|
|
|
27390
27428
|
const h = Math.min(parentHeight - currentY, maxLength);
|
|
27391
27429
|
let height;
|
|
27392
27430
|
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)
|
|
27431
|
+
y: y + Math.min(parentAttr.y1 - parentAttr.y, 0),
|
|
27432
|
+
height: height
|
|
27396
27433
|
}, !1, {
|
|
27397
27434
|
type: AttributeUpdateType.ANIMATE_PLAY,
|
|
27398
27435
|
animationState: {
|
|
@@ -37297,7 +37334,7 @@
|
|
|
37297
37334
|
cacheBeforeChangedRecord(dataIndex, table) {
|
|
37298
37335
|
var _a;
|
|
37299
37336
|
const originRecord = this.getOriginalRecord(dataIndex);
|
|
37300
|
-
table.
|
|
37337
|
+
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
37338
|
}
|
|
37302
37339
|
getGroupSeriesNumber(showIndex) {
|
|
37303
37340
|
const recordIndex = this.dataSource.currentIndexedData[showIndex],
|
|
@@ -37750,7 +37787,7 @@
|
|
|
37750
37787
|
}
|
|
37751
37788
|
function getHierarchyExpandLevel(table) {
|
|
37752
37789
|
var _a;
|
|
37753
|
-
return table.options.hierarchyExpandLevel ? table.options.hierarchyExpandLevel : table.
|
|
37790
|
+
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
37791
|
}
|
|
37755
37792
|
function _setDataSource(table, dataSource) {
|
|
37756
37793
|
_dealWithUpdateDataSource(table, () => {
|
|
@@ -39034,7 +39071,7 @@
|
|
|
39034
39071
|
if (layoutMap.isHeader(col, row)) {
|
|
39035
39072
|
const hd = layoutMap.getHeader(col, row);
|
|
39036
39073
|
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.
|
|
39074
|
+
} else if (table.internalProps.groupBy || (null === (_c = table.getBodyColumnDefine(col, row)) || void 0 === _c ? void 0 : _c.tree)) {
|
|
39038
39075
|
const indexArr = table.dataSource.getIndexKey(table.getRecordShowIndexByCell(col, row)),
|
|
39039
39076
|
groupLength = null !== (_d = table.dataSource.getGroupLength()) && void 0 !== _d ? _d : 0;
|
|
39040
39077
|
let indexArrLngth = isArray$7(indexArr) ? indexArr.length - 1 : 0;
|
|
@@ -39733,7 +39770,7 @@
|
|
|
39733
39770
|
vtableMergeName: vtableMergeName,
|
|
39734
39771
|
vtableMerge: vtableMerge
|
|
39735
39772
|
} = null != rawRecord ? rawRecord : {};
|
|
39736
|
-
isVtableMerge = vtableMerge, vtableMerge && (mayHaveIcon = !0, table.
|
|
39773
|
+
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
39774
|
}
|
|
39738
39775
|
const cellStyle = customStyle || table._getCellStyle(range ? range.start.col : col, range ? range.start.row : row),
|
|
39739
39776
|
autoWrapText = null !== (_a = cellStyle.autoWrapText) && void 0 !== _a ? _a : table.internalProps.autoWrapText,
|
|
@@ -39762,9 +39799,12 @@
|
|
|
39762
39799
|
});
|
|
39763
39800
|
const textMark = oldCellGroup.getChildByName("text");
|
|
39764
39801
|
if (forceFastUpdate && textMark) {
|
|
39765
|
-
const
|
|
39766
|
-
|
|
39767
|
-
|
|
39802
|
+
const textAlign = cellTheme.text.textAlign,
|
|
39803
|
+
hierarchyOffset = getHierarchyOffset(col, row, table),
|
|
39804
|
+
attribute = {
|
|
39805
|
+
textBaseline: "top",
|
|
39806
|
+
dx: "left" === textAlign ? hierarchyOffset : 0
|
|
39807
|
+
};
|
|
39768
39808
|
textMark.setAttributes(cellTheme.text ? Object.assign({}, cellTheme.text, attribute) : attribute);
|
|
39769
39809
|
} else if (textMark) {
|
|
39770
39810
|
const text = table.getCellValue(col, row),
|
|
@@ -40668,7 +40708,7 @@
|
|
|
40668
40708
|
{
|
|
40669
40709
|
vtableMerge: vtableMerge
|
|
40670
40710
|
} = scene.table.getCellRawRecord(col, row) || {};
|
|
40671
|
-
if (vtableMerge && scene.table.
|
|
40711
|
+
if (vtableMerge && scene.table.internalProps.groupTitleCustomLayout) customLayout = scene.table.internalProps.groupTitleCustomLayout;else if ("body" !== cellLocation) {
|
|
40672
40712
|
const define = scene.table.getHeaderDefine(col, row);
|
|
40673
40713
|
customRender = null == define ? void 0 : define.headerCustomRender, customLayout = null == define ? void 0 : define.headerCustomLayout;
|
|
40674
40714
|
} else {
|
|
@@ -40877,7 +40917,7 @@
|
|
|
40877
40917
|
{
|
|
40878
40918
|
vtableMerge: vtableMerge
|
|
40879
40919
|
} = scene.table.getCellRawRecord(col, row) || {};
|
|
40880
|
-
if (vtableMerge && scene.table.
|
|
40920
|
+
if (vtableMerge && scene.table.internalProps.groupTitleCustomLayout) customLayout = scene.table.internalProps.groupTitleCustomLayout;else if ("body" !== cellType) {
|
|
40881
40921
|
const define = scene.table.getHeaderDefine(col, row);
|
|
40882
40922
|
customRender = null == define ? void 0 : define.headerCustomRender, customLayout = null == define ? void 0 : define.headerCustomLayout;
|
|
40883
40923
|
} else {
|
|
@@ -42099,6 +42139,51 @@
|
|
|
42099
42139
|
group.setAttribute("cornerRadius", cornerRadius), group.border && group.border.setAttribute("cornerRadius", cornerRadius);
|
|
42100
42140
|
}
|
|
42101
42141
|
|
|
42142
|
+
function getCellHoverColor(cellGroup, table) {
|
|
42143
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
42144
|
+
let colorKey, hoverStyle;
|
|
42145
|
+
if ("cell" === cellGroup.role && isValid$3(cellGroup.mergeStartCol) && isValid$3(cellGroup.mergeStartRow) && isValid$3(cellGroup.mergeEndCol) && isValid$3(cellGroup.mergeEndRow)) {
|
|
42146
|
+
const {
|
|
42147
|
+
colStart: colStart,
|
|
42148
|
+
colEnd: colEnd,
|
|
42149
|
+
rowStart: rowStart,
|
|
42150
|
+
rowEnd: rowEnd
|
|
42151
|
+
} = getCellMergeRange(cellGroup, table.scenegraph);
|
|
42152
|
+
for (let col = colStart; col <= colEnd; col++) for (let row = rowStart; row <= rowEnd; row++) {
|
|
42153
|
+
const key = isCellHover(table.stateManager, col, row, cellGroup);
|
|
42154
|
+
!key || colorKey && "cellBgColor" !== key || (colorKey = key);
|
|
42155
|
+
}
|
|
42156
|
+
} else "cell" === cellGroup.role && (colorKey = isCellHover(table.stateManager, cellGroup.col, cellGroup.row, cellGroup));
|
|
42157
|
+
if (!colorKey) return;
|
|
42158
|
+
const layout = table.internalProps.layoutMap;
|
|
42159
|
+
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);
|
|
42160
|
+
return getProp(colorKey, hoverStyle, cellGroup.col, cellGroup.row, table);
|
|
42161
|
+
}
|
|
42162
|
+
function isCellHover(state, col, row, cellGroup) {
|
|
42163
|
+
var _a;
|
|
42164
|
+
const {
|
|
42165
|
+
highlightScope: highlightScope,
|
|
42166
|
+
disableHeader: disableHeader,
|
|
42167
|
+
cellPos: cellPos
|
|
42168
|
+
} = state.hover,
|
|
42169
|
+
table = state.table,
|
|
42170
|
+
isHeader = table.isHeader(col, row);
|
|
42171
|
+
if (isHeader && disableHeader) return;
|
|
42172
|
+
let hoverMode;
|
|
42173
|
+
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) {
|
|
42174
|
+
let cellDisable;
|
|
42175
|
+
if (isHeader) {
|
|
42176
|
+
const define = table.getHeaderDefine(col, row);
|
|
42177
|
+
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);
|
|
42178
|
+
} else {
|
|
42179
|
+
const define = table.getBodyColumnDefine(col, row);
|
|
42180
|
+
cellDisable = null == define ? void 0 : define.disableHover;
|
|
42181
|
+
}
|
|
42182
|
+
cellDisable && (hoverMode = void 0);
|
|
42183
|
+
}
|
|
42184
|
+
return hoverMode;
|
|
42185
|
+
}
|
|
42186
|
+
|
|
42102
42187
|
const CHART_NUMBER_TYPE = genNumberType();
|
|
42103
42188
|
class Chart extends Rect$1 {
|
|
42104
42189
|
constructor(isShareChartSpec, params) {
|
|
@@ -42129,6 +42214,7 @@
|
|
|
42129
42214
|
col: col,
|
|
42130
42215
|
row: row
|
|
42131
42216
|
} = this.parent,
|
|
42217
|
+
hoverColor = getCellHoverColor(this.parent, table),
|
|
42132
42218
|
{
|
|
42133
42219
|
x1: x1,
|
|
42134
42220
|
y1: y1,
|
|
@@ -42164,6 +42250,16 @@
|
|
|
42164
42250
|
},
|
|
42165
42251
|
afterRender(stage) {
|
|
42166
42252
|
stage.window.getContext().inuse = !1, stage.needRender = !1, chartStage.resumeRender();
|
|
42253
|
+
},
|
|
42254
|
+
renderHooks: {
|
|
42255
|
+
afterClearRect(drawParams) {
|
|
42256
|
+
const {
|
|
42257
|
+
context: context,
|
|
42258
|
+
layer: layer,
|
|
42259
|
+
viewBox: viewBox
|
|
42260
|
+
} = drawParams;
|
|
42261
|
+
layer.main && drawParams.clear && (context.beginPath(), context.fillStyle = hoverColor, context.rect(viewBox.x1, viewBox.y1, viewBox.x2 - viewBox.x1, viewBox.y2 - viewBox.y1), context.fill());
|
|
42262
|
+
}
|
|
42167
42263
|
}
|
|
42168
42264
|
}));
|
|
42169
42265
|
const chartStage = this.activeChartInstance.getStage(),
|
|
@@ -42542,51 +42638,6 @@
|
|
|
42542
42638
|
};
|
|
42543
42639
|
AfterGifImageRenderContribution = __decorate$5([injectable()], AfterGifImageRenderContribution);
|
|
42544
42640
|
|
|
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
42641
|
function getCellSelectColor(cellGroup, table) {
|
|
42591
42642
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
42592
42643
|
let colorKey, selectStyle;
|
|
@@ -43628,7 +43679,7 @@
|
|
|
43628
43679
|
vtableMergeName: vtableMergeName,
|
|
43629
43680
|
vtableMerge: vtableMerge
|
|
43630
43681
|
} = null != rawRecord ? rawRecord : {};
|
|
43631
|
-
isVtableMerge = vtableMerge, vtableMerge && (mayHaveIcon = !0, table.
|
|
43682
|
+
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
43683
|
}
|
|
43633
43684
|
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
43685
|
if (isPromise(value)) {
|
|
@@ -45225,13 +45276,20 @@
|
|
|
45225
45276
|
const pos = _getUpdateRowIndex(addRows[0] - 1, addRows[addRows.length - 1] + 1, scene);
|
|
45226
45277
|
rowUpdatePos = isValid$3(rowUpdatePos) ? isValid$3(pos) ? Math.min(rowUpdatePos, pos) : rowUpdatePos : pos;
|
|
45227
45278
|
}
|
|
45279
|
+
const batchMergePos = new Set();
|
|
45228
45280
|
for (let col = 0; col < table.colCount; col++) updateRows.forEach(row => {
|
|
45229
45281
|
if (row < table.frozenRowCount) {
|
|
45230
45282
|
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++)
|
|
45283
|
+
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
|
+
const key = `${col}-${row}`;
|
|
45285
|
+
batchMergePos.has(key) || (updateCell$1(col, row, scene.table, !1), batchMergePos.add(key));
|
|
45286
|
+
} else updateCell$1(col, row, scene.table, !1);
|
|
45232
45287
|
} 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
45288
|
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++)
|
|
45289
|
+
if (mergeInfo) for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {
|
|
45290
|
+
const key = `${col}-${row}`;
|
|
45291
|
+
batchMergePos.has(key) || (updateCell$1(col, row, scene.table, !1), batchMergePos.add(key));
|
|
45292
|
+
} else updateCell$1(col, row, scene.table, !1);
|
|
45235
45293
|
}
|
|
45236
45294
|
});
|
|
45237
45295
|
if (updateRows.length) {
|
|
@@ -45971,7 +46029,7 @@
|
|
|
45971
46029
|
clip: !0,
|
|
45972
46030
|
pickable: !1
|
|
45973
46031
|
}), scene.tableGroup.role = "table";
|
|
45974
|
-
const colHeaderGroup = createContainerGroup(0, 0, !scene.table.
|
|
46032
|
+
const colHeaderGroup = createContainerGroup(0, 0, !scene.table.internalProps.enableTreeStickCell);
|
|
45975
46033
|
colHeaderGroup.role = "col-header", scene.colHeaderGroup = colHeaderGroup;
|
|
45976
46034
|
const cornerHeaderGroup = createContainerGroup(0, 0, !scene.table.options.enableTreeStickCell);
|
|
45977
46035
|
cornerHeaderGroup.role = "corner-header", scene.cornerHeaderGroup = cornerHeaderGroup;
|
|
@@ -46208,15 +46266,20 @@
|
|
|
46208
46266
|
});
|
|
46209
46267
|
const colWidthsMap = table.colWidthsMap;
|
|
46210
46268
|
let updateAfter;
|
|
46211
|
-
|
|
46269
|
+
removeCols.forEach(col => {
|
|
46212
46270
|
colWidthsMap.delAndReorder(col);
|
|
46213
46271
|
}), removeCols.length && resetColNumber(scene), scene.table._clearColRangeWidthsMap(), addCols.forEach(col => {
|
|
46214
46272
|
const needUpdateAfter = addCol(col, scene);
|
|
46215
46273
|
resetColNumber(scene), updateAfter = null != updateAfter ? updateAfter : needUpdateAfter, colWidthsMap.addAndReorder(col);
|
|
46216
|
-
}), resetColNumberAndX(scene)
|
|
46274
|
+
}), resetColNumberAndX(scene);
|
|
46275
|
+
const batchMergePos = new Set();
|
|
46276
|
+
if (updateCols.forEach(col => {
|
|
46217
46277
|
for (let row = 0; row < table.rowCount; row++) {
|
|
46218
46278
|
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++)
|
|
46279
|
+
if (mergeInfo) for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) {
|
|
46280
|
+
const key = `${col}-${row}`;
|
|
46281
|
+
batchMergePos.has(key) || (updateCell$1(col, row, scene.table, !1), batchMergePos.add(key));
|
|
46282
|
+
} else updateCell$1(col, row, scene.table, !1);
|
|
46220
46283
|
}
|
|
46221
46284
|
}), isNumber$4(updateAfter)) {
|
|
46222
46285
|
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 +47311,14 @@
|
|
|
47248
47311
|
scenegraph.hideHoverIcon(prevHoverCellCol, prevHoverCellRow), scenegraph.showHoverIcon(col, row), cellPosContainHeader.col = col, cellPosContainHeader.row = row;
|
|
47249
47312
|
}
|
|
47250
47313
|
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));
|
|
47314
|
+
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
47315
|
let updateScenegraph = !1;
|
|
47253
47316
|
const {
|
|
47254
47317
|
ranges: ranges,
|
|
47255
47318
|
highlightScope: selectMode
|
|
47256
47319
|
} = state.select;
|
|
47257
47320
|
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),
|
|
47321
|
+
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
47322
|
}
|
|
47260
47323
|
function clearHover(scenegraph, col, row, selectRanges, singleStyle, mode, selectMode) {
|
|
47261
47324
|
let updateScenegraph = !1;
|
|
@@ -48146,9 +48209,9 @@
|
|
|
48146
48209
|
}
|
|
48147
48210
|
function setHeaderCheckedState(field, checked, state) {
|
|
48148
48211
|
var _a;
|
|
48149
|
-
state.headerCheckedState[field] = checked, null === (_a = state.checkedState) || void 0 === _a || _a.forEach(recordCheckState => {
|
|
48212
|
+
state.headerCheckedState[field] = checked, state.table.internalProps.enableCheckboxCascade && (null === (_a = state.checkedState) || void 0 === _a || _a.forEach(recordCheckState => {
|
|
48150
48213
|
recordCheckState[field] = checked;
|
|
48151
|
-
});
|
|
48214
|
+
}));
|
|
48152
48215
|
}
|
|
48153
48216
|
function syncCheckedState(col, row, field, checked, state) {
|
|
48154
48217
|
var _a, _b;
|
|
@@ -48164,7 +48227,7 @@
|
|
|
48164
48227
|
if (recordIndex >= 0) {
|
|
48165
48228
|
const dataIndex = state.table.dataSource.getIndexKey(recordIndex).toString();
|
|
48166
48229
|
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(",")) {
|
|
48230
|
+
if (state.checkedState.get(dataIndex)) state.checkedState.get(dataIndex)[field] = checked;else if (state.table.internalProps.enableCheckboxCascade && dataIndex.includes(",")) {
|
|
48168
48231
|
const parentDataIndex = dataIndex.split(",").slice(0, -1).join(",");
|
|
48169
48232
|
state.checkedState.has(parentDataIndex) && !0 === state.checkedState.get(parentDataIndex)[field] ? state.checkedState.set(dataIndex, {
|
|
48170
48233
|
[field]: !0
|
|
@@ -48196,12 +48259,12 @@
|
|
|
48196
48259
|
allUnChecked = !0,
|
|
48197
48260
|
hasChecked = !1;
|
|
48198
48261
|
return state.checkedState.forEach((check_state, index) => {
|
|
48199
|
-
var _a
|
|
48262
|
+
var _a;
|
|
48200
48263
|
index = index.includes(",") ? index.split(",").map(item => Number(item)) : Number(index);
|
|
48201
48264
|
const tableIndex = state.table.getTableIndexByRecordIndex(index),
|
|
48202
48265
|
mergeCell = state.table.transpose ? state.table.getCustomMerge(tableIndex, row) : state.table.getCustomMerge(col, tableIndex),
|
|
48203
48266
|
data = null === (_a = state.table.dataSource) || void 0 === _a ? void 0 : _a.get(index);
|
|
48204
|
-
mergeCell || !
|
|
48267
|
+
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
48268
|
}), allChecked ? (state.headerCheckedState[field] = !0, allChecked) : allUnChecked ? (state.headerCheckedState[field] = !1, !1) : !!hasChecked && (state.headerCheckedState[field] = "indeterminate", "indeterminate");
|
|
48206
48269
|
}
|
|
48207
48270
|
function initLeftRecordsCheckState(records, state) {
|
|
@@ -49783,10 +49846,10 @@
|
|
|
49783
49846
|
checked: e.detail.checked
|
|
49784
49847
|
});
|
|
49785
49848
|
if (table.isHeader(col, row)) {
|
|
49786
|
-
table.stateManager.setHeaderCheckedState(cellInfo.field, e.detail.checked)
|
|
49787
|
-
|
|
49788
|
-
|
|
49789
|
-
|
|
49849
|
+
if (table.stateManager.setHeaderCheckedState(cellInfo.field, e.detail.checked), table.internalProps.enableCheckboxCascade) {
|
|
49850
|
+
"checkbox" === table.getCellType(col, row) && table.scenegraph.updateCheckboxCellState(col, row, e.detail.checked);
|
|
49851
|
+
}
|
|
49852
|
+
} else if (table.stateManager.setCheckedState(col, row, cellInfo.field, e.detail.checked), table.internalProps.enableCheckboxCascade) {
|
|
49790
49853
|
if ("checkbox" === table.getCellType(col, row)) {
|
|
49791
49854
|
const oldHeaderCheckedState = table.stateManager.headerCheckedState[cellInfo.field],
|
|
49792
49855
|
newHeaderCheckedState = table.stateManager.updateHeaderCheckedState(cellInfo.field, col, row);
|
|
@@ -50559,20 +50622,20 @@
|
|
|
50559
50622
|
|
|
50560
50623
|
function bindGroupTitleCheckboxChange(table) {
|
|
50561
50624
|
table.on("checkbox_state_change", args => {
|
|
50562
|
-
var _a
|
|
50625
|
+
var _a;
|
|
50563
50626
|
const {
|
|
50564
50627
|
col: col,
|
|
50565
50628
|
row: row,
|
|
50566
50629
|
checked: checked,
|
|
50567
50630
|
field: field
|
|
50568
50631
|
} = args;
|
|
50569
|
-
if (!table.internalProps.layoutMap.isSeriesNumber(col, row) || !0 !==
|
|
50632
|
+
if (!table.internalProps.layoutMap.isSeriesNumber(col, row) || !0 !== table.internalProps.enableCheckboxCascade) return;
|
|
50570
50633
|
if (table.isHeader(col, row)) return;
|
|
50571
50634
|
const record = table.getCellOriginRecord(col, row),
|
|
50572
50635
|
indexedData = table.dataSource.currentPagerIndexedData,
|
|
50573
50636
|
titleShowIndex = table.getRecordShowIndexByCell(col, row);
|
|
50574
50637
|
let titleIndex = indexedData[titleShowIndex];
|
|
50575
|
-
if (isNumber$4(titleIndex) && (titleIndex = [titleIndex]), record.vtableMerge || (null === (
|
|
50638
|
+
if (isNumber$4(titleIndex) && (titleIndex = [titleIndex]), record.vtableMerge || (null === (_a = record.children) || void 0 === _a ? void 0 : _a.length)) {
|
|
50576
50639
|
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
50640
|
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
50641
|
const oldHeaderCheckedState = table.stateManager.headerCheckedState._vtable_rowSeries_number,
|
|
@@ -50583,7 +50646,7 @@
|
|
|
50583
50646
|
});
|
|
50584
50647
|
}
|
|
50585
50648
|
function bindGroupCheckboxTreeChange(table) {
|
|
50586
|
-
table.on("checkbox_state_change", args => {
|
|
50649
|
+
!0 === table.internalProps.enableCheckboxCascade && table.on("checkbox_state_change", args => {
|
|
50587
50650
|
var _a;
|
|
50588
50651
|
const {
|
|
50589
50652
|
col: col,
|
|
@@ -50692,7 +50755,7 @@
|
|
|
50692
50755
|
});
|
|
50693
50756
|
}
|
|
50694
50757
|
function bindHeaderCheckboxChange(table) {
|
|
50695
|
-
table.on("checkbox_state_change", args => {
|
|
50758
|
+
!0 === table.internalProps.enableCheckboxCascade && table.on("checkbox_state_change", args => {
|
|
50696
50759
|
const {
|
|
50697
50760
|
col: col,
|
|
50698
50761
|
row: row,
|
|
@@ -50754,9 +50817,11 @@
|
|
|
50754
50817
|
});
|
|
50755
50818
|
}
|
|
50756
50819
|
|
|
50757
|
-
function
|
|
50820
|
+
function bindDropdownMenuEvent(table) {
|
|
50758
50821
|
table.on(TABLE_EVENT_TYPE.DROPDOWN_MENU_CLICK, () => {
|
|
50759
50822
|
table.stateManager.hideMenu();
|
|
50823
|
+
}), table.on(TABLE_EVENT_TYPE.SCROLL, () => {
|
|
50824
|
+
table.stateManager.hideMenu();
|
|
50760
50825
|
});
|
|
50761
50826
|
}
|
|
50762
50827
|
|
|
@@ -50829,7 +50894,7 @@
|
|
|
50829
50894
|
}, 0);
|
|
50830
50895
|
}
|
|
50831
50896
|
bindSelfEvent() {
|
|
50832
|
-
this.table.isReleased || (bindIconClickEvent(this.table),
|
|
50897
|
+
this.table.isReleased || (bindIconClickEvent(this.table), bindDropdownMenuEvent(this.table), this.updateEventBinder(), bindMediaClick(this.table), bindDBClickAutoColumnWidthEvent(this.table), this.table.isPivotTable() && checkHaveDrill(this.table) && bindDrillEvent(this.table), bindSparklineHoverEvent(this.table), bindAxisClickEvent(this.table), bindAxisHoverEvent(this.table), bindGroupTitleCheckboxChange(this.table), bindGroupCheckboxTreeChange(this.table), bindHeaderCheckboxChange(this.table), bindButtonClickEvent(this.table), rightButtonClickEvent(this.table));
|
|
50833
50898
|
}
|
|
50834
50899
|
dealTableHover(eventArgsSet) {
|
|
50835
50900
|
if (!eventArgsSet) return void this.table.stateManager.updateHoverPos(-1, -1);
|
|
@@ -50892,7 +50957,7 @@
|
|
|
50892
50957
|
const {
|
|
50893
50958
|
eventArgs: eventArgs
|
|
50894
50959
|
} = eventArgsSet;
|
|
50895
|
-
if (this.table.
|
|
50960
|
+
if (this.table.internalProps.enableTreeStickCell && !eventArgs) return !1;
|
|
50896
50961
|
const resizeCol = this.table.scenegraph.getResizeColAt(eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y, null == eventArgs ? void 0 : eventArgs.targetCell);
|
|
50897
50962
|
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
50963
|
}
|
|
@@ -52508,7 +52573,7 @@
|
|
|
52508
52573
|
return count;
|
|
52509
52574
|
}
|
|
52510
52575
|
function checkHasTreeDefine(layoutMap) {
|
|
52511
|
-
if (layoutMap._table.
|
|
52576
|
+
if (layoutMap._table.internalProps.groupBy) return !0;
|
|
52512
52577
|
const {
|
|
52513
52578
|
columns: columns
|
|
52514
52579
|
} = layoutMap._table.options;
|
|
@@ -53651,58 +53716,65 @@
|
|
|
53651
53716
|
return TABLE_EVENT_TYPE;
|
|
53652
53717
|
}
|
|
53653
53718
|
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
|
|
53719
|
+
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;
|
|
53720
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.19.4", 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
53721
|
this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
|
|
53657
53722
|
options: options,
|
|
53658
53723
|
container: container
|
|
53659
53724
|
}), 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
53725
|
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
|
-
|
|
53726
|
+
frozenColCount = 0,
|
|
53727
|
+
unfreezeAllOnExceedsMaxWidth: unfreezeAllOnExceedsMaxWidth,
|
|
53728
|
+
frozenRowCount: frozenRowCount,
|
|
53729
|
+
defaultRowHeight = 40,
|
|
53730
|
+
defaultHeaderRowHeight: defaultHeaderRowHeight,
|
|
53731
|
+
defaultColWidth = 80,
|
|
53732
|
+
defaultHeaderColWidth: defaultHeaderColWidth,
|
|
53733
|
+
widthMode = "standard",
|
|
53734
|
+
heightMode = "standard",
|
|
53735
|
+
autoFillWidth = !1,
|
|
53736
|
+
autoFillHeight = !1,
|
|
53737
|
+
containerFit = {
|
|
53738
|
+
width: !1,
|
|
53739
|
+
height: !1
|
|
53740
|
+
},
|
|
53741
|
+
widthAdaptiveMode = "only-body",
|
|
53742
|
+
heightAdaptiveMode = "only-body",
|
|
53743
|
+
keyboardOptions: keyboardOptions,
|
|
53744
|
+
eventOptions: eventOptions,
|
|
53745
|
+
rowSeriesNumber: rowSeriesNumber,
|
|
53746
|
+
enableCheckboxCascade: enableCheckboxCascade,
|
|
53747
|
+
columnResizeMode: columnResizeMode,
|
|
53748
|
+
rowResizeMode = "none",
|
|
53749
|
+
resize: resize,
|
|
53750
|
+
dragHeaderMode: dragHeaderMode,
|
|
53751
|
+
dragOrder: dragOrder,
|
|
53752
|
+
showFrozenIcon: showFrozenIcon,
|
|
53753
|
+
allowFrozenColCount: allowFrozenColCount,
|
|
53754
|
+
padding: padding,
|
|
53755
|
+
hover: hover,
|
|
53756
|
+
menu: menu,
|
|
53757
|
+
select: click,
|
|
53758
|
+
customRender: customRender,
|
|
53759
|
+
pixelRatio = defaultPixelRatio,
|
|
53760
|
+
renderChartAsync: renderChartAsync,
|
|
53761
|
+
renderChartAsyncBatchCount: renderChartAsyncBatchCount,
|
|
53762
|
+
mode: mode,
|
|
53763
|
+
modeParams: modeParams,
|
|
53764
|
+
canvasWidth: canvasWidth,
|
|
53765
|
+
canvasHeight: canvasHeight,
|
|
53766
|
+
overscrollBehavior: overscrollBehavior,
|
|
53767
|
+
limitMinWidth: limitMinWidth,
|
|
53768
|
+
limitMinHeight: limitMinHeight,
|
|
53769
|
+
clearDOM = !0
|
|
53770
|
+
} = options,
|
|
53771
|
+
{
|
|
53772
|
+
groupConfig: groupConfig,
|
|
53773
|
+
groupBy: groupBy,
|
|
53774
|
+
groupTitleFieldFormat: groupTitleFieldFormat,
|
|
53775
|
+
groupTitleCustomLayout: groupTitleCustomLayout,
|
|
53776
|
+
enableTreeStickCell: enableTreeStickCell
|
|
53777
|
+
} = options;
|
|
53706
53778
|
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
53779
|
width: containerFit,
|
|
53708
53780
|
height: containerFit
|
|
@@ -53719,7 +53791,7 @@
|
|
|
53719
53791
|
bottom: 0
|
|
53720
53792
|
}, 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
53793
|
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 !== (
|
|
53794
|
+
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.groupTitleCheckbox = null !== (_m = null == groupConfig ? void 0 : groupConfig.titleCheckbox) && void 0 !== _m ? _m : !!(null == rowSeriesNumber ? void 0 : rowSeriesNumber.enableTreeCheckbox), internalProps.groupTitleFieldFormat = null !== (_o = null == groupConfig ? void 0 : groupConfig.titleFieldFormat) && void 0 !== _o ? _o : groupTitleFieldFormat, internalProps.groupTitleCustomLayout = null !== (_p = null == groupConfig ? void 0 : groupConfig.titleCustomLayout) && void 0 !== _p ? _p : groupTitleCustomLayout, internalProps.enableTreeStickCell = null !== (_q = null == groupConfig ? void 0 : groupConfig.enableTreeStickCell) && void 0 !== _q ? _q : 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
53795
|
const that = this;
|
|
53724
53796
|
if (internalProps.calcWidthContext = {
|
|
53725
53797
|
_: internalProps,
|
|
@@ -53727,7 +53799,7 @@
|
|
|
53727
53799
|
var _a;
|
|
53728
53800
|
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
53801
|
}
|
|
53730
|
-
}, internalProps.cellTextOverflows = {}, internalProps.focusedTable = !1, internalProps.theme = themes.of(null !== (
|
|
53802
|
+
}, internalProps.cellTextOverflows = {}, internalProps.focusedTable = !1, internalProps.theme = themes.of(null !== (_r = options.theme) && void 0 !== _r ? _r : 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 !== (_s = options.allowFrozenColCount) && void 0 !== _s ? _s : 0, internalProps.limitMaxAutoWidth = null !== (_t = options.limitMaxAutoWidth) && void 0 !== _t ? _t : 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
53803
|
internalProps.legends = [];
|
|
53732
53804
|
const createLegend = Factory.getFunction("createLegend");
|
|
53733
53805
|
if (Array.isArray(options.legends)) {
|
|
@@ -53753,7 +53825,7 @@
|
|
|
53753
53825
|
}
|
|
53754
53826
|
if (internalProps.menu = Object.assign({
|
|
53755
53827
|
renderMode: "html"
|
|
53756
|
-
}, options.menu), Array.isArray(null === (
|
|
53828
|
+
}, options.menu), Array.isArray(null === (_u = options.menu) || void 0 === _u ? void 0 : _u.dropDownMenuHighlight) && this.setDropDownMenuHighlight(null === (_v = options.menu) || void 0 === _v ? void 0 : _v.dropDownMenuHighlight), (Array.isArray(null === (_w = options.menu) || void 0 === _w ? void 0 : _w.defaultHeaderMenuItems) || "function" == typeof (null === (_x = options.menu) || void 0 === _x ? void 0 : _x.defaultHeaderMenuItems)) && (this.globalDropDownMenu = options.menu.defaultHeaderMenuItems), "html" === internalProps.menu.renderMode) {
|
|
53757
53829
|
const MenuHandler = Factory.getComponent("menuHandler");
|
|
53758
53830
|
internalProps.menuHandler = new MenuHandler(this);
|
|
53759
53831
|
}
|
|
@@ -53761,7 +53833,7 @@
|
|
|
53761
53833
|
changedCells: new Map()
|
|
53762
53834
|
}, internalProps.customMergeCell = getCustomMergeCellFunc(options.customMergeCell);
|
|
53763
53835
|
const CustomCellStylePlugin = Factory.getComponent("customCellStylePlugin");
|
|
53764
|
-
CustomCellStylePlugin && (this.customCellStylePlugin = new CustomCellStylePlugin(this, null !== (
|
|
53836
|
+
CustomCellStylePlugin && (this.customCellStylePlugin = new CustomCellStylePlugin(this, null !== (_y = options.customCellStyle) && void 0 !== _y ? _y : [], null !== (_z = options.customCellStyleArrangement) && void 0 !== _z ? _z : [])), this._adjustCanvasSizeByOption();
|
|
53765
53837
|
}
|
|
53766
53838
|
_adjustCanvasSizeByOption() {
|
|
53767
53839
|
"auto" !== this.options.canvasHeight && "auto" !== this.options.canvasWidth || setTimeout(() => {
|
|
@@ -54538,47 +54610,54 @@
|
|
|
54538
54610
|
return super.fireListeners(type, event);
|
|
54539
54611
|
}
|
|
54540
54612
|
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;
|
|
54613
|
+
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
54614
|
null === (_a = this.editorManager) || void 0 === _a || _a.cancelEdit(), this.options = options, this._hasAutoImageColumn = void 0;
|
|
54543
54615
|
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
|
-
|
|
54616
|
+
frozenColCount = 0,
|
|
54617
|
+
unfreezeAllOnExceedsMaxWidth: unfreezeAllOnExceedsMaxWidth,
|
|
54618
|
+
defaultRowHeight = 40,
|
|
54619
|
+
defaultHeaderRowHeight: defaultHeaderRowHeight,
|
|
54620
|
+
defaultColWidth = 80,
|
|
54621
|
+
defaultHeaderColWidth = 80,
|
|
54622
|
+
keyboardOptions: keyboardOptions,
|
|
54623
|
+
eventOptions: eventOptions,
|
|
54624
|
+
rowSeriesNumber: rowSeriesNumber,
|
|
54625
|
+
enableCheckboxCascade: enableCheckboxCascade,
|
|
54626
|
+
columnResizeMode: columnResizeMode,
|
|
54627
|
+
rowResizeMode = "none",
|
|
54628
|
+
resize: resize,
|
|
54629
|
+
dragHeaderMode: dragHeaderMode,
|
|
54630
|
+
dragOrder: dragOrder,
|
|
54631
|
+
showFrozenIcon: showFrozenIcon,
|
|
54632
|
+
allowFrozenColCount: allowFrozenColCount,
|
|
54633
|
+
padding: padding,
|
|
54634
|
+
hover: hover,
|
|
54635
|
+
menu: menu,
|
|
54636
|
+
select: click,
|
|
54637
|
+
pixelRatio: pixelRatio,
|
|
54638
|
+
widthMode: widthMode,
|
|
54639
|
+
heightMode: heightMode,
|
|
54640
|
+
autoFillWidth: autoFillWidth,
|
|
54641
|
+
autoFillHeight: autoFillHeight,
|
|
54642
|
+
containerFit: containerFit,
|
|
54643
|
+
widthAdaptiveMode: widthAdaptiveMode,
|
|
54644
|
+
heightAdaptiveMode: heightAdaptiveMode,
|
|
54645
|
+
customRender: customRender,
|
|
54646
|
+
renderChartAsync: renderChartAsync,
|
|
54647
|
+
renderChartAsyncBatchCount: renderChartAsyncBatchCount,
|
|
54648
|
+
canvasWidth: canvasWidth,
|
|
54649
|
+
canvasHeight: canvasHeight,
|
|
54650
|
+
overscrollBehavior: overscrollBehavior,
|
|
54651
|
+
limitMinWidth: limitMinWidth,
|
|
54652
|
+
limitMinHeight: limitMinHeight
|
|
54653
|
+
} = options,
|
|
54654
|
+
{
|
|
54655
|
+
groupConfig: groupConfig,
|
|
54656
|
+
groupBy: groupBy,
|
|
54657
|
+
groupTitleFieldFormat: groupTitleFieldFormat,
|
|
54658
|
+
groupTitleCustomLayout: groupTitleCustomLayout,
|
|
54659
|
+
enableTreeStickCell: enableTreeStickCell
|
|
54660
|
+
} = options;
|
|
54582
54661
|
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
54662
|
width: containerFit,
|
|
54584
54663
|
height: containerFit
|
|
@@ -54590,9 +54669,9 @@
|
|
|
54590
54669
|
height: !1
|
|
54591
54670
|
}), this.customRender = customRender, this.canvasWidth = isNumber$4(canvasWidth) ? canvasWidth : void 0, this.canvasHeight = isNumber$4(canvasHeight) ? canvasHeight : void 0;
|
|
54592
54671
|
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 !== (
|
|
54672
|
+
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.groupTitleCheckbox = 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
54673
|
null == legend || legend.release();
|
|
54595
|
-
}), null === (
|
|
54674
|
+
}), 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
54675
|
internalProps.legends = [];
|
|
54597
54676
|
const createLegend = Factory.getFunction("createLegend");
|
|
54598
54677
|
if (Array.isArray(options.legends)) {
|
|
@@ -54618,11 +54697,11 @@
|
|
|
54618
54697
|
}
|
|
54619
54698
|
if (internalProps.menu = Object.assign({
|
|
54620
54699
|
renderMode: "html"
|
|
54621
|
-
}, options.menu), Array.isArray(null === (
|
|
54700
|
+
}, 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
54701
|
const MenuHandler = Factory.getComponent("menuHandler");
|
|
54623
54702
|
internalProps.menuHandler = new MenuHandler(this);
|
|
54624
54703
|
}
|
|
54625
|
-
this.clearCellStyleCache(), this.clearColWidthCache(), this.clearRowHeightCache(), internalProps.customMergeCell = getCustomMergeCellFunc(options.customMergeCell), null === (
|
|
54704
|
+
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
54705
|
}
|
|
54627
54706
|
renderWithRecreateCells() {
|
|
54628
54707
|
this.internalProps.stick.changedCells.clear();
|
|
@@ -55064,7 +55143,7 @@
|
|
|
55064
55143
|
var _a, _b, _c;
|
|
55065
55144
|
let icons;
|
|
55066
55145
|
if (this.isHeader(col, row)) icons = this.internalProps.headerHelper.getIcons(col, row);else if (this.internalProps.layoutMap.isSeriesNumber(col, row)) {
|
|
55067
|
-
if (!this.
|
|
55146
|
+
if (!this.internalProps.groupBy || !(null === (_a = this.getCellRawRecord(col, row)) || void 0 === _a ? void 0 : _a.vtableMerge)) {
|
|
55068
55147
|
(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
55148
|
}
|
|
55070
55149
|
const cellValue = this.getCellValue(col, row),
|
|
@@ -56954,10 +57033,9 @@
|
|
|
56954
57033
|
return layout._cellRangeMap.set(`$${col}$${row}`, cellRange), cellRange;
|
|
56955
57034
|
}
|
|
56956
57035
|
function getTreeTitleMerge(col, row, cellRange, layout) {
|
|
56957
|
-
var _a;
|
|
56958
57036
|
if ("tree" !== layout.rowHierarchyType) return;
|
|
56959
57037
|
const cellRecord = layout._table.getCellRawRecord(col, row);
|
|
56960
|
-
|
|
57038
|
+
layout._table.internalProps.groupTitleCheckbox && 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
57039
|
}
|
|
56962
57040
|
function getCellRangeTranspose(col, row, layout) {
|
|
56963
57041
|
var _a, _b, _c, _d;
|
|
@@ -57027,7 +57105,7 @@
|
|
|
57027
57105
|
}, 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
57106
|
}
|
|
57029
57107
|
handleRowSeriesNumber(rowSeriesNumber) {
|
|
57030
|
-
var _a, _b;
|
|
57108
|
+
var _a, _b, _c;
|
|
57031
57109
|
rowSeriesNumber && (Array.isArray(rowSeriesNumber) ? this.rowSeriesNumberColumn = rowSeriesNumber.map((seriesNumber, index) => {
|
|
57032
57110
|
var _a, _b;
|
|
57033
57111
|
return {
|
|
@@ -57053,11 +57131,11 @@
|
|
|
57053
57131
|
field: "_vtable_rowSeries_number"
|
|
57054
57132
|
}, rowSeriesNumber),
|
|
57055
57133
|
cellType: null !== (_a = rowSeriesNumber.cellType) && void 0 !== _a ? _a : "text",
|
|
57056
|
-
headerType: "checkbox" === rowSeriesNumber.cellType ? "checkbox" : "text",
|
|
57134
|
+
headerType: null !== (_b = rowSeriesNumber.headerType) && void 0 !== _b ? _b : "checkbox" === rowSeriesNumber.cellType ? "checkbox" : "text",
|
|
57057
57135
|
style: rowSeriesNumber.style,
|
|
57058
57136
|
width: rowSeriesNumber.width,
|
|
57059
57137
|
format: rowSeriesNumber.format,
|
|
57060
|
-
field: null !== (
|
|
57138
|
+
field: null !== (_c = rowSeriesNumber.field) && void 0 !== _c ? _c : "_vtable_rowSeries_number",
|
|
57061
57139
|
icon: rowSeriesNumber.icon,
|
|
57062
57140
|
headerIcon: rowSeriesNumber.headerIcon,
|
|
57063
57141
|
isChildNode: !1
|
|
@@ -58099,9 +58177,9 @@
|
|
|
58099
58177
|
}
|
|
58100
58178
|
function getCellUpdateType(col, row, table, oldCellUpdateType) {
|
|
58101
58179
|
if ("group" === oldCellUpdateType) return oldCellUpdateType;
|
|
58102
|
-
if ("sort" === oldCellUpdateType && !table.
|
|
58180
|
+
if ("sort" === oldCellUpdateType && !table.internalProps.groupBy) return oldCellUpdateType;
|
|
58103
58181
|
let cellUpdateType = "normal";
|
|
58104
|
-
if (table.
|
|
58182
|
+
if (table.internalProps.groupBy) cellUpdateType = "group";else if (!table.isHeader(col, row) && table.dataSource.lastOrderField) {
|
|
58105
58183
|
table.getBodyField(col, row) === table.dataSource.lastOrderField && (cellUpdateType = "sort");
|
|
58106
58184
|
}
|
|
58107
58185
|
return cellUpdateType;
|
|
@@ -58115,7 +58193,7 @@
|
|
|
58115
58193
|
}
|
|
58116
58194
|
function listTableAddRecord(record, recordIndex, table) {
|
|
58117
58195
|
var _a, _b, _c, _d;
|
|
58118
|
-
if (table.
|
|
58196
|
+
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
58197
|
(void 0 === recordIndex || recordIndex > table.dataSource.sourceLength) && (recordIndex = table.dataSource.sourceLength);
|
|
58120
58198
|
const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount;
|
|
58121
58199
|
table.dataSource.addRecord(record, recordIndex);
|
|
@@ -58184,7 +58262,7 @@
|
|
|
58184
58262
|
}
|
|
58185
58263
|
function listTableAddRecords(records, recordIndex, table) {
|
|
58186
58264
|
var _a, _b, _c, _d;
|
|
58187
|
-
if (table.
|
|
58265
|
+
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
58266
|
void 0 === recordIndex || recordIndex > table.dataSource.sourceLength ? recordIndex = table.dataSource.sourceLength : recordIndex < 0 && (recordIndex = 0);
|
|
58189
58267
|
const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount;
|
|
58190
58268
|
table.dataSource.addRecords(records, recordIndex);
|
|
@@ -58253,7 +58331,7 @@
|
|
|
58253
58331
|
}
|
|
58254
58332
|
function listTableDeleteRecords(recordIndexs, table) {
|
|
58255
58333
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
58256
|
-
if ((null == recordIndexs ? void 0 : recordIndexs.length) > 0) if (table.
|
|
58334
|
+
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
58335
|
const deletedRecordIndexs = table.dataSource.deleteRecords(recordIndexs);
|
|
58258
58336
|
if (0 === deletedRecordIndexs.length) return;
|
|
58259
58337
|
const oldRowCount = table.transpose ? table.colCount : table.rowCount;
|
|
@@ -58331,7 +58409,7 @@
|
|
|
58331
58409
|
}
|
|
58332
58410
|
function listTableUpdateRecords(records, recordIndexs, table) {
|
|
58333
58411
|
var _a, _b, _c, _d;
|
|
58334
|
-
if ((null == recordIndexs ? void 0 : recordIndexs.length) > 0) if (table.
|
|
58412
|
+
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
58413
|
const updateRecordIndexs = table.dataSource.updateRecords(records, recordIndexs);
|
|
58336
58414
|
if (0 === updateRecordIndexs.length) return;
|
|
58337
58415
|
const recordIndexsMinToMax = updateRecordIndexs.map(index => table.getBodyRowIndexByRecordIndex(index)).sort((a, b) => a - b);
|
|
@@ -58462,7 +58540,7 @@
|
|
|
58462
58540
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
58463
58541
|
super(container, options), this.showHeader = !0, options = this.options;
|
|
58464
58542
|
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 =
|
|
58543
|
+
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
58544
|
sortState: internalProps.sortState
|
|
58467
58545
|
}) : this.setRecords([]), options.title) {
|
|
58468
58546
|
const Title = Factory.getComponent("title");
|
|
@@ -58472,7 +58550,7 @@
|
|
|
58472
58550
|
const EmptyTip = Factory.getComponent("emptyTip");
|
|
58473
58551
|
this.internalProps.emptyTip = new EmptyTip(this.options.emptyTip, this), null === (_h = this.internalProps.emptyTip) || void 0 === _h || _h.resetVisible();
|
|
58474
58552
|
}
|
|
58475
|
-
if (
|
|
58553
|
+
if (this.internalProps.enableTreeStickCell) {
|
|
58476
58554
|
const ListTreeStickCellPlugin = Factory.getComponent("listTreeStickCellPlugin");
|
|
58477
58555
|
this.listTreeStickCellPlugin = new ListTreeStickCellPlugin(this);
|
|
58478
58556
|
}
|
|
@@ -58538,6 +58616,7 @@
|
|
|
58538
58616
|
this.internalProps.transpose !== transpose && (this.internalProps.transpose = transpose, this.internalProps.layoutMap && (this.internalProps.layoutMap.transpose = transpose, this.refreshRowColCount(), this._resetFrozenColCount(), this.renderAsync()));
|
|
58539
58617
|
}
|
|
58540
58618
|
getCellValue(col, row, skipCustomMerge) {
|
|
58619
|
+
var _a;
|
|
58541
58620
|
if (-1 === col || -1 === row) return null;
|
|
58542
58621
|
if (!skipCustomMerge) {
|
|
58543
58622
|
const customMergeText = this.getCustomMergeValue(col, row);
|
|
@@ -58552,11 +58631,15 @@
|
|
|
58552
58631
|
return title;
|
|
58553
58632
|
}
|
|
58554
58633
|
let value;
|
|
58555
|
-
if (this.
|
|
58634
|
+
if (this.internalProps.groupBy) {
|
|
58556
58635
|
const record = table.getCellRawRecord(col, row);
|
|
58557
58636
|
if (null == record ? void 0 : record.vtableMerge) return "";
|
|
58558
58637
|
table.internalProps.layoutMap.isAggregation(col, row) || (value = this.dataSource.getGroupSeriesNumber(row - this.columnHeaderLevelCount));
|
|
58559
|
-
} else
|
|
58638
|
+
} else {
|
|
58639
|
+
const define = table.getBodyColumnDefine(col, row),
|
|
58640
|
+
checkboxSeriesNumberStyle = table.getFieldData(define.field, col, row);
|
|
58641
|
+
value = "string" == typeof checkboxSeriesNumberStyle ? checkboxSeriesNumberStyle : (null == checkboxSeriesNumberStyle ? void 0 : checkboxSeriesNumberStyle.text) ? null !== (_a = checkboxSeriesNumberStyle.text) && void 0 !== _a ? _a : "" : row - this.columnHeaderLevelCount + 1;
|
|
58642
|
+
}
|
|
58560
58643
|
const {
|
|
58561
58644
|
format: format
|
|
58562
58645
|
} = table.internalProps.layoutMap.getSeriesNumberBody(col, row);
|
|
@@ -58688,7 +58771,7 @@
|
|
|
58688
58771
|
updateOption(options) {
|
|
58689
58772
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
58690
58773
|
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 =
|
|
58774
|
+
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
58775
|
const releaseObj = internalProps.releaseList[i];
|
|
58693
58776
|
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
58777
|
}
|
|
@@ -58800,7 +58883,7 @@
|
|
|
58800
58883
|
getHierarchyState(col, row) {
|
|
58801
58884
|
var _a;
|
|
58802
58885
|
if (this.isHeader(col, row)) return null === (_a = this._getHeaderLayoutMap(col, row)) || void 0 === _a ? void 0 : _a.hierarchyState;
|
|
58803
|
-
if (!this.
|
|
58886
|
+
if (!this.internalProps.groupBy || isArray$7(this.internalProps.groupBy) && 0 === this.internalProps.groupBy.length) {
|
|
58804
58887
|
if (!this.getBodyColumnDefine(col, row).tree) return HierarchyState.none;
|
|
58805
58888
|
}
|
|
58806
58889
|
const index = this.getRecordShowIndexByCell(col, row);
|
|
@@ -59100,7 +59183,7 @@
|
|
|
59100
59183
|
}
|
|
59101
59184
|
getGroupTitleLevel(col, row) {
|
|
59102
59185
|
var _a;
|
|
59103
|
-
if (!this.
|
|
59186
|
+
if (!this.internalProps.groupBy) return;
|
|
59104
59187
|
const indexArr = this.dataSource.getIndexKey(this.getRecordShowIndexByCell(col, row)),
|
|
59105
59188
|
groupLength = null !== (_a = this.dataSource.getGroupLength()) && void 0 !== _a ? _a : 0;
|
|
59106
59189
|
let indexArrLngth = isArray$7(indexArr) ? indexArr.length - 1 : 0;
|
|
@@ -62386,7 +62469,7 @@
|
|
|
62386
62469
|
return width -= padding[1] + padding[3] + iconWidth, height -= padding[0] + padding[2], "center" === textAlign ? checkboxComponent.setAttribute("x", padding[3] + cellLeftIconWidth + (width - checkboxComponent.AABBBounds.width()) / 2) : "right" === textAlign ? checkboxComponent.setAttribute("x", padding[3] + cellLeftIconWidth + width - checkboxComponent.AABBBounds.width()) : checkboxComponent.setAttribute("x", padding[3] + cellLeftIconWidth), "middle" === textBaseline ? checkboxComponent.setAttribute("y", padding[0] + (height - checkboxComponent.AABBBounds.height()) / 2) : "bottom" === textBaseline ? checkboxComponent.setAttribute("y", padding[0] + height - checkboxComponent.AABBBounds.height()) : checkboxComponent.setAttribute("y", padding[0]), cellGroup;
|
|
62387
62470
|
}
|
|
62388
62471
|
function createCheckbox(col, row, colWidth, cellWidth, cellHeight, padding, cellTheme, define, table, isCheckboxTree) {
|
|
62389
|
-
var _a, _b, _c, _d
|
|
62472
|
+
var _a, _b, _c, _d;
|
|
62390
62473
|
const style = table._getCellStyle(col, row),
|
|
62391
62474
|
size = getProp("size", style, col, row, table),
|
|
62392
62475
|
spaceBetweenTextAndIcon = getProp("spaceBetweenTextAndIcon", style, col, row, table),
|
|
@@ -62406,12 +62489,12 @@
|
|
|
62406
62489
|
text = null !== (_a = value) && void 0 !== _a ? _a : "";
|
|
62407
62490
|
if (isObject$7(value) ? (isChecked = value.checked, isDisabled = value.disable, text = null !== (_b = value.text) && void 0 !== _b ? _b : "") : "boolean" == typeof value && (isChecked = value, text = ""), table.internalProps.layoutMap.isSeriesNumber(col, row)) {
|
|
62408
62491
|
const checkboxSeriesNumberStyle = table.getFieldData(define.field, col, row);
|
|
62409
|
-
checkboxSeriesNumberStyle && (isChecked = checkboxSeriesNumberStyle.checked, isDisabled = checkboxSeriesNumberStyle.disable
|
|
62492
|
+
checkboxSeriesNumberStyle && ("string" == typeof checkboxSeriesNumberStyle || ("object" == typeof checkboxSeriesNumberStyle ? (isChecked = checkboxSeriesNumberStyle.checked, isDisabled = checkboxSeriesNumberStyle.disable) : "boolean" == typeof checkboxSeriesNumberStyle && (isChecked = checkboxSeriesNumberStyle)));
|
|
62410
62493
|
}
|
|
62411
62494
|
isChecked = table.stateManager.syncCheckedState(col, row, define.field, isChecked);
|
|
62412
62495
|
const hierarchyOffset = getHierarchyOffset(col, row, table),
|
|
62413
62496
|
cellStyle = table._getCellStyle(col, row),
|
|
62414
|
-
autoWrapText = null !== (
|
|
62497
|
+
autoWrapText = null !== (_c = cellStyle.autoWrapText) && void 0 !== _c ? _c : table.internalProps.autoWrapText,
|
|
62415
62498
|
{
|
|
62416
62499
|
lineClamp: lineClamp
|
|
62417
62500
|
} = cellStyle,
|
|
@@ -62467,7 +62550,7 @@
|
|
|
62467
62550
|
},
|
|
62468
62551
|
dx: isCheckboxTree ? hierarchyOffset : 0,
|
|
62469
62552
|
spaceBetweenTextAndIcon: spaceBetweenTextAndIcon,
|
|
62470
|
-
disabled: null !== (
|
|
62553
|
+
disabled: null !== (_d = null != isDisabled ? isDisabled : globalDisable) && void 0 !== _d && _d
|
|
62471
62554
|
};
|
|
62472
62555
|
"indeterminate" === isChecked ? (checkboxAttributes.checked = void 0, checkboxAttributes.indeterminate = !0) : (checkboxAttributes.checked = isChecked, checkboxAttributes.indeterminate = void 0), defaultFill && (checkboxAttributes.box.fill = defaultFill), defaultStroke && (checkboxAttributes.box.stroke = defaultStroke), disableFill && (checkboxAttributes.box.disableFill = disableFill), checkedFill && (checkboxAttributes.box.checkedFill = checkedFill), checkedStroke && (checkboxAttributes.box.checkedStroke = checkedStroke), disableCheckedFill && (checkboxAttributes.box.disableCheckedFill = disableCheckedFill), disableCheckedStroke && (checkboxAttributes.box.disableCheckedStroke = disableCheckedStroke), checkIconImage && (checkboxAttributes.icon.checkIconImage = checkIconImage), indeterminateIconImage && (checkboxAttributes.icon.indeterminateIconImage = indeterminateIconImage);
|
|
62473
62556
|
const checkbox = new CheckBox(checkboxAttributes);
|