@visactor/vtable-calendar 1.19.4-alpha.0 → 1.19.4-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vtable-calendar.js +348 -252
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +2 -2
package/dist/vtable-calendar.js
CHANGED
|
@@ -9856,7 +9856,7 @@
|
|
|
9856
9856
|
}
|
|
9857
9857
|
removeChild(child) {
|
|
9858
9858
|
const data = super.removeChild(child);
|
|
9859
|
-
return
|
|
9859
|
+
return this.getGraphicService().onRemove(child), child.stage = null, this.addUpdateBoundTag(), data;
|
|
9860
9860
|
}
|
|
9861
9861
|
removeAllChild(deep = !1) {
|
|
9862
9862
|
this.forEachChildren(child => {
|
|
@@ -12786,9 +12786,10 @@
|
|
|
12786
12786
|
return super.needUpdateTag(key, POLYGON_UPDATE_TAG_KEY);
|
|
12787
12787
|
}
|
|
12788
12788
|
toCustomPath() {
|
|
12789
|
-
|
|
12790
|
-
|
|
12791
|
-
|
|
12789
|
+
let path = super.toCustomPath();
|
|
12790
|
+
if (path) return path;
|
|
12791
|
+
const points = this.attribute.points;
|
|
12792
|
+
return path = new CustomPath2D(), points.forEach((point, index) => {
|
|
12792
12793
|
0 === index ? path.moveTo(point.x, point.y) : path.lineTo(point.x, point.y);
|
|
12793
12794
|
}), path.closePath(), path;
|
|
12794
12795
|
}
|
|
@@ -16048,6 +16049,7 @@
|
|
|
16048
16049
|
drawContext.updateBounds ? this.useDirtyBounds = !0 : this.useDirtyBounds = !drawContext.stage.params.optimize.disableCheckGraphicWidthOutRange;
|
|
16049
16050
|
}
|
|
16050
16051
|
draw(renderService, drawContext) {
|
|
16052
|
+
var _a;
|
|
16051
16053
|
this.prepareForDraw(renderService, drawContext), drawContext.drawContribution = this, this.currentRenderMap = this.styleRenderMap.get(drawContext.renderStyle) || this.defaultRenderMap, this.currentRenderService = renderService;
|
|
16052
16054
|
const {
|
|
16053
16055
|
context: context,
|
|
@@ -16062,7 +16064,7 @@
|
|
|
16062
16064
|
dirtyBounds.x1 = Math.floor(b.x1), dirtyBounds.y1 = Math.floor(b.y1), dirtyBounds.x2 = Math.ceil(b.x2), dirtyBounds.y2 = Math.ceil(b.y2);
|
|
16063
16065
|
}
|
|
16064
16066
|
const d = context.dpr % 1;
|
|
16065
|
-
(d || .5 !== d) && (dirtyBounds.x1 = Math.floor(dirtyBounds.x1 * context.dpr) / context.dpr, dirtyBounds.y1 = Math.floor(dirtyBounds.y1 * context.dpr) / context.dpr, dirtyBounds.x2 = Math.ceil(dirtyBounds.x2 * context.dpr) / context.dpr, dirtyBounds.y2 = Math.ceil(dirtyBounds.y2 * context.dpr) / context.dpr), this.backupDirtyBounds.copy(dirtyBounds), context.reset(!1), context.save(), context.setClearMatrix(transMatrix.a, transMatrix.b, transMatrix.c, transMatrix.d, transMatrix.e, transMatrix.f), context.clearMatrix(!1), context.translate(viewBox.x1, viewBox.y1, !0), context.beginPath(), context.rect(dirtyBounds.x1, dirtyBounds.y1, dirtyBounds.width(), dirtyBounds.height()), context.clip(), stage.camera && (this.dirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0), this.backupDirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0)), this.clearScreen(renderService, context, drawContext), renderService.renderTreeRoots.sort((a, b) => {
|
|
16067
|
+
(d || .5 !== d) && (dirtyBounds.x1 = Math.floor(dirtyBounds.x1 * context.dpr) / context.dpr, dirtyBounds.y1 = Math.floor(dirtyBounds.y1 * context.dpr) / context.dpr, dirtyBounds.x2 = Math.ceil(dirtyBounds.x2 * context.dpr) / context.dpr, dirtyBounds.y2 = Math.ceil(dirtyBounds.y2 * context.dpr) / context.dpr), this.backupDirtyBounds.copy(dirtyBounds), context.reset(!1), context.save(), context.setClearMatrix(transMatrix.a, transMatrix.b, transMatrix.c, transMatrix.d, transMatrix.e, transMatrix.f), context.clearMatrix(!1), context.translate(viewBox.x1, viewBox.y1, !0), context.beginPath(), context.rect(dirtyBounds.x1, dirtyBounds.y1, dirtyBounds.width(), dirtyBounds.height()), context.clip(), stage.camera && (this.dirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0), this.backupDirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0)), this.clearScreen(renderService, context, drawContext), (null === (_a = renderService.drawParams) || void 0 === _a ? void 0 : _a.stage) && renderService.drawParams.stage.hooks.afterClearScreen.call(renderService.drawParams), renderService.renderTreeRoots.sort((a, b) => {
|
|
16066
16068
|
var _a, _b;
|
|
16067
16069
|
return (null !== (_a = a.attribute.zIndex) && void 0 !== _a ? _a : DefaultAttribute.zIndex) - (null !== (_b = b.attribute.zIndex) && void 0 !== _b ? _b : DefaultAttribute.zIndex);
|
|
16068
16070
|
}).forEach(group => {
|
|
@@ -16741,13 +16743,16 @@
|
|
|
16741
16743
|
} else this._skipRender = 1;
|
|
16742
16744
|
}, this.beforeRender = stage => {
|
|
16743
16745
|
this._beforeRender && this._beforeRender(stage);
|
|
16746
|
+
}, this.afterClearScreen = drawParams => {
|
|
16747
|
+
this._afterClearScreen && this._afterClearScreen(drawParams);
|
|
16744
16748
|
}, this.afterRender = stage => {
|
|
16745
16749
|
this.renderCount++, this._afterRender && this._afterRender(stage), this._afterNextRenderCbs && this._afterNextRenderCbs.forEach(cb => cb(stage)), this._afterNextRenderCbs = null, this.tickedBeforeRender = !1;
|
|
16746
16750
|
}, this.afterTickCb = () => {
|
|
16747
16751
|
this.tickedBeforeRender = !0, "rendering" !== this.state && this.renderNextFrame();
|
|
16748
16752
|
}, this.params = params, this.theme = new Theme(), this.hooks = {
|
|
16749
16753
|
beforeRender: new SyncHook(["stage"]),
|
|
16750
|
-
afterRender: new SyncHook(["stage"])
|
|
16754
|
+
afterRender: new SyncHook(["stage"]),
|
|
16755
|
+
afterClearScreen: new SyncHook(["stage"])
|
|
16751
16756
|
}, this.global = application.global, !this.global.env && isBrowserEnv() && this.global.setEnv("browser"), this.window = container.get(VWindow), this.renderService = container.get(RenderService), this.pluginService = container.get(PluginService), this.layerService = container.get(LayerService), this.graphicService = container.get(GraphicService), this.pluginService.active(this, params), this.window.create({
|
|
16752
16757
|
width: params.width,
|
|
16753
16758
|
height: params.height,
|
|
@@ -16759,7 +16764,7 @@
|
|
|
16759
16764
|
canvas: params.canvas
|
|
16760
16765
|
}), this.state = "normal", this.renderCount = 0, this.tryInitEventSystem(), this._background = null !== (_a = params.background) && void 0 !== _a ? _a : DefaultConfig.BACKGROUND, this.appendChild(this.layerService.createLayer(this, {
|
|
16761
16766
|
main: !0
|
|
16762
|
-
})), this.nextFrameRenderLayerSet = new Set(), this.willNextFrameRender = !1, this.stage = this, this.renderStyle = params.renderStyle, params.autoRender && this.enableAutoRender(), params.autoRefresh && this.enableAutoRefresh(), !1 === params.disableDirtyBounds && this.enableDirtyBounds(), params.enableHtmlAttribute && this.enableHtmlAttribute(params.enableHtmlAttribute), params.ReactDOM && this.enableReactAttribute(params.ReactDOM), params.enableLayout && this.enableLayout(), this.hooks.beforeRender.tap("constructor", this.beforeRender), this.hooks.afterRender.tap("constructor", this.afterRender), this._beforeRender = params.beforeRender, this._afterRender = params.afterRender, this.supportInteractiveLayer = !1 !== params.interactiveLayer, params.optimize || (params.optimize = {
|
|
16767
|
+
})), this.nextFrameRenderLayerSet = new Set(), this.willNextFrameRender = !1, this.stage = this, this.renderStyle = params.renderStyle, params.autoRender && this.enableAutoRender(), params.autoRefresh && this.enableAutoRefresh(), !1 === params.disableDirtyBounds && this.enableDirtyBounds(), params.enableHtmlAttribute && this.enableHtmlAttribute(params.enableHtmlAttribute), params.ReactDOM && this.enableReactAttribute(params.ReactDOM), params.enableLayout && this.enableLayout(), this.hooks.beforeRender.tap("constructor", this.beforeRender), this.hooks.afterRender.tap("constructor", this.afterRender), this.hooks.afterClearScreen.tap("constructor", this.afterClearScreen), this._beforeRender = params.beforeRender, this._afterRender = params.afterRender, this._afterClearScreen = params.afterClearScreen, this.supportInteractiveLayer = !1 !== params.interactiveLayer, params.optimize || (params.optimize = {
|
|
16763
16768
|
tickRenderMode: "effect"
|
|
16764
16769
|
}), this.optmize(params.optimize), params.background && isString$6(this._background) && this._background.includes("/") && this.setAttributes({
|
|
16765
16770
|
background: this._background
|
|
@@ -17154,7 +17159,7 @@
|
|
|
17154
17159
|
return this._cursor;
|
|
17155
17160
|
}
|
|
17156
17161
|
eventPointTransform(e) {
|
|
17157
|
-
const point = this.global.mapToCanvasPoint(e, this.window
|
|
17162
|
+
const point = this.global.mapToCanvasPoint(e, this.window);
|
|
17158
17163
|
return this.stage.window.pointTransform(point.x, point.y);
|
|
17159
17164
|
}
|
|
17160
17165
|
pauseTriggerEvent() {
|
|
@@ -24462,6 +24467,14 @@
|
|
|
24462
24467
|
state.executor.stop();
|
|
24463
24468
|
}), this.stateList = null;
|
|
24464
24469
|
}
|
|
24470
|
+
reApplyState(state) {
|
|
24471
|
+
var _a;
|
|
24472
|
+
const stateInfo = null === (_a = this.stateList) || void 0 === _a ? void 0 : _a.find(stateInfo => stateInfo.state === state);
|
|
24473
|
+
if (stateInfo) {
|
|
24474
|
+
const stateList = this.stateList.slice();
|
|
24475
|
+
stateInfo.executor.stop(), this.stateList = stateList, stateInfo.executor.execute(stateInfo.animationConfig);
|
|
24476
|
+
}
|
|
24477
|
+
}
|
|
24465
24478
|
}
|
|
24466
24479
|
|
|
24467
24480
|
class GraphicStateExtension {
|
|
@@ -24492,11 +24505,20 @@
|
|
|
24492
24505
|
applyUnhighlightState(animationConfig, callback) {
|
|
24493
24506
|
return this._getAnimationStateManager(this).applyUnhighlightState(animationConfig, callback), this;
|
|
24494
24507
|
}
|
|
24495
|
-
stopAnimationState(state, type) {
|
|
24496
|
-
return this._getAnimationStateManager(this).stopState(state, type), this
|
|
24508
|
+
stopAnimationState(state, type, deep = !1) {
|
|
24509
|
+
return this._getAnimationStateManager(this).stopState(state, type), deep && this.isContainer && this.forEachChildren(child => {
|
|
24510
|
+
child.stopAnimationState(state, type, deep);
|
|
24511
|
+
}), this;
|
|
24497
24512
|
}
|
|
24498
24513
|
clearAnimationStates() {
|
|
24499
|
-
|
|
24514
|
+
const stateManager = this._animationStateManager;
|
|
24515
|
+
return stateManager && stateManager.clearState(), this;
|
|
24516
|
+
}
|
|
24517
|
+
reApplyAnimationState(state, deep = !1) {
|
|
24518
|
+
const stateManager = this._animationStateManager;
|
|
24519
|
+
return stateManager && stateManager.reApplyState(state), deep && this.isContainer && this.forEachChildren(child => {
|
|
24520
|
+
child.reApplyAnimationState(state, deep);
|
|
24521
|
+
}), this;
|
|
24500
24522
|
}
|
|
24501
24523
|
static extend(graphic) {
|
|
24502
24524
|
return new GraphicStateExtension()._getAnimationStateManager(graphic), graphic;
|
|
@@ -24549,6 +24571,21 @@
|
|
|
24549
24571
|
getGraphicAttribute(key, prev = !1) {
|
|
24550
24572
|
return !prev && this.finalAttribute ? this.finalAttribute[key] : this.attribute[key];
|
|
24551
24573
|
}
|
|
24574
|
+
pauseAnimation(deep = !1) {
|
|
24575
|
+
this.animates && this.animates.forEach(animate => animate.pause()), deep && this.isContainer && this.forEachChildren(child => {
|
|
24576
|
+
child.pauseAnimation(deep);
|
|
24577
|
+
});
|
|
24578
|
+
}
|
|
24579
|
+
resumeAnimation(deep = !1) {
|
|
24580
|
+
this.animates && this.animates.forEach(animate => animate.resume()), deep && this.isContainer && this.forEachChildren(child => {
|
|
24581
|
+
child.resumeAnimation(deep);
|
|
24582
|
+
});
|
|
24583
|
+
}
|
|
24584
|
+
stopAnimation(deep = !1) {
|
|
24585
|
+
this.animates && this.animates.forEach(animate => animate.stop()), deep && this.isContainer && this.forEachChildren(child => {
|
|
24586
|
+
child.stopAnimation(deep);
|
|
24587
|
+
});
|
|
24588
|
+
}
|
|
24552
24589
|
}
|
|
24553
24590
|
|
|
24554
24591
|
function registerAnimate() {
|
|
@@ -25110,7 +25147,7 @@
|
|
|
25110
25147
|
super(from, to, duration, easing, params);
|
|
25111
25148
|
}
|
|
25112
25149
|
onBind() {
|
|
25113
|
-
var _a, _b;
|
|
25150
|
+
var _a, _b, _c;
|
|
25114
25151
|
super.onBind();
|
|
25115
25152
|
const {
|
|
25116
25153
|
from: from,
|
|
@@ -25119,7 +25156,7 @@
|
|
|
25119
25156
|
fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
|
|
25120
25157
|
this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to;
|
|
25121
25158
|
const finalAttribute = this.target.getFinalAttribute();
|
|
25122
|
-
finalAttribute && this.target.setAttributes(finalAttribute), this.target.setAttributes(fromAttrs);
|
|
25159
|
+
finalAttribute && this.target.setAttributes(finalAttribute), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && this.target.setAttributes(fromAttrs);
|
|
25123
25160
|
}
|
|
25124
25161
|
onEnd(cb) {
|
|
25125
25162
|
super.onEnd(cb);
|
|
@@ -25217,7 +25254,7 @@
|
|
|
25217
25254
|
super(from, to, duration, easing, params);
|
|
25218
25255
|
}
|
|
25219
25256
|
onBind() {
|
|
25220
|
-
var _a, _b;
|
|
25257
|
+
var _a, _b, _c;
|
|
25221
25258
|
super.onBind();
|
|
25222
25259
|
const {
|
|
25223
25260
|
from: from,
|
|
@@ -25226,7 +25263,7 @@
|
|
|
25226
25263
|
fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
|
|
25227
25264
|
this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to;
|
|
25228
25265
|
const finalAttribute = this.target.getFinalAttribute();
|
|
25229
|
-
finalAttribute && this.target.setAttributes(finalAttribute), this.target.setAttributes(fromAttrs);
|
|
25266
|
+
finalAttribute && this.target.setAttributes(finalAttribute), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && this.target.setAttributes(fromAttrs);
|
|
25230
25267
|
}
|
|
25231
25268
|
onEnd(cb) {
|
|
25232
25269
|
super.onEnd(cb);
|
|
@@ -27077,16 +27114,15 @@
|
|
|
27077
27114
|
changedY = 0;
|
|
27078
27115
|
"negative" === orient && (changedX = null !== (_a = layoutRect.width) && void 0 !== _a ? _a : graphic.stage.viewWidth, changedY = null !== (_b = layoutRect.height) && void 0 !== _b ? _b : graphic.stage.viewHeight), changedX += offset, changedY += offset;
|
|
27079
27116
|
const point = isFunction$7(pointOpt) ? pointOpt.call(null, null === (_d = null === (_c = graphic.context) || void 0 === _c ? void 0 : _c.data) || void 0 === _d ? void 0 : _d[0], graphic, animationParameters) : pointOpt,
|
|
27080
|
-
|
|
27081
|
-
|
|
27082
|
-
|
|
27083
|
-
|
|
27084
|
-
finalAttrsY = excludeChannels.includes("y") ? graphic.attribute.y : finalAttrs.y;
|
|
27117
|
+
finalAttrsX = graphic.getGraphicAttribute("x"),
|
|
27118
|
+
finalAttrsY = graphic.getGraphicAttribute("y"),
|
|
27119
|
+
fromX = excludeChannels.includes("x") ? finalAttrsX : point && isValidNumber$3(point.x) ? point.x : changedX,
|
|
27120
|
+
fromY = excludeChannels.includes("y") ? finalAttrsY : point && isValidNumber$3(point.y) ? point.y : changedY;
|
|
27085
27121
|
switch (direction) {
|
|
27086
27122
|
case "x":
|
|
27087
27123
|
return {
|
|
27088
27124
|
from: {
|
|
27089
|
-
x: fromX
|
|
27125
|
+
x: excludeChannels.includes("x") ? finalAttrsX : fromX
|
|
27090
27126
|
},
|
|
27091
27127
|
to: {
|
|
27092
27128
|
x: finalAttrsX
|
|
@@ -27134,7 +27170,7 @@
|
|
|
27134
27170
|
case "x":
|
|
27135
27171
|
return {
|
|
27136
27172
|
from: {
|
|
27137
|
-
x: graphic.
|
|
27173
|
+
x: graphic.getGraphicAttribute("x")
|
|
27138
27174
|
},
|
|
27139
27175
|
to: {
|
|
27140
27176
|
x: fromX
|
|
@@ -27143,7 +27179,7 @@
|
|
|
27143
27179
|
case "y":
|
|
27144
27180
|
return {
|
|
27145
27181
|
from: {
|
|
27146
|
-
y: graphic.
|
|
27182
|
+
y: graphic.getGraphicAttribute("y")
|
|
27147
27183
|
},
|
|
27148
27184
|
to: {
|
|
27149
27185
|
y: fromY
|
|
@@ -27152,8 +27188,8 @@
|
|
|
27152
27188
|
default:
|
|
27153
27189
|
return {
|
|
27154
27190
|
from: {
|
|
27155
|
-
x: graphic.
|
|
27156
|
-
y: graphic.
|
|
27191
|
+
x: graphic.getGraphicAttribute("x"),
|
|
27192
|
+
y: graphic.getGraphicAttribute("y")
|
|
27157
27193
|
},
|
|
27158
27194
|
to: {
|
|
27159
27195
|
x: fromX,
|
|
@@ -27371,9 +27407,8 @@
|
|
|
27371
27407
|
w = Math.min(Math.min(currentX + maxLength, maxLength), streamLength - currentX),
|
|
27372
27408
|
width = w + x > parentWidth ? Math.max(parentWidth - x, 0) : w;
|
|
27373
27409
|
this.rect.setAttributes({
|
|
27374
|
-
x: x,
|
|
27375
|
-
width: width
|
|
27376
|
-
dx: Math.min(parentAttr.x1 - parentAttr.x, 0)
|
|
27410
|
+
x: x + Math.min(parentAttr.x1 - parentAttr.x, 0),
|
|
27411
|
+
width: width
|
|
27377
27412
|
}, !1, {
|
|
27378
27413
|
type: AttributeUpdateType.ANIMATE_PLAY,
|
|
27379
27414
|
animationState: {
|
|
@@ -27390,9 +27425,8 @@
|
|
|
27390
27425
|
const h = Math.min(parentHeight - currentY, maxLength);
|
|
27391
27426
|
let height;
|
|
27392
27427
|
y <= 0 ? (height = Math.max(y + h, 0), y = 0) : height = h, this.rect.setAttributes({
|
|
27393
|
-
y: y,
|
|
27394
|
-
height: height
|
|
27395
|
-
dy: Math.min(parentAttr.y1 - parentAttr.y, 0)
|
|
27428
|
+
y: y + Math.min(parentAttr.y1 - parentAttr.y, 0),
|
|
27429
|
+
height: height
|
|
27396
27430
|
}, !1, {
|
|
27397
27431
|
type: AttributeUpdateType.ANIMATE_PLAY,
|
|
27398
27432
|
animationState: {
|
|
@@ -33159,6 +33193,16 @@
|
|
|
33159
33193
|
function traverseObject(obj, childrenProperty, callback) {
|
|
33160
33194
|
callback(obj), (null == obj ? void 0 : obj[childrenProperty]) && Array.isArray(null == obj ? void 0 : obj[childrenProperty]) && obj[childrenProperty].forEach(child => traverseObject(child, childrenProperty, callback));
|
|
33161
33195
|
}
|
|
33196
|
+
function computeChildrenNodeLength(indexKey, hierarchyState, nodeData) {
|
|
33197
|
+
let size = 0;
|
|
33198
|
+
if (!hierarchyState || hierarchyState === HierarchyState.collapse || hierarchyState === HierarchyState.none) return size;
|
|
33199
|
+
const children = nodeData.filteredChildren ? nodeData.filteredChildren : nodeData.children;
|
|
33200
|
+
if (children) for (let i = 0; i < children.length; i++) {
|
|
33201
|
+
size += 1;
|
|
33202
|
+
size += computeChildrenNodeLength(Array.isArray(indexKey) ? indexKey.concat([i]) : [indexKey, i], children[i].hierarchyState, children[i]);
|
|
33203
|
+
}
|
|
33204
|
+
return size;
|
|
33205
|
+
}
|
|
33162
33206
|
|
|
33163
33207
|
const isNode = "undefined" == typeof window || void 0 === window.window;
|
|
33164
33208
|
let arrayFind, arrayFindIndex;
|
|
@@ -35416,17 +35460,8 @@
|
|
|
35416
35460
|
state = this.getHierarchyState(index),
|
|
35417
35461
|
data = this.getOriginalRecord(indexed);
|
|
35418
35462
|
if (this.clearSortedIndexMap(), state === HierarchyState.collapse) data.hierarchyState = HierarchyState.expand, this.pushChildrenNode(indexed, HierarchyState.expand, data), this.hasHierarchyStateExpand = !0;else if (state === HierarchyState.expand) {
|
|
35419
|
-
|
|
35420
|
-
|
|
35421
|
-
if (!hierarchyState || hierarchyState === HierarchyState.collapse || hierarchyState === HierarchyState.none) return;
|
|
35422
|
-
const children = nodeData.filteredChildren ? nodeData.filteredChildren : nodeData.children;
|
|
35423
|
-
if (children) for (let i = 0; i < children.length; i++) {
|
|
35424
|
-
childrenLength += 1;
|
|
35425
|
-
const childIndex = Array.isArray(indexKey) ? indexKey.concat([i]) : [indexKey, i];
|
|
35426
|
-
computeChildrenNodeLength(childIndex, children[i].hierarchyState, children[i]);
|
|
35427
|
-
}
|
|
35428
|
-
};
|
|
35429
|
-
computeChildrenNodeLength(indexed, state, data), this.currentIndexedData.splice(this.currentIndexedData.indexOf(indexed) + 1, childrenLength), data.hierarchyState = HierarchyState.collapse;
|
|
35463
|
+
const childrenLength = computeChildrenNodeLength(indexed, state, data);
|
|
35464
|
+
this.currentIndexedData.splice(this.currentIndexedData.indexOf(indexed) + 1, childrenLength), data.hierarchyState = HierarchyState.collapse;
|
|
35430
35465
|
}
|
|
35431
35466
|
this.updatePagerData();
|
|
35432
35467
|
const add = [],
|
|
@@ -37296,7 +37331,7 @@
|
|
|
37296
37331
|
cacheBeforeChangedRecord(dataIndex, table) {
|
|
37297
37332
|
var _a;
|
|
37298
37333
|
const originRecord = this.getOriginalRecord(dataIndex);
|
|
37299
|
-
table.
|
|
37334
|
+
table.internalProps.groupBy && (dataIndex = this.getOriginRecordIndexForGroup(dataIndex)), this.beforeChangedRecordsMap.has(dataIndex.toString()) || this.beforeChangedRecordsMap.set(dataIndex.toString(), null !== (_a = cloneDeep$1(originRecord, void 0, ["vtable_gantt_linkedFrom", "vtable_gantt_linkedTo"])) && void 0 !== _a ? _a : {});
|
|
37300
37335
|
}
|
|
37301
37336
|
getGroupSeriesNumber(showIndex) {
|
|
37302
37337
|
const recordIndex = this.dataSource.currentIndexedData[showIndex],
|
|
@@ -37749,7 +37784,7 @@
|
|
|
37749
37784
|
}
|
|
37750
37785
|
function getHierarchyExpandLevel(table) {
|
|
37751
37786
|
var _a;
|
|
37752
|
-
return table.options.hierarchyExpandLevel ? table.options.hierarchyExpandLevel : table.
|
|
37787
|
+
return table.options.hierarchyExpandLevel ? table.options.hierarchyExpandLevel : table.internalProps.groupBy ? 1 / 0 : (null === (_a = table._hasHierarchyTreeHeader) || void 0 === _a ? void 0 : _a.call(table)) ? 1 : void 0;
|
|
37753
37788
|
}
|
|
37754
37789
|
function _setDataSource(table, dataSource) {
|
|
37755
37790
|
_dealWithUpdateDataSource(table, () => {
|
|
@@ -39033,7 +39068,7 @@
|
|
|
39033
39068
|
if (layoutMap.isHeader(col, row)) {
|
|
39034
39069
|
const hd = layoutMap.getHeader(col, row);
|
|
39035
39070
|
isValid$3(null == hd ? void 0 : hd.hierarchyLevel) && (cellHierarchyIndent = (null !== (_a = hd.hierarchyLevel) && void 0 !== _a ? _a : 0) * ("tree" === layoutMap.rowHierarchyType && null !== (_b = layoutMap.rowHierarchyIndent) && void 0 !== _b ? _b : 0), layoutMap.rowHierarchyTextStartAlignment && !table.internalProps.headerHelper.getHierarchyIcon(col, row) && (cellHierarchyIndent += table.internalProps.headerHelper.getHierarchyIconWidth()));
|
|
39036
|
-
} else if (table.
|
|
39071
|
+
} else if (table.internalProps.groupBy || (null === (_c = table.getBodyColumnDefine(col, row)) || void 0 === _c ? void 0 : _c.tree)) {
|
|
39037
39072
|
const indexArr = table.dataSource.getIndexKey(table.getRecordShowIndexByCell(col, row)),
|
|
39038
39073
|
groupLength = null !== (_d = table.dataSource.getGroupLength()) && void 0 !== _d ? _d : 0;
|
|
39039
39074
|
let indexArrLngth = isArray$7(indexArr) ? indexArr.length - 1 : 0;
|
|
@@ -39732,7 +39767,7 @@
|
|
|
39732
39767
|
vtableMergeName: vtableMergeName,
|
|
39733
39768
|
vtableMerge: vtableMerge
|
|
39734
39769
|
} = null != rawRecord ? rawRecord : {};
|
|
39735
|
-
isVtableMerge = vtableMerge, vtableMerge && (mayHaveIcon = !0, table.
|
|
39770
|
+
isVtableMerge = vtableMerge, vtableMerge && (mayHaveIcon = !0, table.internalProps.groupTitleCustomLayout && (customResult = dealWithCustom(table.internalProps.groupTitleCustomLayout, void 0, range.start.col, range.start.row, table.getColsWidth(range.start.col, range.end.col), table.getRowsHeight(range.start.row, range.end.row), !1, table.isAutoRowHeight(row), [0, 0, 0, 0], range, table)), table.internalProps.groupTitleFieldFormat ? value = table.internalProps.groupTitleFieldFormat(rawRecord, col, row, table) : void 0 !== vtableMergeName && (value = vtableMergeName));
|
|
39736
39771
|
}
|
|
39737
39772
|
const cellStyle = customStyle || table._getCellStyle(range ? range.start.col : col, range ? range.start.row : row),
|
|
39738
39773
|
autoWrapText = null !== (_a = cellStyle.autoWrapText) && void 0 !== _a ? _a : table.internalProps.autoWrapText,
|
|
@@ -39761,9 +39796,12 @@
|
|
|
39761
39796
|
});
|
|
39762
39797
|
const textMark = oldCellGroup.getChildByName("text");
|
|
39763
39798
|
if (forceFastUpdate && textMark) {
|
|
39764
|
-
const
|
|
39765
|
-
|
|
39766
|
-
|
|
39799
|
+
const textAlign = cellTheme.text.textAlign,
|
|
39800
|
+
hierarchyOffset = getHierarchyOffset(col, row, table),
|
|
39801
|
+
attribute = {
|
|
39802
|
+
textBaseline: "top",
|
|
39803
|
+
dx: "left" === textAlign ? hierarchyOffset : 0
|
|
39804
|
+
};
|
|
39767
39805
|
textMark.setAttributes(cellTheme.text ? Object.assign({}, cellTheme.text, attribute) : attribute);
|
|
39768
39806
|
} else if (textMark) {
|
|
39769
39807
|
const text = table.getCellValue(col, row),
|
|
@@ -40667,7 +40705,7 @@
|
|
|
40667
40705
|
{
|
|
40668
40706
|
vtableMerge: vtableMerge
|
|
40669
40707
|
} = scene.table.getCellRawRecord(col, row) || {};
|
|
40670
|
-
if (vtableMerge && scene.table.
|
|
40708
|
+
if (vtableMerge && scene.table.internalProps.groupTitleCustomLayout) customLayout = scene.table.internalProps.groupTitleCustomLayout;else if ("body" !== cellLocation) {
|
|
40671
40709
|
const define = scene.table.getHeaderDefine(col, row);
|
|
40672
40710
|
customRender = null == define ? void 0 : define.headerCustomRender, customLayout = null == define ? void 0 : define.headerCustomLayout;
|
|
40673
40711
|
} else {
|
|
@@ -40876,7 +40914,7 @@
|
|
|
40876
40914
|
{
|
|
40877
40915
|
vtableMerge: vtableMerge
|
|
40878
40916
|
} = scene.table.getCellRawRecord(col, row) || {};
|
|
40879
|
-
if (vtableMerge && scene.table.
|
|
40917
|
+
if (vtableMerge && scene.table.internalProps.groupTitleCustomLayout) customLayout = scene.table.internalProps.groupTitleCustomLayout;else if ("body" !== cellType) {
|
|
40880
40918
|
const define = scene.table.getHeaderDefine(col, row);
|
|
40881
40919
|
customRender = null == define ? void 0 : define.headerCustomRender, customLayout = null == define ? void 0 : define.headerCustomLayout;
|
|
40882
40920
|
} else {
|
|
@@ -42098,6 +42136,51 @@
|
|
|
42098
42136
|
group.setAttribute("cornerRadius", cornerRadius), group.border && group.border.setAttribute("cornerRadius", cornerRadius);
|
|
42099
42137
|
}
|
|
42100
42138
|
|
|
42139
|
+
function getCellHoverColor(cellGroup, table) {
|
|
42140
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
42141
|
+
let colorKey, hoverStyle;
|
|
42142
|
+
if ("cell" === cellGroup.role && isValid$3(cellGroup.mergeStartCol) && isValid$3(cellGroup.mergeStartRow) && isValid$3(cellGroup.mergeEndCol) && isValid$3(cellGroup.mergeEndRow)) {
|
|
42143
|
+
const {
|
|
42144
|
+
colStart: colStart,
|
|
42145
|
+
colEnd: colEnd,
|
|
42146
|
+
rowStart: rowStart,
|
|
42147
|
+
rowEnd: rowEnd
|
|
42148
|
+
} = getCellMergeRange(cellGroup, table.scenegraph);
|
|
42149
|
+
for (let col = colStart; col <= colEnd; col++) for (let row = rowStart; row <= rowEnd; row++) {
|
|
42150
|
+
const key = isCellHover(table.stateManager, col, row, cellGroup);
|
|
42151
|
+
!key || colorKey && "cellBgColor" !== key || (colorKey = key);
|
|
42152
|
+
}
|
|
42153
|
+
} else "cell" === cellGroup.role && (colorKey = isCellHover(table.stateManager, cellGroup.col, cellGroup.row, cellGroup));
|
|
42154
|
+
if (!colorKey) return;
|
|
42155
|
+
const layout = table.internalProps.layoutMap;
|
|
42156
|
+
layout.isCornerHeader(cellGroup.col, cellGroup.row) ? hoverStyle = (null === (_a = table.theme.cornerHeaderStyle) || void 0 === _a ? void 0 : _a.hover) || (null === (_b = table.theme.headerStyle) || void 0 === _b ? void 0 : _b.hover) : layout.isColumnHeader(cellGroup.col, cellGroup.row) ? hoverStyle = null === (_c = table.theme.headerStyle) || void 0 === _c ? void 0 : _c.hover : layout.isRowHeader(cellGroup.col, cellGroup.row) ? hoverStyle = null === (_d = table.theme.rowHeaderStyle) || void 0 === _d ? void 0 : _d.hover : layout.isBottomFrozenRow(cellGroup.col, cellGroup.row) ? hoverStyle = (null === (_e = table.theme.bottomFrozenStyle) || void 0 === _e ? void 0 : _e.hover) || (table.isListTable() ? null === (_f = table.theme.bodyStyle) || void 0 === _f ? void 0 : _f.hover : null === (_g = table.theme.headerStyle) || void 0 === _g ? void 0 : _g.hover) : layout.isRightFrozenColumn(cellGroup.col, cellGroup.row) ? hoverStyle = (null === (_h = table.theme.rightFrozenStyle) || void 0 === _h ? void 0 : _h.hover) || (table.isListTable() ? null === (_j = table.theme.bodyStyle) || void 0 === _j ? void 0 : _j.hover : null === (_k = table.theme.rowHeaderStyle) || void 0 === _k ? void 0 : _k.hover) : table.isHeader(cellGroup.col, cellGroup.row) || (hoverStyle = null === (_l = table.theme.bodyStyle) || void 0 === _l ? void 0 : _l.hover);
|
|
42157
|
+
return getProp(colorKey, hoverStyle, cellGroup.col, cellGroup.row, table);
|
|
42158
|
+
}
|
|
42159
|
+
function isCellHover(state, col, row, cellGroup) {
|
|
42160
|
+
var _a;
|
|
42161
|
+
const {
|
|
42162
|
+
highlightScope: highlightScope,
|
|
42163
|
+
disableHeader: disableHeader,
|
|
42164
|
+
cellPos: cellPos
|
|
42165
|
+
} = state.hover,
|
|
42166
|
+
table = state.table,
|
|
42167
|
+
isHeader = table.isHeader(col, row);
|
|
42168
|
+
if (isHeader && disableHeader) return;
|
|
42169
|
+
let hoverMode;
|
|
42170
|
+
if (highlightScope === HighlightScope.single && cellPos.col === col && cellPos.row === row ? hoverMode = "cellBgColor" : highlightScope === HighlightScope.column && cellPos.col === col ? hoverMode = cellPos.col === col && cellPos.row === row ? "cellBgColor" : "inlineColumnBgColor" : highlightScope === HighlightScope.row && cellPos.row === row ? hoverMode = cellPos.col === col && cellPos.row === row ? "cellBgColor" : "inlineRowBgColor" : highlightScope === HighlightScope.cross && (cellPos.col === col && cellPos.row === row ? hoverMode = "cellBgColor" : cellPos.col === col ? hoverMode = "inlineColumnBgColor" : cellPos.row === row && (hoverMode = "inlineRowBgColor")), hoverMode) {
|
|
42171
|
+
let cellDisable;
|
|
42172
|
+
if (isHeader) {
|
|
42173
|
+
const define = table.getHeaderDefine(col, row);
|
|
42174
|
+
cellDisable = null == define ? void 0 : define.disableHeaderHover, cellGroup.firstChild && "axis" === cellGroup.firstChild.name && (null === (_a = table.options.hover) || void 0 === _a ? void 0 : _a.disableAxisHover) && (cellDisable = !0);
|
|
42175
|
+
} else {
|
|
42176
|
+
const define = table.getBodyColumnDefine(col, row);
|
|
42177
|
+
cellDisable = null == define ? void 0 : define.disableHover;
|
|
42178
|
+
}
|
|
42179
|
+
cellDisable && (hoverMode = void 0);
|
|
42180
|
+
}
|
|
42181
|
+
return hoverMode;
|
|
42182
|
+
}
|
|
42183
|
+
|
|
42101
42184
|
const CHART_NUMBER_TYPE = genNumberType();
|
|
42102
42185
|
class Chart extends Rect$1 {
|
|
42103
42186
|
constructor(isShareChartSpec, params) {
|
|
@@ -42128,6 +42211,7 @@
|
|
|
42128
42211
|
col: col,
|
|
42129
42212
|
row: row
|
|
42130
42213
|
} = this.parent,
|
|
42214
|
+
hoverColor = getCellHoverColor(this.parent, table),
|
|
42131
42215
|
{
|
|
42132
42216
|
x1: x1,
|
|
42133
42217
|
y1: y1,
|
|
@@ -42163,6 +42247,14 @@
|
|
|
42163
42247
|
},
|
|
42164
42248
|
afterRender(stage) {
|
|
42165
42249
|
stage.window.getContext().inuse = !1, stage.needRender = !1, chartStage.resumeRender();
|
|
42250
|
+
},
|
|
42251
|
+
afterClearScreen(drawParams) {
|
|
42252
|
+
const {
|
|
42253
|
+
context: context,
|
|
42254
|
+
layer: layer,
|
|
42255
|
+
viewBox: viewBox
|
|
42256
|
+
} = drawParams;
|
|
42257
|
+
layer.main && (context.beginPath(), context.fillStyle = hoverColor, context.rect(viewBox.x1, viewBox.y1, viewBox.x2 - viewBox.x1, viewBox.y2 - viewBox.y1), context.fill());
|
|
42166
42258
|
}
|
|
42167
42259
|
}));
|
|
42168
42260
|
const chartStage = this.activeChartInstance.getStage(),
|
|
@@ -42541,51 +42633,6 @@
|
|
|
42541
42633
|
};
|
|
42542
42634
|
AfterGifImageRenderContribution = __decorate$5([injectable()], AfterGifImageRenderContribution);
|
|
42543
42635
|
|
|
42544
|
-
function getCellHoverColor(cellGroup, table) {
|
|
42545
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
42546
|
-
let colorKey, hoverStyle;
|
|
42547
|
-
if ("cell" === cellGroup.role && isValid$3(cellGroup.mergeStartCol) && isValid$3(cellGroup.mergeStartRow) && isValid$3(cellGroup.mergeEndCol) && isValid$3(cellGroup.mergeEndRow)) {
|
|
42548
|
-
const {
|
|
42549
|
-
colStart: colStart,
|
|
42550
|
-
colEnd: colEnd,
|
|
42551
|
-
rowStart: rowStart,
|
|
42552
|
-
rowEnd: rowEnd
|
|
42553
|
-
} = getCellMergeRange(cellGroup, table.scenegraph);
|
|
42554
|
-
for (let col = colStart; col <= colEnd; col++) for (let row = rowStart; row <= rowEnd; row++) {
|
|
42555
|
-
const key = isCellHover(table.stateManager, col, row, cellGroup);
|
|
42556
|
-
!key || colorKey && "cellBgColor" !== key || (colorKey = key);
|
|
42557
|
-
}
|
|
42558
|
-
} else "cell" === cellGroup.role && (colorKey = isCellHover(table.stateManager, cellGroup.col, cellGroup.row, cellGroup));
|
|
42559
|
-
if (!colorKey) return;
|
|
42560
|
-
const layout = table.internalProps.layoutMap;
|
|
42561
|
-
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);
|
|
42562
|
-
return getProp(colorKey, hoverStyle, cellGroup.col, cellGroup.row, table);
|
|
42563
|
-
}
|
|
42564
|
-
function isCellHover(state, col, row, cellGroup) {
|
|
42565
|
-
var _a;
|
|
42566
|
-
const {
|
|
42567
|
-
highlightScope: highlightScope,
|
|
42568
|
-
disableHeader: disableHeader,
|
|
42569
|
-
cellPos: cellPos
|
|
42570
|
-
} = state.hover,
|
|
42571
|
-
table = state.table,
|
|
42572
|
-
isHeader = table.isHeader(col, row);
|
|
42573
|
-
if (isHeader && disableHeader) return;
|
|
42574
|
-
let hoverMode;
|
|
42575
|
-
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) {
|
|
42576
|
-
let cellDisable;
|
|
42577
|
-
if (isHeader) {
|
|
42578
|
-
const define = table.getHeaderDefine(col, row);
|
|
42579
|
-
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);
|
|
42580
|
-
} else {
|
|
42581
|
-
const define = table.getBodyColumnDefine(col, row);
|
|
42582
|
-
cellDisable = null == define ? void 0 : define.disableHover;
|
|
42583
|
-
}
|
|
42584
|
-
cellDisable && (hoverMode = void 0);
|
|
42585
|
-
}
|
|
42586
|
-
return hoverMode;
|
|
42587
|
-
}
|
|
42588
|
-
|
|
42589
42636
|
function getCellSelectColor(cellGroup, table) {
|
|
42590
42637
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
42591
42638
|
let colorKey, selectStyle;
|
|
@@ -43627,7 +43674,7 @@
|
|
|
43627
43674
|
vtableMergeName: vtableMergeName,
|
|
43628
43675
|
vtableMerge: vtableMerge
|
|
43629
43676
|
} = null != rawRecord ? rawRecord : {};
|
|
43630
|
-
isVtableMerge = vtableMerge, vtableMerge && (mayHaveIcon = !0, table.
|
|
43677
|
+
isVtableMerge = vtableMerge, vtableMerge && (mayHaveIcon = !0, table.internalProps.groupTitleCustomLayout && (customResult = dealWithCustom(table.internalProps.groupTitleCustomLayout, void 0, range.start.col, range.start.row, table.getColsWidth(range.start.col, range.end.col), table.getRowsHeight(range.start.row, range.end.row), !1, table.isAutoRowHeight(row), [0, 0, 0, 0], range, table)), table.internalProps.groupTitleFieldFormat ? value = table.internalProps.groupTitleFieldFormat(rawRecord, col, row, table) : void 0 !== vtableMergeName && (value = vtableMergeName));
|
|
43631
43678
|
}
|
|
43632
43679
|
const type = isVtableMerge || isCustomMerge ? "text" : null !== (_b = table.isHeader(col, row) ? null !== (_a = table._getHeaderLayoutMap(col, row).headerType) && void 0 !== _a ? _a : "text" : table.getBodyColumnType(col, row)) && void 0 !== _b ? _b : "text";
|
|
43633
43680
|
if (isPromise(value)) {
|
|
@@ -45977,7 +46024,7 @@
|
|
|
45977
46024
|
clip: !0,
|
|
45978
46025
|
pickable: !1
|
|
45979
46026
|
}), scene.tableGroup.role = "table";
|
|
45980
|
-
const colHeaderGroup = createContainerGroup(0, 0, !scene.table.
|
|
46027
|
+
const colHeaderGroup = createContainerGroup(0, 0, !scene.table.internalProps.enableTreeStickCell);
|
|
45981
46028
|
colHeaderGroup.role = "col-header", scene.colHeaderGroup = colHeaderGroup;
|
|
45982
46029
|
const cornerHeaderGroup = createContainerGroup(0, 0, !scene.table.options.enableTreeStickCell);
|
|
45983
46030
|
cornerHeaderGroup.role = "corner-header", scene.cornerHeaderGroup = cornerHeaderGroup;
|
|
@@ -47259,14 +47306,14 @@
|
|
|
47259
47306
|
scenegraph.hideHoverIcon(prevHoverCellCol, prevHoverCellRow), scenegraph.showHoverIcon(col, row), cellPosContainHeader.col = col, cellPosContainHeader.row = row;
|
|
47260
47307
|
}
|
|
47261
47308
|
if ((disableHeader && table.isHeader(col, row) || highlightScope === HighlightScope.none) && (col = -1, row = -1), prevHoverCellCol === col && prevHoverCellRow === row) return;
|
|
47262
|
-
(null === (_a = state.table.options.customConfig) || void 0 === _a ? void 0 : _a.disableBuildInChartActive) || (scenegraph.deactivateChart(prevHoverCellCol, prevHoverCellRow), scenegraph.activateChart(col, row));
|
|
47309
|
+
cellPos.col = col, cellPos.row = row, (null === (_a = state.table.options.customConfig) || void 0 === _a ? void 0 : _a.disableBuildInChartActive) || (scenegraph.deactivateChart(prevHoverCellCol, prevHoverCellRow), scenegraph.activateChart(col, row));
|
|
47263
47310
|
let updateScenegraph = !1;
|
|
47264
47311
|
const {
|
|
47265
47312
|
ranges: ranges,
|
|
47266
47313
|
highlightScope: selectMode
|
|
47267
47314
|
} = state.select;
|
|
47268
47315
|
if (-1 !== prevHoverCellCol && -1 !== prevHoverCellRow && (updateScenegraph = clearHover(scenegraph, prevHoverCellCol, prevHoverCellRow, ranges, singleStyle, highlightScope), disableHeader || scenegraph.hideHoverIcon(prevHoverCellCol, prevHoverCellRow)), -1 === col || -1 === row) return cellPos.col = -1, cellPos.row = -1, void (!updateScenegraph || prevHoverCellCol === col && prevHoverCellRow === row || state.table.scenegraph.updateNextFrame());
|
|
47269
|
-
highlightScope === HighlightScope.single ? updateScenegraph = !!updateSingleHover(scenegraph, col, row) : highlightScope === HighlightScope.row ? updateScenegraph = !!updateRowHover(scenegraph, col, row) : highlightScope === HighlightScope.column ? updateScenegraph = !!updateColHover(scenegraph, col) : highlightScope === HighlightScope.cross && (updateScenegraph = !!updateRowHover(scenegraph, col, row) , updateScenegraph = !!updateColHover(scenegraph, col) ), highlightScope === HighlightScope.none || disableHeader || scenegraph.showHoverIcon(col, row),
|
|
47316
|
+
highlightScope === HighlightScope.single ? updateScenegraph = !!updateSingleHover(scenegraph, col, row) : highlightScope === HighlightScope.row ? updateScenegraph = !!updateRowHover(scenegraph, col, row) : highlightScope === HighlightScope.column ? updateScenegraph = !!updateColHover(scenegraph, col) : highlightScope === HighlightScope.cross && (updateScenegraph = !!updateRowHover(scenegraph, col, row) , updateScenegraph = !!updateColHover(scenegraph, col) ), highlightScope === HighlightScope.none || disableHeader || scenegraph.showHoverIcon(col, row), updateScenegraph && state.table.scenegraph.updateNextFrame();
|
|
47270
47317
|
}
|
|
47271
47318
|
function clearHover(scenegraph, col, row, selectRanges, singleStyle, mode, selectMode) {
|
|
47272
47319
|
let updateScenegraph = !1;
|
|
@@ -47865,7 +47912,13 @@
|
|
|
47865
47912
|
function startMoveCol(col, row, x, y, state, event) {
|
|
47866
47913
|
var _a;
|
|
47867
47914
|
if (!("canMoveHeaderPosition" in state.table.internalProps.layoutMap)) return;
|
|
47868
|
-
state.columnMove.moving = !0, state.columnMove.colSource = col, state.columnMove.rowSource = row, state.
|
|
47915
|
+
if (state.columnMove.moving = !0, state.columnMove.colSource = col, state.columnMove.rowSource = row, state.table.isListTable()) {
|
|
47916
|
+
const nodeIndex = state.table.getRecordIndexByCell(col, row),
|
|
47917
|
+
nodeData = state.table.getRecordByCell(col, row),
|
|
47918
|
+
hierarchyState = state.table.getRecordHierarchyState(col, row);
|
|
47919
|
+
state.columnMove.rowSourceSize = computeChildrenNodeLength(nodeIndex, hierarchyState, nodeData) + 1;
|
|
47920
|
+
}
|
|
47921
|
+
state.columnMove.x = x - state.table.tableX, state.columnMove.y = y - state.table.tableY;
|
|
47869
47922
|
const cellLocation = state.table.getCellLocation(col, row),
|
|
47870
47923
|
delta = "columnHeader" === cellLocation ? state.columnMove.x : "rowHeader" === cellLocation || state.table.internalProps.layoutMap.isSeriesNumberInBody(col, row) ? state.columnMove.y : 0,
|
|
47871
47924
|
{
|
|
@@ -47904,8 +47957,14 @@
|
|
|
47904
47957
|
col: targetCell.col,
|
|
47905
47958
|
row: targetCell.row
|
|
47906
47959
|
})) {
|
|
47960
|
+
if (state.columnMove.x = x - state.table.tableX, state.columnMove.y = y - state.table.tableY, state.columnMove.colTarget = targetCell.col, state.columnMove.rowTarget = targetCell.row, state.table.isListTable()) {
|
|
47961
|
+
const nodeIndex = state.table.getRecordIndexByCell(targetCell.col, targetCell.row),
|
|
47962
|
+
nodeData = state.table.getRecordByCell(targetCell.col, targetCell.row),
|
|
47963
|
+
hierarchyState = state.table.getRecordHierarchyState(targetCell.col, targetCell.row);
|
|
47964
|
+
state.columnMove.rowTargetSize = computeChildrenNodeLength(nodeIndex, hierarchyState, nodeData) + 1;
|
|
47965
|
+
}
|
|
47907
47966
|
let lineX, backX, lineY, backY;
|
|
47908
|
-
state.
|
|
47967
|
+
state.updateCursor("grabbing");
|
|
47909
47968
|
const cellLocation = state.table.getCellLocation(state.columnMove.colSource, state.columnMove.rowSource);
|
|
47910
47969
|
"columnHeader" === cellLocation ? (backX = state.columnMove.x, lineX = state.table.isLeftFrozenColumn(col) ? state.columnMove.colTarget >= state.columnMove.colSource ? state.table.getColsWidth(0, state.columnMove.colTarget) : state.table.getColsWidth(0, state.columnMove.colTarget - 1) : state.table.isRightFrozenColumn(col) ? state.table.tableNoFrameWidth - state.table.getColsWidth(targetCell.col + 1, state.table.colCount - 1) : (state.columnMove.colTarget >= state.columnMove.colSource ? state.table.getColsWidth(0, state.columnMove.colTarget) : state.table.getColsWidth(0, state.columnMove.colTarget - 1)) - state.table.stateManager.scroll.horizontalBarPos) : ("rowHeader" === cellLocation || state.table.internalProps.layoutMap.isSeriesNumberInBody(col, row)) && (backY = state.columnMove.y, lineY = state.table.isFrozenRow(row) ? state.columnMove.rowTarget >= state.columnMove.rowSource ? state.table.getRowsHeight(0, state.columnMove.rowTarget) : state.table.getRowsHeight(0, state.columnMove.rowTarget - 1) : state.table.isBottomFrozenRow(row) ? state.table.tableNoFrameHeight - state.table.getRowsHeight(targetCell.row + 1, state.table.rowCount - 1) : (state.columnMove.rowTarget >= state.columnMove.rowSource ? state.table.getRowsHeight(0, state.columnMove.rowTarget) : state.table.getRowsHeight(0, state.columnMove.rowTarget - 1)) - state.table.stateManager.scroll.verticalBarPos), state.table.scenegraph.component.updateMoveCol(backX, lineX, backY, lineY), state.table.fireListeners(TABLE_EVENT_TYPE.CHANGING_HEADER_POSITION, {
|
|
47911
47970
|
col: col,
|
|
@@ -48145,9 +48204,9 @@
|
|
|
48145
48204
|
}
|
|
48146
48205
|
function setHeaderCheckedState(field, checked, state) {
|
|
48147
48206
|
var _a;
|
|
48148
|
-
state.headerCheckedState[field] = checked, null === (_a = state.checkedState) || void 0 === _a || _a.forEach(recordCheckState => {
|
|
48207
|
+
state.headerCheckedState[field] = checked, state.table.internalProps.enableCheckboxCascade && (null === (_a = state.checkedState) || void 0 === _a || _a.forEach(recordCheckState => {
|
|
48149
48208
|
recordCheckState[field] = checked;
|
|
48150
|
-
});
|
|
48209
|
+
}));
|
|
48151
48210
|
}
|
|
48152
48211
|
function syncCheckedState(col, row, field, checked, state) {
|
|
48153
48212
|
var _a, _b;
|
|
@@ -48163,7 +48222,7 @@
|
|
|
48163
48222
|
if (recordIndex >= 0) {
|
|
48164
48223
|
const dataIndex = state.table.dataSource.getIndexKey(recordIndex).toString();
|
|
48165
48224
|
if (isValid$3(null === (_b = state.checkedState.get(dataIndex)) || void 0 === _b ? void 0 : _b[field])) return state.checkedState.get(dataIndex)[field];
|
|
48166
|
-
if (state.checkedState.get(dataIndex)) state.checkedState.get(dataIndex)[field] = checked;else if (dataIndex.includes(",")) {
|
|
48225
|
+
if (state.checkedState.get(dataIndex)) state.checkedState.get(dataIndex)[field] = checked;else if (state.table.internalProps.enableCheckboxCascade && dataIndex.includes(",")) {
|
|
48167
48226
|
const parentDataIndex = dataIndex.split(",").slice(0, -1).join(",");
|
|
48168
48227
|
state.checkedState.has(parentDataIndex) && !0 === state.checkedState.get(parentDataIndex)[field] ? state.checkedState.set(dataIndex, {
|
|
48169
48228
|
[field]: !0
|
|
@@ -48195,12 +48254,12 @@
|
|
|
48195
48254
|
allUnChecked = !0,
|
|
48196
48255
|
hasChecked = !1;
|
|
48197
48256
|
return state.checkedState.forEach((check_state, index) => {
|
|
48198
|
-
var _a
|
|
48257
|
+
var _a;
|
|
48199
48258
|
index = index.includes(",") ? index.split(",").map(item => Number(item)) : Number(index);
|
|
48200
48259
|
const tableIndex = state.table.getTableIndexByRecordIndex(index),
|
|
48201
48260
|
mergeCell = state.table.transpose ? state.table.getCustomMerge(tableIndex, row) : state.table.getCustomMerge(col, tableIndex),
|
|
48202
48261
|
data = null === (_a = state.table.dataSource) || void 0 === _a ? void 0 : _a.get(index);
|
|
48203
|
-
mergeCell || !
|
|
48262
|
+
mergeCell || !state.table.internalProps.enableCheckboxCascade && (null == data ? void 0 : data.vtableMerge) || (!0 !== (null == check_state ? void 0 : check_state[field]) ? allChecked = !1 : (allUnChecked = !1, hasChecked = !0));
|
|
48204
48263
|
}), allChecked ? (state.headerCheckedState[field] = !0, allChecked) : allUnChecked ? (state.headerCheckedState[field] = !1, !1) : !!hasChecked && (state.headerCheckedState[field] = "indeterminate", "indeterminate");
|
|
48205
48264
|
}
|
|
48206
48265
|
function initLeftRecordsCheckState(records, state) {
|
|
@@ -48434,6 +48493,8 @@
|
|
|
48434
48493
|
colTarget: -1,
|
|
48435
48494
|
rowSource: -1,
|
|
48436
48495
|
rowTarget: -1,
|
|
48496
|
+
rowSourceSize: 0,
|
|
48497
|
+
rowTargetSize: 0,
|
|
48437
48498
|
x: 0,
|
|
48438
48499
|
y: 0,
|
|
48439
48500
|
moving: !1
|
|
@@ -48499,6 +48560,8 @@
|
|
|
48499
48560
|
colTarget: -1,
|
|
48500
48561
|
rowSource: -1,
|
|
48501
48562
|
rowTarget: -1,
|
|
48563
|
+
rowSourceSize: 0,
|
|
48564
|
+
rowTargetSize: 0,
|
|
48502
48565
|
x: 0,
|
|
48503
48566
|
y: 0,
|
|
48504
48567
|
moving: !1
|
|
@@ -49394,28 +49457,44 @@
|
|
|
49394
49457
|
}
|
|
49395
49458
|
|
|
49396
49459
|
function fireMoveColEventListeners(table, endMoveColSuccess, e) {
|
|
49397
|
-
var _a, _b, _c, _d;
|
|
49398
|
-
endMoveColSuccess && -1 !== (null === (_a = table.stateManager.columnMove) || void 0 === _a ? void 0 : _a.colSource) && -1 !== (null === (_b = table.stateManager.columnMove) || void 0 === _b ? void 0 : _b.rowSource) && -1 !== (null === (_c = table.stateManager.columnMove) || void 0 === _c ? void 0 : _c.colTarget) && -1 !== (null === (_d = table.stateManager.columnMove) || void 0 === _d ? void 0 : _d.rowTarget)
|
|
49399
|
-
|
|
49400
|
-
|
|
49401
|
-
|
|
49402
|
-
|
|
49403
|
-
|
|
49404
|
-
|
|
49405
|
-
|
|
49406
|
-
|
|
49407
|
-
|
|
49408
|
-
|
|
49409
|
-
|
|
49410
|
-
|
|
49411
|
-
|
|
49412
|
-
|
|
49413
|
-
|
|
49414
|
-
|
|
49415
|
-
|
|
49416
|
-
|
|
49417
|
-
|
|
49418
|
-
|
|
49460
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
49461
|
+
if (endMoveColSuccess && -1 !== (null === (_a = table.stateManager.columnMove) || void 0 === _a ? void 0 : _a.colSource) && -1 !== (null === (_b = table.stateManager.columnMove) || void 0 === _b ? void 0 : _b.rowSource) && -1 !== (null === (_c = table.stateManager.columnMove) || void 0 === _c ? void 0 : _c.colTarget) && -1 !== (null === (_d = table.stateManager.columnMove) || void 0 === _d ? void 0 : _d.rowTarget)) {
|
|
49462
|
+
if (table.hasListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION)) {
|
|
49463
|
+
const {
|
|
49464
|
+
colSource: colSource,
|
|
49465
|
+
rowSource: rowSource,
|
|
49466
|
+
colTarget: colTarget,
|
|
49467
|
+
rowTarget: rowTarget
|
|
49468
|
+
} = table.stateManager.columnMove,
|
|
49469
|
+
rowSourceSize = null !== (_e = table.stateManager.columnMove.rowSourceSize) && void 0 !== _e ? _e : 0,
|
|
49470
|
+
rowTargetSize = null !== (_f = table.stateManager.columnMove.rowTargetSize) && void 0 !== _f ? _f : 0;
|
|
49471
|
+
table.fireListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION, {
|
|
49472
|
+
target: {
|
|
49473
|
+
col: colTarget,
|
|
49474
|
+
row: rowTarget + rowTargetSize - rowSourceSize
|
|
49475
|
+
},
|
|
49476
|
+
source: {
|
|
49477
|
+
col: colSource,
|
|
49478
|
+
row: rowSource
|
|
49479
|
+
},
|
|
49480
|
+
event: e
|
|
49481
|
+
});
|
|
49482
|
+
}
|
|
49483
|
+
} else if (!endMoveColSuccess && table.hasListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION_FAIL)) {
|
|
49484
|
+
const rowSourceSize = null !== (_g = table.stateManager.columnMove.rowSourceSize) && void 0 !== _g ? _g : 0,
|
|
49485
|
+
rowTargetSize = null !== (_h = table.stateManager.columnMove.rowTargetSize) && void 0 !== _h ? _h : 0;
|
|
49486
|
+
table.fireListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION_FAIL, {
|
|
49487
|
+
target: {
|
|
49488
|
+
col: table.stateManager.columnMove.colTarget,
|
|
49489
|
+
row: table.stateManager.columnMove.rowTarget + rowTargetSize - rowSourceSize
|
|
49490
|
+
},
|
|
49491
|
+
source: {
|
|
49492
|
+
col: table.stateManager.columnMove.colSource,
|
|
49493
|
+
row: table.stateManager.columnMove.rowSource
|
|
49494
|
+
},
|
|
49495
|
+
event: e
|
|
49496
|
+
});
|
|
49497
|
+
}
|
|
49419
49498
|
}
|
|
49420
49499
|
|
|
49421
49500
|
function bindTableGroupListener(eventManager) {
|
|
@@ -49762,10 +49841,10 @@
|
|
|
49762
49841
|
checked: e.detail.checked
|
|
49763
49842
|
});
|
|
49764
49843
|
if (table.isHeader(col, row)) {
|
|
49765
|
-
table.stateManager.setHeaderCheckedState(cellInfo.field, e.detail.checked)
|
|
49766
|
-
|
|
49767
|
-
|
|
49768
|
-
|
|
49844
|
+
if (table.stateManager.setHeaderCheckedState(cellInfo.field, e.detail.checked), table.internalProps.enableCheckboxCascade) {
|
|
49845
|
+
"checkbox" === table.getCellType(col, row) && table.scenegraph.updateCheckboxCellState(col, row, e.detail.checked);
|
|
49846
|
+
}
|
|
49847
|
+
} else if (table.stateManager.setCheckedState(col, row, cellInfo.field, e.detail.checked), table.internalProps.enableCheckboxCascade) {
|
|
49769
49848
|
if ("checkbox" === table.getCellType(col, row)) {
|
|
49770
49849
|
const oldHeaderCheckedState = table.stateManager.headerCheckedState[cellInfo.field],
|
|
49771
49850
|
newHeaderCheckedState = table.stateManager.updateHeaderCheckedState(cellInfo.field, col, row);
|
|
@@ -50538,20 +50617,20 @@
|
|
|
50538
50617
|
|
|
50539
50618
|
function bindGroupTitleCheckboxChange(table) {
|
|
50540
50619
|
table.on("checkbox_state_change", args => {
|
|
50541
|
-
var _a
|
|
50620
|
+
var _a;
|
|
50542
50621
|
const {
|
|
50543
50622
|
col: col,
|
|
50544
50623
|
row: row,
|
|
50545
50624
|
checked: checked,
|
|
50546
50625
|
field: field
|
|
50547
50626
|
} = args;
|
|
50548
|
-
if (!table.internalProps.layoutMap.isSeriesNumber(col, row) || !0 !==
|
|
50627
|
+
if (!table.internalProps.layoutMap.isSeriesNumber(col, row) || !0 !== table.internalProps.enableCheckboxCascade) return;
|
|
50549
50628
|
if (table.isHeader(col, row)) return;
|
|
50550
50629
|
const record = table.getCellOriginRecord(col, row),
|
|
50551
50630
|
indexedData = table.dataSource.currentPagerIndexedData,
|
|
50552
50631
|
titleShowIndex = table.getRecordShowIndexByCell(col, row);
|
|
50553
50632
|
let titleIndex = indexedData[titleShowIndex];
|
|
50554
|
-
if (isNumber$4(titleIndex) && (titleIndex = [titleIndex]), record.vtableMerge || (null === (
|
|
50633
|
+
if (isNumber$4(titleIndex) && (titleIndex = [titleIndex]), record.vtableMerge || (null === (_a = record.children) || void 0 === _a ? void 0 : _a.length)) {
|
|
50555
50634
|
if (checked) getHierarchyState(table, col, row) === HierarchyState.collapse ? updateChildrenCheckboxState(!0, titleIndex, table, field) : setAllChildrenCheckboxState(!0, titleShowIndex, titleIndex, indexedData, table, col), updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table, col);else {
|
|
50556
50635
|
getHierarchyState(table, col, row) === HierarchyState.collapse ? updateChildrenCheckboxState(!1, titleIndex, table, field) : setAllChildrenCheckboxState(!1, titleShowIndex, titleIndex, indexedData, table, col), updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table, col);
|
|
50557
50636
|
const oldHeaderCheckedState = table.stateManager.headerCheckedState._vtable_rowSeries_number,
|
|
@@ -50562,7 +50641,7 @@
|
|
|
50562
50641
|
});
|
|
50563
50642
|
}
|
|
50564
50643
|
function bindGroupCheckboxTreeChange(table) {
|
|
50565
|
-
table.on("checkbox_state_change", args => {
|
|
50644
|
+
!0 === table.internalProps.enableCheckboxCascade && table.on("checkbox_state_change", args => {
|
|
50566
50645
|
var _a;
|
|
50567
50646
|
const {
|
|
50568
50647
|
col: col,
|
|
@@ -50671,7 +50750,7 @@
|
|
|
50671
50750
|
});
|
|
50672
50751
|
}
|
|
50673
50752
|
function bindHeaderCheckboxChange(table) {
|
|
50674
|
-
table.on("checkbox_state_change", args => {
|
|
50753
|
+
!0 === table.internalProps.enableCheckboxCascade && table.on("checkbox_state_change", args => {
|
|
50675
50754
|
const {
|
|
50676
50755
|
col: col,
|
|
50677
50756
|
row: row,
|
|
@@ -50871,7 +50950,7 @@
|
|
|
50871
50950
|
const {
|
|
50872
50951
|
eventArgs: eventArgs
|
|
50873
50952
|
} = eventArgsSet;
|
|
50874
|
-
if (this.table.
|
|
50953
|
+
if (this.table.internalProps.enableTreeStickCell && !eventArgs) return !1;
|
|
50875
50954
|
const resizeCol = this.table.scenegraph.getResizeColAt(eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y, null == eventArgs ? void 0 : eventArgs.targetCell);
|
|
50876
50955
|
return this.table._canResizeColumn(resizeCol.col, resizeCol.row) && resizeCol.col >= 0 ? (update && this.table.stateManager.startResizeCol(resizeCol.col, eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y, resizeCol.rightFrozen), !0) : (this.table.stateManager.isResizeCol() && this.table.stateManager.endResizeCol(), !1);
|
|
50877
50956
|
}
|
|
@@ -52487,7 +52566,7 @@
|
|
|
52487
52566
|
return count;
|
|
52488
52567
|
}
|
|
52489
52568
|
function checkHasTreeDefine(layoutMap) {
|
|
52490
|
-
if (layoutMap._table.
|
|
52569
|
+
if (layoutMap._table.internalProps.groupBy) return !0;
|
|
52491
52570
|
const {
|
|
52492
52571
|
columns: columns
|
|
52493
52572
|
} = layoutMap._table.options;
|
|
@@ -53630,58 +53709,65 @@
|
|
|
53630
53709
|
return TABLE_EVENT_TYPE;
|
|
53631
53710
|
}
|
|
53632
53711
|
constructor(container, options = {}) {
|
|
53633
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
53634
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.19.4-alpha.
|
|
53712
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
53713
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.19.4-alpha.2", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
|
|
53635
53714
|
this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
|
|
53636
53715
|
options: options,
|
|
53637
53716
|
container: container
|
|
53638
53717
|
}), container = options.container && options.container instanceof HTMLElement ? options.container : container, !1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vglobal.isImageAnonymous = !1);
|
|
53639
53718
|
const {
|
|
53640
|
-
|
|
53641
|
-
|
|
53642
|
-
|
|
53643
|
-
|
|
53644
|
-
|
|
53645
|
-
|
|
53646
|
-
|
|
53647
|
-
|
|
53648
|
-
|
|
53649
|
-
|
|
53650
|
-
|
|
53651
|
-
|
|
53652
|
-
|
|
53653
|
-
|
|
53654
|
-
|
|
53655
|
-
|
|
53656
|
-
|
|
53657
|
-
|
|
53658
|
-
|
|
53659
|
-
|
|
53660
|
-
|
|
53661
|
-
|
|
53662
|
-
|
|
53663
|
-
|
|
53664
|
-
|
|
53665
|
-
|
|
53666
|
-
|
|
53667
|
-
|
|
53668
|
-
|
|
53669
|
-
|
|
53670
|
-
|
|
53671
|
-
|
|
53672
|
-
|
|
53673
|
-
|
|
53674
|
-
|
|
53675
|
-
|
|
53676
|
-
|
|
53677
|
-
|
|
53678
|
-
|
|
53679
|
-
|
|
53680
|
-
|
|
53681
|
-
|
|
53682
|
-
|
|
53683
|
-
|
|
53684
|
-
|
|
53719
|
+
frozenColCount = 0,
|
|
53720
|
+
unfreezeAllOnExceedsMaxWidth: unfreezeAllOnExceedsMaxWidth,
|
|
53721
|
+
frozenRowCount: frozenRowCount,
|
|
53722
|
+
defaultRowHeight = 40,
|
|
53723
|
+
defaultHeaderRowHeight: defaultHeaderRowHeight,
|
|
53724
|
+
defaultColWidth = 80,
|
|
53725
|
+
defaultHeaderColWidth: defaultHeaderColWidth,
|
|
53726
|
+
widthMode = "standard",
|
|
53727
|
+
heightMode = "standard",
|
|
53728
|
+
autoFillWidth = !1,
|
|
53729
|
+
autoFillHeight = !1,
|
|
53730
|
+
containerFit = {
|
|
53731
|
+
width: !1,
|
|
53732
|
+
height: !1
|
|
53733
|
+
},
|
|
53734
|
+
widthAdaptiveMode = "only-body",
|
|
53735
|
+
heightAdaptiveMode = "only-body",
|
|
53736
|
+
keyboardOptions: keyboardOptions,
|
|
53737
|
+
eventOptions: eventOptions,
|
|
53738
|
+
rowSeriesNumber: rowSeriesNumber,
|
|
53739
|
+
enableCheckboxCascade: enableCheckboxCascade,
|
|
53740
|
+
columnResizeMode: columnResizeMode,
|
|
53741
|
+
rowResizeMode = "none",
|
|
53742
|
+
resize: resize,
|
|
53743
|
+
dragHeaderMode: dragHeaderMode,
|
|
53744
|
+
dragOrder: dragOrder,
|
|
53745
|
+
showFrozenIcon: showFrozenIcon,
|
|
53746
|
+
allowFrozenColCount: allowFrozenColCount,
|
|
53747
|
+
padding: padding,
|
|
53748
|
+
hover: hover,
|
|
53749
|
+
menu: menu,
|
|
53750
|
+
select: click,
|
|
53751
|
+
customRender: customRender,
|
|
53752
|
+
pixelRatio = defaultPixelRatio,
|
|
53753
|
+
renderChartAsync: renderChartAsync,
|
|
53754
|
+
renderChartAsyncBatchCount: renderChartAsyncBatchCount,
|
|
53755
|
+
mode: mode,
|
|
53756
|
+
modeParams: modeParams,
|
|
53757
|
+
canvasWidth: canvasWidth,
|
|
53758
|
+
canvasHeight: canvasHeight,
|
|
53759
|
+
overscrollBehavior: overscrollBehavior,
|
|
53760
|
+
limitMinWidth: limitMinWidth,
|
|
53761
|
+
limitMinHeight: limitMinHeight,
|
|
53762
|
+
clearDOM = !0
|
|
53763
|
+
} = options,
|
|
53764
|
+
{
|
|
53765
|
+
groupConfig: groupConfig,
|
|
53766
|
+
groupBy: groupBy,
|
|
53767
|
+
groupTitleFieldFormat: groupTitleFieldFormat,
|
|
53768
|
+
groupTitleCustomLayout: groupTitleCustomLayout,
|
|
53769
|
+
enableTreeStickCell: enableTreeStickCell
|
|
53770
|
+
} = options;
|
|
53685
53771
|
this.container = container, this.options = options, this._widthMode = widthMode, this._heightMode = heightMode, this._widthAdaptiveMode = widthAdaptiveMode, this._heightAdaptiveMode = heightAdaptiveMode, this._autoFillWidth = autoFillWidth, this._autoFillHeight = autoFillHeight, void 0 !== containerFit && (this._containerFit = "boolean" == typeof containerFit ? {
|
|
53686
53772
|
width: containerFit,
|
|
53687
53773
|
height: containerFit
|
|
@@ -53698,7 +53784,7 @@
|
|
|
53698
53784
|
bottom: 0
|
|
53699
53785
|
}, padding && ("number" == typeof padding ? (this.padding.top = padding, this.padding.left = padding, this.padding.bottom = padding, this.padding.right = padding) : (padding.top && (this.padding.top = padding.top), padding.bottom && (this.padding.bottom = padding.bottom), padding.left && (this.padding.left = padding.left), padding.right && (this.padding.right = padding.right))), (isValid$3(canvasHeight) || isValid$3(canvasWidth)) && (this.canvasSizeSeted = !0), this.tableNoFrameWidth = 0, this.tableNoFrameHeight = 0, this.canvasWidth = isNumber$4(canvasWidth) ? canvasWidth : void 0, this.canvasHeight = isNumber$4(canvasHeight) ? canvasHeight : void 0, this.columnWidthComputeMode = null !== (_d = options.columnWidthComputeMode) && void 0 !== _d ? _d : "normal";
|
|
53700
53786
|
const internalProps = this.internalProps = {};
|
|
53701
|
-
void 0 !== showFrozenIcon && (this.showFrozenIcon = showFrozenIcon), "number" == typeof allowFrozenColCount && allowFrozenColCount <= 0 && (this.showFrozenIcon = !1), this.options.canvas ? ("node" !== Env.mode && (internalProps.element = this.options.canvas.parentElement, internalProps.element.style.position = "relative"), internalProps.focusControl = new FocusInput(this, internalProps.element), internalProps.canvas = this.options.canvas, internalProps.context = internalProps.canvas.getContext("2d")) : "node" !== Env.mode && (internalProps.element = createRootElement(this.padding), internalProps.focusControl = new FocusInput(this, internalProps.element), internalProps.canvas = document.createElement("canvas"), internalProps.element.appendChild(internalProps.canvas), internalProps.context = internalProps.canvas.getContext("2d"), (null === (_e = options.customConfig) || void 0 === _e ? void 0 : _e.createReactContainer) && createReactContainer(this)), internalProps.handler = new EventHandler(), isNumber$4(this.options.resizeTime) && (internalProps.handler.resizeTime = this.options.resizeTime), internalProps.pixelRatio = pixelRatio, internalProps.frozenColCount = frozenColCount, internalProps.frozenRowCount = frozenRowCount, internalProps.unfreezeAllOnExceedsMaxWidth = null == unfreezeAllOnExceedsMaxWidth || unfreezeAllOnExceedsMaxWidth, internalProps.defaultRowHeight = defaultRowHeight, internalProps.defaultHeaderRowHeight = null != defaultHeaderRowHeight ? defaultHeaderRowHeight : defaultRowHeight, internalProps.defaultColWidth = defaultColWidth, internalProps.defaultHeaderColWidth = null != defaultHeaderColWidth ? defaultHeaderColWidth : defaultColWidth, internalProps.keyboardOptions = keyboardOptions, internalProps.eventOptions = eventOptions, internalProps.rowSeriesNumber = rowSeriesNumber, internalProps.enableCheckboxCascade = enableCheckboxCascade, internalProps.columnResizeMode = null !== (
|
|
53787
|
+
void 0 !== showFrozenIcon && (this.showFrozenIcon = showFrozenIcon), "number" == typeof allowFrozenColCount && allowFrozenColCount <= 0 && (this.showFrozenIcon = !1), this.options.canvas ? ("node" !== Env.mode && (internalProps.element = this.options.canvas.parentElement, internalProps.element.style.position = "relative"), internalProps.focusControl = new FocusInput(this, internalProps.element), internalProps.canvas = this.options.canvas, internalProps.context = internalProps.canvas.getContext("2d")) : "node" !== Env.mode && (internalProps.element = createRootElement(this.padding), internalProps.focusControl = new FocusInput(this, internalProps.element), internalProps.canvas = document.createElement("canvas"), internalProps.element.appendChild(internalProps.canvas), internalProps.context = internalProps.canvas.getContext("2d"), (null === (_e = options.customConfig) || void 0 === _e ? void 0 : _e.createReactContainer) && createReactContainer(this)), internalProps.handler = new EventHandler(), isNumber$4(this.options.resizeTime) && (internalProps.handler.resizeTime = this.options.resizeTime), internalProps.pixelRatio = pixelRatio, internalProps.frozenColCount = frozenColCount, internalProps.frozenRowCount = frozenRowCount, internalProps.unfreezeAllOnExceedsMaxWidth = null == unfreezeAllOnExceedsMaxWidth || unfreezeAllOnExceedsMaxWidth, internalProps.defaultRowHeight = defaultRowHeight, internalProps.defaultHeaderRowHeight = null != defaultHeaderRowHeight ? defaultHeaderRowHeight : defaultRowHeight, internalProps.defaultColWidth = defaultColWidth, internalProps.defaultHeaderColWidth = null != defaultHeaderColWidth ? defaultHeaderColWidth : defaultColWidth, internalProps.keyboardOptions = keyboardOptions, internalProps.eventOptions = eventOptions, internalProps.rowSeriesNumber = rowSeriesNumber, internalProps.enableCheckboxCascade = null === (_f = null != enableCheckboxCascade ? enableCheckboxCascade : null == rowSeriesNumber ? void 0 : rowSeriesNumber.enableTreeCheckbox) || void 0 === _f || _f, internalProps.columnResizeMode = null !== (_g = null == resize ? void 0 : resize.columnResizeMode) && void 0 !== _g ? _g : columnResizeMode, internalProps.rowResizeMode = null !== (_h = null == resize ? void 0 : resize.rowResizeMode) && void 0 !== _h ? _h : rowResizeMode, internalProps.dragHeaderMode = null !== (_k = null !== (_j = null == dragOrder ? void 0 : dragOrder.dragHeaderMode) && void 0 !== _j ? _j : dragHeaderMode) && void 0 !== _k ? _k : "none", internalProps.renderChartAsync = renderChartAsync, setBatchRenderChartCount(renderChartAsyncBatchCount), internalProps.overscrollBehavior = null != overscrollBehavior ? overscrollBehavior : "auto", internalProps.groupBy = null !== (_l = null == groupConfig ? void 0 : groupConfig.groupBy) && void 0 !== _l ? _l : groupBy, internalProps.titleCheckbox = null == groupConfig ? void 0 : groupConfig.titleCheckbox, internalProps.groupTitleFieldFormat = null !== (_m = null == groupConfig ? void 0 : groupConfig.titleFieldFormat) && void 0 !== _m ? _m : groupTitleFieldFormat, internalProps.groupTitleCustomLayout = null !== (_o = null == groupConfig ? void 0 : groupConfig.titleCustomLayout) && void 0 !== _o ? _o : groupTitleCustomLayout, internalProps.enableTreeStickCell = null !== (_p = null == groupConfig ? void 0 : groupConfig.enableTreeStickCell) && void 0 !== _p ? _p : enableTreeStickCell, internalProps._rowHeightsMap = new NumberRangeMap(this), internalProps._rowRangeHeightsMap = new Map(), internalProps._colRangeWidthsMap = new Map(), internalProps._widthResizedColMap = new Set(), internalProps._heightResizedRowMap = new Set(), this.colWidthsMap = new NumberMap(), this.colContentWidthsMap = new NumberMap(), this.colWidthsLimit = {};
|
|
53702
53788
|
const that = this;
|
|
53703
53789
|
if (internalProps.calcWidthContext = {
|
|
53704
53790
|
_: internalProps,
|
|
@@ -53706,7 +53792,7 @@
|
|
|
53706
53792
|
var _a;
|
|
53707
53793
|
return "node" === Env.mode ? that.canvasWidth / (null != pixelRatio ? pixelRatio : 1) : this._.canvas.width / (null !== (_a = this._.context.pixelRatio) && void 0 !== _a ? _a : window.devicePixelRatio);
|
|
53708
53794
|
}
|
|
53709
|
-
}, internalProps.cellTextOverflows = {}, internalProps.focusedTable = !1, internalProps.theme = themes.of(null !== (
|
|
53795
|
+
}, internalProps.cellTextOverflows = {}, internalProps.focusedTable = !1, internalProps.theme = themes.of(null !== (_q = options.theme) && void 0 !== _q ? _q : themes.DEFAULT), internalProps.theme.isPivot = this.isPivotTable(), setIconColor(internalProps.theme.functionalIconsStyle), container ? (clearDOM && (container.innerHTML = ""), container.appendChild(internalProps.element), this._updateSize()) : this._updateSize(), internalProps.bodyHelper = new BodyHelper(this), internalProps.headerHelper = new HeaderHelper(this), internalProps.rowSeriesNumberHelper = new RowSeriesNumberHelper(this), internalProps.autoWrapText = options.autoWrapText, internalProps.enableLineBreak = options.enableLineBreak, internalProps.allowFrozenColCount = null !== (_r = options.allowFrozenColCount) && void 0 !== _r ? _r : 0, internalProps.limitMaxAutoWidth = null !== (_s = options.limitMaxAutoWidth) && void 0 !== _s ? _s : 450, internalProps.limitMinWidth = null != limitMinWidth ? "number" == typeof limitMinWidth ? limitMinWidth : limitMinWidth ? 10 : 0 : 10, internalProps.limitMinHeight = null != limitMinHeight ? "number" == typeof limitMinHeight ? limitMinHeight : limitMinHeight ? 10 : 0 : 10, this.scenegraph = new Scenegraph(this), this.stateManager = new StateManager(this), this.eventManager = new EventManager(this), this.animationManager = new TableAnimationManager(this), options.legends) {
|
|
53710
53796
|
internalProps.legends = [];
|
|
53711
53797
|
const createLegend = Factory.getFunction("createLegend");
|
|
53712
53798
|
if (Array.isArray(options.legends)) {
|
|
@@ -53732,7 +53818,7 @@
|
|
|
53732
53818
|
}
|
|
53733
53819
|
if (internalProps.menu = Object.assign({
|
|
53734
53820
|
renderMode: "html"
|
|
53735
|
-
}, options.menu), Array.isArray(null === (
|
|
53821
|
+
}, options.menu), Array.isArray(null === (_t = options.menu) || void 0 === _t ? void 0 : _t.dropDownMenuHighlight) && this.setDropDownMenuHighlight(null === (_u = options.menu) || void 0 === _u ? void 0 : _u.dropDownMenuHighlight), (Array.isArray(null === (_v = options.menu) || void 0 === _v ? void 0 : _v.defaultHeaderMenuItems) || "function" == typeof (null === (_w = options.menu) || void 0 === _w ? void 0 : _w.defaultHeaderMenuItems)) && (this.globalDropDownMenu = options.menu.defaultHeaderMenuItems), "html" === internalProps.menu.renderMode) {
|
|
53736
53822
|
const MenuHandler = Factory.getComponent("menuHandler");
|
|
53737
53823
|
internalProps.menuHandler = new MenuHandler(this);
|
|
53738
53824
|
}
|
|
@@ -53740,7 +53826,7 @@
|
|
|
53740
53826
|
changedCells: new Map()
|
|
53741
53827
|
}, internalProps.customMergeCell = getCustomMergeCellFunc(options.customMergeCell);
|
|
53742
53828
|
const CustomCellStylePlugin = Factory.getComponent("customCellStylePlugin");
|
|
53743
|
-
CustomCellStylePlugin && (this.customCellStylePlugin = new CustomCellStylePlugin(this, null !== (
|
|
53829
|
+
CustomCellStylePlugin && (this.customCellStylePlugin = new CustomCellStylePlugin(this, null !== (_x = options.customCellStyle) && void 0 !== _x ? _x : [], null !== (_y = options.customCellStyleArrangement) && void 0 !== _y ? _y : [])), this._adjustCanvasSizeByOption();
|
|
53744
53830
|
}
|
|
53745
53831
|
_adjustCanvasSizeByOption() {
|
|
53746
53832
|
"auto" !== this.options.canvasHeight && "auto" !== this.options.canvasWidth || setTimeout(() => {
|
|
@@ -54517,47 +54603,54 @@
|
|
|
54517
54603
|
return super.fireListeners(type, event);
|
|
54518
54604
|
}
|
|
54519
54605
|
updateOption(options) {
|
|
54520
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
54606
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1;
|
|
54521
54607
|
null === (_a = this.editorManager) || void 0 === _a || _a.cancelEdit(), this.options = options, this._hasAutoImageColumn = void 0;
|
|
54522
54608
|
const {
|
|
54523
|
-
|
|
54524
|
-
|
|
54525
|
-
|
|
54526
|
-
|
|
54527
|
-
|
|
54528
|
-
|
|
54529
|
-
|
|
54530
|
-
|
|
54531
|
-
|
|
54532
|
-
|
|
54533
|
-
|
|
54534
|
-
|
|
54535
|
-
|
|
54536
|
-
|
|
54537
|
-
|
|
54538
|
-
|
|
54539
|
-
|
|
54540
|
-
|
|
54541
|
-
|
|
54542
|
-
|
|
54543
|
-
|
|
54544
|
-
|
|
54545
|
-
|
|
54546
|
-
|
|
54547
|
-
|
|
54548
|
-
|
|
54549
|
-
|
|
54550
|
-
|
|
54551
|
-
|
|
54552
|
-
|
|
54553
|
-
|
|
54554
|
-
|
|
54555
|
-
|
|
54556
|
-
|
|
54557
|
-
|
|
54558
|
-
|
|
54559
|
-
|
|
54560
|
-
|
|
54609
|
+
frozenColCount = 0,
|
|
54610
|
+
unfreezeAllOnExceedsMaxWidth: unfreezeAllOnExceedsMaxWidth,
|
|
54611
|
+
defaultRowHeight = 40,
|
|
54612
|
+
defaultHeaderRowHeight: defaultHeaderRowHeight,
|
|
54613
|
+
defaultColWidth = 80,
|
|
54614
|
+
defaultHeaderColWidth = 80,
|
|
54615
|
+
keyboardOptions: keyboardOptions,
|
|
54616
|
+
eventOptions: eventOptions,
|
|
54617
|
+
rowSeriesNumber: rowSeriesNumber,
|
|
54618
|
+
enableCheckboxCascade: enableCheckboxCascade,
|
|
54619
|
+
columnResizeMode: columnResizeMode,
|
|
54620
|
+
rowResizeMode = "none",
|
|
54621
|
+
resize: resize,
|
|
54622
|
+
dragHeaderMode: dragHeaderMode,
|
|
54623
|
+
dragOrder: dragOrder,
|
|
54624
|
+
showFrozenIcon: showFrozenIcon,
|
|
54625
|
+
allowFrozenColCount: allowFrozenColCount,
|
|
54626
|
+
padding: padding,
|
|
54627
|
+
hover: hover,
|
|
54628
|
+
menu: menu,
|
|
54629
|
+
select: click,
|
|
54630
|
+
pixelRatio: pixelRatio,
|
|
54631
|
+
widthMode: widthMode,
|
|
54632
|
+
heightMode: heightMode,
|
|
54633
|
+
autoFillWidth: autoFillWidth,
|
|
54634
|
+
autoFillHeight: autoFillHeight,
|
|
54635
|
+
containerFit: containerFit,
|
|
54636
|
+
widthAdaptiveMode: widthAdaptiveMode,
|
|
54637
|
+
heightAdaptiveMode: heightAdaptiveMode,
|
|
54638
|
+
customRender: customRender,
|
|
54639
|
+
renderChartAsync: renderChartAsync,
|
|
54640
|
+
renderChartAsyncBatchCount: renderChartAsyncBatchCount,
|
|
54641
|
+
canvasWidth: canvasWidth,
|
|
54642
|
+
canvasHeight: canvasHeight,
|
|
54643
|
+
overscrollBehavior: overscrollBehavior,
|
|
54644
|
+
limitMinWidth: limitMinWidth,
|
|
54645
|
+
limitMinHeight: limitMinHeight
|
|
54646
|
+
} = options,
|
|
54647
|
+
{
|
|
54648
|
+
groupConfig: groupConfig,
|
|
54649
|
+
groupBy: groupBy,
|
|
54650
|
+
groupTitleFieldFormat: groupTitleFieldFormat,
|
|
54651
|
+
groupTitleCustomLayout: groupTitleCustomLayout,
|
|
54652
|
+
enableTreeStickCell: enableTreeStickCell
|
|
54653
|
+
} = options;
|
|
54561
54654
|
pixelRatio && pixelRatio !== this.internalProps.pixelRatio && (this.internalProps.pixelRatio = pixelRatio), padding && ("number" == typeof padding ? (this.padding.top = padding, this.padding.left = padding, this.padding.bottom = padding, this.padding.right = padding) : (padding.top && (this.padding.top = padding.top), padding.bottom && (this.padding.bottom = padding.bottom), padding.left && (this.padding.left = padding.left), padding.right && (this.padding.right = padding.right))), this.showFrozenIcon = "boolean" != typeof showFrozenIcon || showFrozenIcon, "number" == typeof allowFrozenColCount && allowFrozenColCount <= 0 && (this.showFrozenIcon = !1), this.widthMode = null != widthMode ? widthMode : "standard", this.heightMode = null != heightMode ? heightMode : "standard", this._widthAdaptiveMode = null != widthAdaptiveMode ? widthAdaptiveMode : "only-body", this._heightAdaptiveMode = null != heightAdaptiveMode ? heightAdaptiveMode : "only-body", this.autoFillWidth = null != autoFillWidth && autoFillWidth, this.autoFillHeight = null != autoFillHeight && autoFillHeight, void 0 !== containerFit && (this._containerFit = "boolean" == typeof containerFit ? {
|
|
54562
54655
|
width: containerFit,
|
|
54563
54656
|
height: containerFit
|
|
@@ -54569,9 +54662,9 @@
|
|
|
54569
54662
|
height: !1
|
|
54570
54663
|
}), this.customRender = customRender, this.canvasWidth = isNumber$4(canvasWidth) ? canvasWidth : void 0, this.canvasHeight = isNumber$4(canvasHeight) ? canvasHeight : void 0;
|
|
54571
54664
|
const internalProps = this.internalProps;
|
|
54572
|
-
if ("node" === Env.mode || options.canvas || updateRootElementPadding(internalProps.element, this.padding), this.columnWidthComputeMode = null !== (_d = options.columnWidthComputeMode) && void 0 !== _d ? _d : "normal", internalProps.frozenColCount = frozenColCount, internalProps.unfreezeAllOnExceedsMaxWidth = null == unfreezeAllOnExceedsMaxWidth || unfreezeAllOnExceedsMaxWidth, internalProps.defaultRowHeight = defaultRowHeight, internalProps.defaultHeaderRowHeight = null != defaultHeaderRowHeight ? defaultHeaderRowHeight : defaultRowHeight, internalProps.defaultColWidth = defaultColWidth, internalProps.defaultHeaderColWidth = null != defaultHeaderColWidth ? defaultHeaderColWidth : defaultColWidth, internalProps.keyboardOptions = keyboardOptions, internalProps.eventOptions = eventOptions, internalProps.rowSeriesNumber = rowSeriesNumber, internalProps.enableCheckboxCascade = enableCheckboxCascade, internalProps.columnResizeMode = null !== (
|
|
54665
|
+
if ("node" === Env.mode || options.canvas || updateRootElementPadding(internalProps.element, this.padding), this.columnWidthComputeMode = null !== (_d = options.columnWidthComputeMode) && void 0 !== _d ? _d : "normal", internalProps.frozenColCount = frozenColCount, internalProps.unfreezeAllOnExceedsMaxWidth = null == unfreezeAllOnExceedsMaxWidth || unfreezeAllOnExceedsMaxWidth, internalProps.defaultRowHeight = defaultRowHeight, internalProps.defaultHeaderRowHeight = null != defaultHeaderRowHeight ? defaultHeaderRowHeight : defaultRowHeight, internalProps.defaultColWidth = defaultColWidth, internalProps.defaultHeaderColWidth = null != defaultHeaderColWidth ? defaultHeaderColWidth : defaultColWidth, internalProps.keyboardOptions = keyboardOptions, internalProps.eventOptions = eventOptions, internalProps.rowSeriesNumber = rowSeriesNumber, internalProps.enableCheckboxCascade = null === (_e = null != enableCheckboxCascade ? enableCheckboxCascade : null == rowSeriesNumber ? void 0 : rowSeriesNumber.enableTreeCheckbox) || void 0 === _e || _e, internalProps.columnResizeMode = null !== (_f = null == resize ? void 0 : resize.columnResizeMode) && void 0 !== _f ? _f : columnResizeMode, internalProps.rowResizeMode = null !== (_g = null == resize ? void 0 : resize.rowResizeMode) && void 0 !== _g ? _g : rowResizeMode, internalProps.dragHeaderMode = null !== (_j = null !== (_h = null == dragOrder ? void 0 : dragOrder.dragHeaderMode) && void 0 !== _h ? _h : dragHeaderMode) && void 0 !== _j ? _j : "none", internalProps.renderChartAsync = renderChartAsync, setBatchRenderChartCount(renderChartAsyncBatchCount), internalProps.overscrollBehavior = null != overscrollBehavior ? overscrollBehavior : "auto", internalProps.cellTextOverflows = {}, internalProps.groupBy = null !== (_k = null == groupConfig ? void 0 : groupConfig.groupBy) && void 0 !== _k ? _k : groupBy, internalProps.titleCheckbox = null == groupConfig ? void 0 : groupConfig.titleCheckbox, internalProps.groupTitleFieldFormat = null !== (_l = null == groupConfig ? void 0 : groupConfig.titleFieldFormat) && void 0 !== _l ? _l : groupTitleFieldFormat, internalProps.groupTitleCustomLayout = null !== (_m = null == groupConfig ? void 0 : groupConfig.titleCustomLayout) && void 0 !== _m ? _m : groupTitleCustomLayout, internalProps.enableTreeStickCell = null !== (_o = null == groupConfig ? void 0 : groupConfig.enableTreeStickCell) && void 0 !== _o ? _o : enableTreeStickCell, internalProps._rowHeightsMap = new NumberRangeMap(this), internalProps._rowRangeHeightsMap = new Map(), internalProps._colRangeWidthsMap = new Map(), internalProps._widthResizedColMap = new Set(), internalProps._heightResizedRowMap = new Set(), this.colWidthsMap = new NumberMap(), this.colContentWidthsMap = new NumberMap(), this.colWidthsLimit = {}, internalProps.stick.changedCells.clear(), internalProps.theme = themes.of(null !== (_p = options.theme) && void 0 !== _p ? _p : themes.DEFAULT), internalProps.theme.isPivot = this.isPivotTable(), setIconColor(internalProps.theme.functionalIconsStyle), this.scenegraph.updateStageBackground(), internalProps.autoWrapText = options.autoWrapText, internalProps.enableLineBreak = options.enableLineBreak, internalProps.allowFrozenColCount = null !== (_q = options.allowFrozenColCount) && void 0 !== _q ? _q : 0, internalProps.limitMaxAutoWidth = null !== (_r = options.limitMaxAutoWidth) && void 0 !== _r ? _r : 450, internalProps.limitMinWidth = null != limitMinWidth ? "number" == typeof limitMinWidth ? limitMinWidth : limitMinWidth ? 10 : 0 : 10, internalProps.limitMinHeight = null != limitMinHeight ? "number" == typeof limitMinHeight ? limitMinHeight : limitMinHeight ? 10 : 0 : 10, null === (_s = internalProps.legends) || void 0 === _s || _s.forEach(legend => {
|
|
54573
54666
|
null == legend || legend.release();
|
|
54574
|
-
}), null === (
|
|
54667
|
+
}), null === (_t = internalProps.title) || void 0 === _t || _t.release(), internalProps.title = null, null === (_u = internalProps.emptyTip) || void 0 === _u || _u.release(), internalProps.emptyTip = null, internalProps.layoutMap.release(), clearChartRenderQueue(), this.scenegraph.clearCells(), this.scenegraph.updateComponent(), this.stateManager.updateOptionSetState(), this._updateSize(), this.eventManager.updateEventBinder(), options.legends) {
|
|
54575
54668
|
internalProps.legends = [];
|
|
54576
54669
|
const createLegend = Factory.getFunction("createLegend");
|
|
54577
54670
|
if (Array.isArray(options.legends)) {
|
|
@@ -54597,11 +54690,11 @@
|
|
|
54597
54690
|
}
|
|
54598
54691
|
if (internalProps.menu = Object.assign({
|
|
54599
54692
|
renderMode: "html"
|
|
54600
|
-
}, options.menu), Array.isArray(null === (
|
|
54693
|
+
}, options.menu), Array.isArray(null === (_v = options.menu) || void 0 === _v ? void 0 : _v.dropDownMenuHighlight) && this.setDropDownMenuHighlight(null === (_w = options.menu) || void 0 === _w ? void 0 : _w.dropDownMenuHighlight), (Array.isArray(null === (_x = options.menu) || void 0 === _x ? void 0 : _x.defaultHeaderMenuItems) || "function" == typeof (null === (_y = options.menu) || void 0 === _y ? void 0 : _y.defaultHeaderMenuItems)) && (this.globalDropDownMenu = options.menu.defaultHeaderMenuItems), "html" === internalProps.menu.renderMode && !internalProps.menuHandler) {
|
|
54601
54694
|
const MenuHandler = Factory.getComponent("menuHandler");
|
|
54602
54695
|
internalProps.menuHandler = new MenuHandler(this);
|
|
54603
54696
|
}
|
|
54604
|
-
this.clearCellStyleCache(), this.clearColWidthCache(), this.clearRowHeightCache(), internalProps.customMergeCell = getCustomMergeCellFunc(options.customMergeCell), null === (
|
|
54697
|
+
this.clearCellStyleCache(), this.clearColWidthCache(), this.clearRowHeightCache(), internalProps.customMergeCell = getCustomMergeCellFunc(options.customMergeCell), null === (_z = this.customCellStylePlugin) || void 0 === _z || _z.updateCustomCell(null !== (_0 = options.customCellStyle) && void 0 !== _0 ? _0 : [], null !== (_1 = options.customCellStyleArrangement) && void 0 !== _1 ? _1 : []), this._adjustCanvasSizeByOption();
|
|
54605
54698
|
}
|
|
54606
54699
|
renderWithRecreateCells() {
|
|
54607
54700
|
this.internalProps.stick.changedCells.clear();
|
|
@@ -55043,7 +55136,7 @@
|
|
|
55043
55136
|
var _a, _b, _c;
|
|
55044
55137
|
let icons;
|
|
55045
55138
|
if (this.isHeader(col, row)) icons = this.internalProps.headerHelper.getIcons(col, row);else if (this.internalProps.layoutMap.isSeriesNumber(col, row)) {
|
|
55046
|
-
if (!this.
|
|
55139
|
+
if (!this.internalProps.groupBy || !(null === (_a = this.getCellRawRecord(col, row)) || void 0 === _a ? void 0 : _a.vtableMerge)) {
|
|
55047
55140
|
(null === (_c = null === (_b = this.internalProps.layoutMap.getSeriesNumberBody(col, row)) || void 0 === _b ? void 0 : _b.define) || void 0 === _c ? void 0 : _c.dragOrder) && (icons = this.internalProps.rowSeriesNumberHelper.getIcons(col, row));
|
|
55048
55141
|
}
|
|
55049
55142
|
const cellValue = this.getCellValue(col, row),
|
|
@@ -56933,10 +57026,9 @@
|
|
|
56933
57026
|
return layout._cellRangeMap.set(`$${col}$${row}`, cellRange), cellRange;
|
|
56934
57027
|
}
|
|
56935
57028
|
function getTreeTitleMerge(col, row, cellRange, layout) {
|
|
56936
|
-
var _a;
|
|
56937
57029
|
if ("tree" !== layout.rowHierarchyType) return;
|
|
56938
57030
|
const cellRecord = layout._table.getCellRawRecord(col, row);
|
|
56939
|
-
|
|
57031
|
+
layout._table.internalProps.titleCheckbox && layout._table.internalProps.rowSeriesNumber ? (null == cellRecord ? void 0 : cellRecord.vtableMerge) && col >= layout.leftRowSeriesNumberColumnCount && (cellRange.start.col = layout.rowHeaderLevelCount + layout.leftRowSeriesNumberColumnCount, cellRange.end.col = layout.colCount - 1, cellRange.start.row = cellRange.end.row = row) : (null == cellRecord ? void 0 : cellRecord.vtableMerge) && (cellRange.start.col = layout.rowHeaderLevelCount, cellRange.end.col = layout.colCount - 1, cellRange.start.row = cellRange.end.row = row);
|
|
56940
57032
|
}
|
|
56941
57033
|
function getCellRangeTranspose(col, row, layout) {
|
|
56942
57034
|
var _a, _b, _c, _d;
|
|
@@ -57006,7 +57098,7 @@
|
|
|
57006
57098
|
}, null !== (_b = this.columnHierarchyType) && void 0 !== _b ? _b : null, "grid-tree" === this.columnHierarchyType ? this.columnExpandLevel : void 0), this._headerObjectsIncludeHided = this._addHeaders(0, columns, []), this._headerObjects = this._headerObjectsIncludeHided.filter(col => !0 !== col.define.hide), this._headerObjectMap = this._headerObjects.reduce((o, e) => (o[e.id] = e, o), {}), this.rowHierarchyType = checkHasTreeDefine(this) ? "tree" : "grid", this._hasAggregation = checkHasAggregation(this), this._hasAggregationOnBottomCount = checkHasAggregationOnBottom(this), this._hasAggregationOnTopCount = checkHasAggregationOnTop(this), this.handleRowSeriesNumber(table.internalProps.rowSeriesNumber);
|
|
57007
57099
|
}
|
|
57008
57100
|
handleRowSeriesNumber(rowSeriesNumber) {
|
|
57009
|
-
var _a, _b;
|
|
57101
|
+
var _a, _b, _c;
|
|
57010
57102
|
rowSeriesNumber && (Array.isArray(rowSeriesNumber) ? this.rowSeriesNumberColumn = rowSeriesNumber.map((seriesNumber, index) => {
|
|
57011
57103
|
var _a, _b;
|
|
57012
57104
|
return {
|
|
@@ -57032,11 +57124,11 @@
|
|
|
57032
57124
|
field: "_vtable_rowSeries_number"
|
|
57033
57125
|
}, rowSeriesNumber),
|
|
57034
57126
|
cellType: null !== (_a = rowSeriesNumber.cellType) && void 0 !== _a ? _a : "text",
|
|
57035
|
-
headerType: "checkbox" === rowSeriesNumber.cellType ? "checkbox" : "text",
|
|
57127
|
+
headerType: null !== (_b = rowSeriesNumber.headerType) && void 0 !== _b ? _b : "checkbox" === rowSeriesNumber.cellType ? "checkbox" : "text",
|
|
57036
57128
|
style: rowSeriesNumber.style,
|
|
57037
57129
|
width: rowSeriesNumber.width,
|
|
57038
57130
|
format: rowSeriesNumber.format,
|
|
57039
|
-
field: null !== (
|
|
57131
|
+
field: null !== (_c = rowSeriesNumber.field) && void 0 !== _c ? _c : "_vtable_rowSeries_number",
|
|
57040
57132
|
icon: rowSeriesNumber.icon,
|
|
57041
57133
|
headerIcon: rowSeriesNumber.headerIcon,
|
|
57042
57134
|
isChildNode: !1
|
|
@@ -58078,9 +58170,9 @@
|
|
|
58078
58170
|
}
|
|
58079
58171
|
function getCellUpdateType(col, row, table, oldCellUpdateType) {
|
|
58080
58172
|
if ("group" === oldCellUpdateType) return oldCellUpdateType;
|
|
58081
|
-
if ("sort" === oldCellUpdateType && !table.
|
|
58173
|
+
if ("sort" === oldCellUpdateType && !table.internalProps.groupBy) return oldCellUpdateType;
|
|
58082
58174
|
let cellUpdateType = "normal";
|
|
58083
|
-
if (table.
|
|
58175
|
+
if (table.internalProps.groupBy) cellUpdateType = "group";else if (!table.isHeader(col, row) && table.dataSource.lastOrderField) {
|
|
58084
58176
|
table.getBodyField(col, row) === table.dataSource.lastOrderField && (cellUpdateType = "sort");
|
|
58085
58177
|
}
|
|
58086
58178
|
return cellUpdateType;
|
|
@@ -58094,7 +58186,7 @@
|
|
|
58094
58186
|
}
|
|
58095
58187
|
function listTableAddRecord(record, recordIndex, table) {
|
|
58096
58188
|
var _a, _b, _c, _d;
|
|
58097
|
-
if (table.
|
|
58189
|
+
if (table.internalProps.groupBy) null === (_b = (_a = table.dataSource).addRecordsForGroup) || void 0 === _b || _b.call(_a, [record], recordIndex), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if ("tree" === table.dataSource.rowHierarchyType) null === (_d = (_c = table.dataSource).addRecordsForTree) || void 0 === _d || _d.call(_c, [record], recordIndex), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if (table.sortState) table.dataSource.addRecordForSorted(record), sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else {
|
|
58098
58190
|
(void 0 === recordIndex || recordIndex > table.dataSource.sourceLength) && (recordIndex = table.dataSource.sourceLength);
|
|
58099
58191
|
const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount;
|
|
58100
58192
|
table.dataSource.addRecord(record, recordIndex);
|
|
@@ -58163,7 +58255,7 @@
|
|
|
58163
58255
|
}
|
|
58164
58256
|
function listTableAddRecords(records, recordIndex, table) {
|
|
58165
58257
|
var _a, _b, _c, _d;
|
|
58166
|
-
if (table.
|
|
58258
|
+
if (table.internalProps.groupBy) null === (_b = (_a = table.dataSource).addRecordsForGroup) || void 0 === _b || _b.call(_a, records, recordIndex), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if ("tree" === table.dataSource.rowHierarchyType) null === (_d = (_c = table.dataSource).addRecordsForTree) || void 0 === _d || _d.call(_c, records, recordIndex), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if (table.sortState) table.dataSource.addRecordsForSorted(records), sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else {
|
|
58167
58259
|
void 0 === recordIndex || recordIndex > table.dataSource.sourceLength ? recordIndex = table.dataSource.sourceLength : recordIndex < 0 && (recordIndex = 0);
|
|
58168
58260
|
const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount;
|
|
58169
58261
|
table.dataSource.addRecords(records, recordIndex);
|
|
@@ -58232,7 +58324,7 @@
|
|
|
58232
58324
|
}
|
|
58233
58325
|
function listTableDeleteRecords(recordIndexs, table) {
|
|
58234
58326
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
58235
|
-
if ((null == recordIndexs ? void 0 : recordIndexs.length) > 0) if (table.
|
|
58327
|
+
if ((null == recordIndexs ? void 0 : recordIndexs.length) > 0) if (table.internalProps.groupBy) null === (_b = (_a = table.dataSource).deleteRecordsForGroup) || void 0 === _b || _b.call(_a, recordIndexs), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if ("tree" === table.dataSource.rowHierarchyType) null === (_d = (_c = table.dataSource).deleteRecordsForTree) || void 0 === _d || _d.call(_c, recordIndexs), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if (table.sortState) table.dataSource.deleteRecordsForSorted(recordIndexs), sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else {
|
|
58236
58328
|
const deletedRecordIndexs = table.dataSource.deleteRecords(recordIndexs);
|
|
58237
58329
|
if (0 === deletedRecordIndexs.length) return;
|
|
58238
58330
|
const oldRowCount = table.transpose ? table.colCount : table.rowCount;
|
|
@@ -58310,7 +58402,7 @@
|
|
|
58310
58402
|
}
|
|
58311
58403
|
function listTableUpdateRecords(records, recordIndexs, table) {
|
|
58312
58404
|
var _a, _b, _c, _d;
|
|
58313
|
-
if ((null == recordIndexs ? void 0 : recordIndexs.length) > 0) if (table.
|
|
58405
|
+
if ((null == recordIndexs ? void 0 : recordIndexs.length) > 0) if (table.internalProps.groupBy) null === (_b = (_a = table.dataSource).updateRecordsForGroup) || void 0 === _b || _b.call(_a, records, recordIndexs), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if ("tree" === table.dataSource.rowHierarchyType) null === (_d = (_c = table.dataSource).updateRecordsForTree) || void 0 === _d || _d.call(_c, records, recordIndexs), table.refreshRowColCount(), table.internalProps.layoutMap.clearCellRangeMap(), table.sortState && sortRecords(table), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else if (table.sortState) table.dataSource.updateRecordsForSorted(records, recordIndexs), sortRecords(table), table.refreshRowColCount(), table.scenegraph.clearCells(), table.scenegraph.createSceneGraph();else {
|
|
58314
58406
|
const updateRecordIndexs = table.dataSource.updateRecords(records, recordIndexs);
|
|
58315
58407
|
if (0 === updateRecordIndexs.length) return;
|
|
58316
58408
|
const recordIndexsMinToMax = updateRecordIndexs.map(index => table.getBodyRowIndexByRecordIndex(index)).sort((a, b) => a - b);
|
|
@@ -58441,7 +58533,7 @@
|
|
|
58441
58533
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
58442
58534
|
super(container, options), this.showHeader = !0, options = this.options;
|
|
58443
58535
|
const internalProps = this.internalProps;
|
|
58444
|
-
if (internalProps.frozenColDragHeaderMode = null !== (_b = null === (_a = options.dragOrder) || void 0 === _a ? void 0 : _a.frozenColDragHeaderMode) && void 0 !== _b ? _b : options.frozenColDragHeaderMode, this.pagination = options.pagination, internalProps.sortState = options.sortState, internalProps.multipleSort = !!options.multipleSort, internalProps.dataConfig =
|
|
58536
|
+
if (internalProps.frozenColDragHeaderMode = null !== (_b = null === (_a = options.dragOrder) || void 0 === _a ? void 0 : _a.frozenColDragHeaderMode) && void 0 !== _b ? _b : options.frozenColDragHeaderMode, this.pagination = options.pagination, internalProps.sortState = options.sortState, internalProps.multipleSort = !!options.multipleSort, internalProps.dataConfig = this.internalProps.groupBy ? getGroupByDataConfig(this.internalProps.groupBy) : {}, internalProps.columns = options.columns ? cloneDeepSpec(options.columns, ["children"]) : options.header ? cloneDeepSpec(options.header, ["children"]) : [], generateAggregationForColumn(this), internalProps.enableTreeNodeMerge = null !== (_d = null !== (_c = options.enableTreeNodeMerge) && void 0 !== _c ? _c : isValid$3(this.internalProps.groupBy)) && void 0 !== _d && _d, this.internalProps.headerHelper.setTableColumnsEditor(), this.showHeader = null === (_e = options.showHeader) || void 0 === _e || _e, this.internalProps.columnWidthConfig = options.columnWidthConfig, this.transpose = null !== (_f = options.transpose) && void 0 !== _f && _f, "node" !== Env.mode && (this.editorManager = new EditManager(this)), this.refreshHeader(), this.internalProps.useOneRowHeightFillAll = !1, options.dataSource ? this.dataSource = options.dataSource : options.records ? this.setRecords(options.records, {
|
|
58445
58537
|
sortState: internalProps.sortState
|
|
58446
58538
|
}) : this.setRecords([]), options.title) {
|
|
58447
58539
|
const Title = Factory.getComponent("title");
|
|
@@ -58451,7 +58543,7 @@
|
|
|
58451
58543
|
const EmptyTip = Factory.getComponent("emptyTip");
|
|
58452
58544
|
this.internalProps.emptyTip = new EmptyTip(this.options.emptyTip, this), null === (_h = this.internalProps.emptyTip) || void 0 === _h || _h.resetVisible();
|
|
58453
58545
|
}
|
|
58454
|
-
if (
|
|
58546
|
+
if (this.internalProps.enableTreeStickCell) {
|
|
58455
58547
|
const ListTreeStickCellPlugin = Factory.getComponent("listTreeStickCellPlugin");
|
|
58456
58548
|
this.listTreeStickCellPlugin = new ListTreeStickCellPlugin(this);
|
|
58457
58549
|
}
|
|
@@ -58531,7 +58623,7 @@
|
|
|
58531
58623
|
return title;
|
|
58532
58624
|
}
|
|
58533
58625
|
let value;
|
|
58534
|
-
if (this.
|
|
58626
|
+
if (this.internalProps.groupBy) {
|
|
58535
58627
|
const record = table.getCellRawRecord(col, row);
|
|
58536
58628
|
if (null == record ? void 0 : record.vtableMerge) return "";
|
|
58537
58629
|
table.internalProps.layoutMap.isAggregation(col, row) || (value = this.dataSource.getGroupSeriesNumber(row - this.columnHeaderLevelCount));
|
|
@@ -58667,7 +58759,7 @@
|
|
|
58667
58759
|
updateOption(options) {
|
|
58668
58760
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
58669
58761
|
const internalProps = this.internalProps;
|
|
58670
|
-
if (super.updateOption(options), internalProps.frozenColDragHeaderMode = null !== (_b = null === (_a = options.dragOrder) || void 0 === _a ? void 0 : _a.frozenColDragHeaderMode) && void 0 !== _b ? _b : options.frozenColDragHeaderMode, this.pagination = options.pagination, internalProps.sortState = options.sortState, internalProps.dataConfig =
|
|
58762
|
+
if (super.updateOption(options), internalProps.frozenColDragHeaderMode = null !== (_b = null === (_a = options.dragOrder) || void 0 === _a ? void 0 : _a.frozenColDragHeaderMode) && void 0 !== _b ? _b : options.frozenColDragHeaderMode, this.pagination = options.pagination, internalProps.sortState = options.sortState, internalProps.dataConfig = this.internalProps.groupBy ? getGroupByDataConfig(this.internalProps.groupBy) : {}, this.showHeader = null === (_c = options.showHeader) || void 0 === _c || _c, internalProps.columns = options.columns ? cloneDeepSpec(options.columns, ["children"]) : options.header ? cloneDeepSpec(options.header, ["children"]) : [], generateAggregationForColumn(this), internalProps.enableTreeNodeMerge = null !== (_e = null !== (_d = options.enableTreeNodeMerge) && void 0 !== _d ? _d : isValid$3(this.internalProps.groupBy)) && void 0 !== _e && _e, this.internalProps.headerHelper.setTableColumnsEditor(), this.transpose = null !== (_f = options.transpose) && void 0 !== _f && _f, this.refreshHeader(), this.internalProps.useOneRowHeightFillAll = !1, this.internalProps.columnWidthConfig = options.columnWidthConfig, internalProps.releaseList) for (let i = internalProps.releaseList.length - 1; i >= 0; i--) {
|
|
58671
58763
|
const releaseObj = internalProps.releaseList[i];
|
|
58672
58764
|
releaseObj instanceof DataSource ? releaseObj.updateColumns(this.internalProps.columns) : (null === (_g = null == releaseObj ? void 0 : releaseObj.release) || void 0 === _g || _g.call(releaseObj), internalProps.releaseList.splice(i, 1));
|
|
58673
58765
|
}
|
|
@@ -58779,12 +58871,16 @@
|
|
|
58779
58871
|
getHierarchyState(col, row) {
|
|
58780
58872
|
var _a;
|
|
58781
58873
|
if (this.isHeader(col, row)) return null === (_a = this._getHeaderLayoutMap(col, row)) || void 0 === _a ? void 0 : _a.hierarchyState;
|
|
58782
|
-
if (!this.
|
|
58874
|
+
if (!this.internalProps.groupBy || isArray$7(this.internalProps.groupBy) && 0 === this.internalProps.groupBy.length) {
|
|
58783
58875
|
if (!this.getBodyColumnDefine(col, row).tree) return HierarchyState.none;
|
|
58784
58876
|
}
|
|
58785
58877
|
const index = this.getRecordShowIndexByCell(col, row);
|
|
58786
58878
|
return this.dataSource.getHierarchyState(index);
|
|
58787
58879
|
}
|
|
58880
|
+
getRecordHierarchyState(col, row) {
|
|
58881
|
+
let recordIndex;
|
|
58882
|
+
return this.transpose ? this.getRecordShowIndexByCell(col, 0) : recordIndex = this.getRecordShowIndexByCell(0, row), this.dataSource.getHierarchyState(recordIndex);
|
|
58883
|
+
}
|
|
58788
58884
|
toggleHierarchyState(col, row, recalculateColWidths = !0) {
|
|
58789
58885
|
this.stateManager.updateHoverIcon(col, row, void 0, void 0);
|
|
58790
58886
|
const hierarchyState = this.getHierarchyState(col, row);
|
|
@@ -59075,7 +59171,7 @@
|
|
|
59075
59171
|
}
|
|
59076
59172
|
getGroupTitleLevel(col, row) {
|
|
59077
59173
|
var _a;
|
|
59078
|
-
if (!this.
|
|
59174
|
+
if (!this.internalProps.groupBy) return;
|
|
59079
59175
|
const indexArr = this.dataSource.getIndexKey(this.getRecordShowIndexByCell(col, row)),
|
|
59080
59176
|
groupLength = null !== (_a = this.dataSource.getGroupLength()) && void 0 !== _a ? _a : 0;
|
|
59081
59177
|
let indexArrLngth = isArray$7(indexArr) ? indexArr.length - 1 : 0;
|