k-vtable 1.0.13 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/ListTable.d.ts +0 -4
- package/cjs/ListTable.js +11 -18
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.js +6 -4
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable.d.ts +0 -8
- package/cjs/PivotTable.js +4 -32
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/components/legend/discrete-legend/discrete-legend.js +6 -4
- package/cjs/components/legend/discrete-legend/discrete-legend.js.map +1 -1
- package/cjs/components/menu/dom/MenuHandler.js +42 -4
- package/cjs/components/menu/dom/MenuHandler.js.map +1 -1
- package/cjs/components/menu/dom/logic/MenuElement.js +1 -0
- package/cjs/components/menu/dom/logic/MenuElement.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +3 -1
- package/cjs/core/BaseTable.js +37 -7
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/TABLE_EVENT_TYPE.d.ts +1 -0
- package/cjs/core/TABLE_EVENT_TYPE.js +1 -0
- package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/cjs/data/CachedDataSource.js +1 -1
- package/cjs/data/CachedDataSource.js.map +1 -1
- package/cjs/data/DataSource.d.ts +1 -1
- package/cjs/data/DataSource.js +11 -12
- package/cjs/data/DataSource.js.map +1 -1
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/container-dom.js.map +1 -1
- package/cjs/event/listener/table-group.js +31 -20
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/layout/pivot-header-layout.js +5 -5
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/simple-header-layout.js +1 -1
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/cjs/layout/tree-helper.js +2 -2
- package/cjs/layout/tree-helper.js.map +1 -1
- package/cjs/scenegraph/component/table-component.js +12 -11
- package/cjs/scenegraph/component/table-component.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/column-helper.js +2 -2
- package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
- package/cjs/scenegraph/icon/icon-update.js +1 -1
- package/cjs/scenegraph/icon/icon-update.js.map +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js +47 -2
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/layout/frozen-react.js +1 -1
- package/cjs/scenegraph/layout/frozen-react.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +2 -1
- package/cjs/scenegraph/scenegraph.js +19 -3
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/utils/text-icon-layout.js +1 -0
- package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/cjs/state/resize/update-resize-column.js +1 -1
- package/cjs/state/resize/update-resize-column.js.map +1 -1
- package/cjs/state/resize/update-resize-row.js +1 -1
- package/cjs/state/resize/update-resize-row.js.map +1 -1
- package/cjs/themes/theme-define.js +4 -0
- package/cjs/themes/theme-define.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +11 -0
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/events.d.ts +2 -0
- package/cjs/ts-types/events.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +20 -13
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/ts-types/theme.d.ts +1 -0
- package/cjs/ts-types/theme.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +432 -198
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.d.ts +0 -4
- package/es/ListTable.js +11 -18
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.js +6 -4
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable.d.ts +0 -8
- package/es/PivotTable.js +4 -32
- package/es/PivotTable.js.map +1 -1
- package/es/components/legend/discrete-legend/discrete-legend.js +6 -4
- package/es/components/legend/discrete-legend/discrete-legend.js.map +1 -1
- package/es/components/menu/dom/MenuHandler.js +42 -4
- package/es/components/menu/dom/MenuHandler.js.map +1 -1
- package/es/components/menu/dom/logic/MenuElement.js +1 -0
- package/es/components/menu/dom/logic/MenuElement.js.map +1 -1
- package/es/core/BaseTable.d.ts +3 -1
- package/es/core/BaseTable.js +37 -7
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/TABLE_EVENT_TYPE.d.ts +1 -0
- package/es/core/TABLE_EVENT_TYPE.js +1 -0
- package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/es/data/CachedDataSource.js +1 -1
- package/es/data/CachedDataSource.js.map +1 -1
- package/es/data/DataSource.d.ts +1 -1
- package/es/data/DataSource.js +11 -12
- package/es/data/DataSource.js.map +1 -1
- package/es/event/event.js.map +1 -1
- package/es/event/listener/container-dom.js.map +1 -1
- package/es/event/listener/table-group.js +30 -19
- package/es/event/listener/table-group.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/layout/pivot-header-layout.js +5 -5
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/simple-header-layout.js +1 -1
- package/es/layout/simple-header-layout.js.map +1 -1
- package/es/layout/tree-helper.js +2 -2
- package/es/layout/tree-helper.js.map +1 -1
- package/es/scenegraph/component/table-component.js +12 -11
- package/es/scenegraph/component/table-component.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +1 -1
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/column-helper.js +2 -2
- package/es/scenegraph/group-creater/column-helper.js.map +1 -1
- package/es/scenegraph/icon/icon-update.js +1 -1
- package/es/scenegraph/icon/icon-update.js.map +1 -1
- package/es/scenegraph/layout/compute-col-width.js +47 -2
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/layout/frozen-react.js +1 -1
- package/es/scenegraph/layout/frozen-react.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +2 -1
- package/es/scenegraph/scenegraph.js +23 -3
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/utils/text-icon-layout.js +1 -0
- package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/es/state/resize/update-resize-column.js +1 -1
- package/es/state/resize/update-resize-column.js.map +1 -1
- package/es/state/resize/update-resize-row.js +1 -1
- package/es/state/resize/update-resize-row.js.map +1 -1
- package/es/themes/theme-define.js +4 -0
- package/es/themes/theme-define.js.map +1 -1
- package/es/ts-types/base-table.d.ts +11 -0
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/events.d.ts +2 -0
- package/es/ts-types/events.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +20 -13
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/ts-types/theme.d.ts +1 -0
- package/es/ts-types/theme.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +2 -2
- package/cjs/event/self-event-listener/base-table/right-button-click.d.ts +0 -2
- package/cjs/event/self-event-listener/base-table/right-button-click.js +0 -25
- package/cjs/event/self-event-listener/base-table/right-button-click.js.map +0 -1
- package/es/event/self-event-listener/base-table/right-button-click.d.ts +0 -2
- package/es/event/self-event-listener/base-table/right-button-click.js +0 -17
- package/es/event/self-event-listener/base-table/right-button-click.js.map +0 -1
package/dist/vtable.js
CHANGED
|
@@ -9856,7 +9856,7 @@
|
|
|
9856
9856
|
}
|
|
9857
9857
|
removeChild(child) {
|
|
9858
9858
|
const data = super.removeChild(child);
|
|
9859
|
-
return
|
|
9859
|
+
return this.getGraphicService().onRemove(child), child.stage = null, this.addUpdateBoundTag(), data;
|
|
9860
9860
|
}
|
|
9861
9861
|
removeAllChild(deep = !1) {
|
|
9862
9862
|
this.forEachChildren(child => {
|
|
@@ -12786,9 +12786,10 @@
|
|
|
12786
12786
|
return super.needUpdateTag(key, POLYGON_UPDATE_TAG_KEY);
|
|
12787
12787
|
}
|
|
12788
12788
|
toCustomPath() {
|
|
12789
|
-
|
|
12790
|
-
|
|
12791
|
-
|
|
12789
|
+
let path = super.toCustomPath();
|
|
12790
|
+
if (path) return path;
|
|
12791
|
+
const points = this.attribute.points;
|
|
12792
|
+
return path = new CustomPath2D(), points.forEach((point, index) => {
|
|
12792
12793
|
0 === index ? path.moveTo(point.x, point.y) : path.lineTo(point.x, point.y);
|
|
12793
12794
|
}), path.closePath(), path;
|
|
12794
12795
|
}
|
|
@@ -16048,6 +16049,7 @@
|
|
|
16048
16049
|
drawContext.updateBounds ? this.useDirtyBounds = !0 : this.useDirtyBounds = !drawContext.stage.params.optimize.disableCheckGraphicWidthOutRange;
|
|
16049
16050
|
}
|
|
16050
16051
|
draw(renderService, drawContext) {
|
|
16052
|
+
var _a;
|
|
16051
16053
|
this.prepareForDraw(renderService, drawContext), drawContext.drawContribution = this, this.currentRenderMap = this.styleRenderMap.get(drawContext.renderStyle) || this.defaultRenderMap, this.currentRenderService = renderService;
|
|
16052
16054
|
const {
|
|
16053
16055
|
context: context,
|
|
@@ -16062,7 +16064,7 @@
|
|
|
16062
16064
|
dirtyBounds.x1 = Math.floor(b.x1), dirtyBounds.y1 = Math.floor(b.y1), dirtyBounds.x2 = Math.ceil(b.x2), dirtyBounds.y2 = Math.ceil(b.y2);
|
|
16063
16065
|
}
|
|
16064
16066
|
const d = context.dpr % 1;
|
|
16065
|
-
(d || .5 !== d) && (dirtyBounds.x1 = Math.floor(dirtyBounds.x1 * context.dpr) / context.dpr, dirtyBounds.y1 = Math.floor(dirtyBounds.y1 * context.dpr) / context.dpr, dirtyBounds.x2 = Math.ceil(dirtyBounds.x2 * context.dpr) / context.dpr, dirtyBounds.y2 = Math.ceil(dirtyBounds.y2 * context.dpr) / context.dpr), this.backupDirtyBounds.copy(dirtyBounds), context.reset(!1), context.save(), context.setClearMatrix(transMatrix.a, transMatrix.b, transMatrix.c, transMatrix.d, transMatrix.e, transMatrix.f), context.clearMatrix(!1), context.translate(viewBox.x1, viewBox.y1, !0), context.beginPath(), context.rect(dirtyBounds.x1, dirtyBounds.y1, dirtyBounds.width(), dirtyBounds.height()), context.clip(), stage.camera && (this.dirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0), this.backupDirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0)), this.clearScreen(renderService, context, drawContext), renderService.renderTreeRoots.sort((a, b) => {
|
|
16067
|
+
(d || .5 !== d) && (dirtyBounds.x1 = Math.floor(dirtyBounds.x1 * context.dpr) / context.dpr, dirtyBounds.y1 = Math.floor(dirtyBounds.y1 * context.dpr) / context.dpr, dirtyBounds.x2 = Math.ceil(dirtyBounds.x2 * context.dpr) / context.dpr, dirtyBounds.y2 = Math.ceil(dirtyBounds.y2 * context.dpr) / context.dpr), this.backupDirtyBounds.copy(dirtyBounds), context.reset(!1), context.save(), context.setClearMatrix(transMatrix.a, transMatrix.b, transMatrix.c, transMatrix.d, transMatrix.e, transMatrix.f), context.clearMatrix(!1), context.translate(viewBox.x1, viewBox.y1, !0), context.beginPath(), context.rect(dirtyBounds.x1, dirtyBounds.y1, dirtyBounds.width(), dirtyBounds.height()), context.clip(), stage.camera && (this.dirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0), this.backupDirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0)), this.clearScreen(renderService, context, drawContext), (null === (_a = renderService.drawParams) || void 0 === _a ? void 0 : _a.stage) && renderService.drawParams.stage.hooks.afterClearScreen.call(renderService.drawParams), renderService.renderTreeRoots.sort((a, b) => {
|
|
16066
16068
|
var _a, _b;
|
|
16067
16069
|
return (null !== (_a = a.attribute.zIndex) && void 0 !== _a ? _a : DefaultAttribute.zIndex) - (null !== (_b = b.attribute.zIndex) && void 0 !== _b ? _b : DefaultAttribute.zIndex);
|
|
16068
16070
|
}).forEach(group => {
|
|
@@ -16198,7 +16200,7 @@
|
|
|
16198
16200
|
return data || this.currentRenderMap.get(type) || this.defaultRenderMap.get(type);
|
|
16199
16201
|
}
|
|
16200
16202
|
clearScreen(renderService, context, drawContext) {
|
|
16201
|
-
var _a, _b;
|
|
16203
|
+
var _a, _b, _c;
|
|
16202
16204
|
const {
|
|
16203
16205
|
clear: clear,
|
|
16204
16206
|
viewBox: viewBox
|
|
@@ -16206,9 +16208,9 @@
|
|
|
16206
16208
|
width = viewBox.width(),
|
|
16207
16209
|
height = viewBox.height();
|
|
16208
16210
|
if (clear) {
|
|
16209
|
-
context.clearRect(0, 0, width, height);
|
|
16210
|
-
const stage = null === (
|
|
16211
|
-
if (stage && (context.globalAlpha = null !== (
|
|
16211
|
+
context.clearRect(0, 0, width, height), (null === (_a = renderService.drawParams) || void 0 === _a ? void 0 : _a.stage) && renderService.drawParams.stage.hooks.afterClearRect.call(renderService.drawParams);
|
|
16212
|
+
const stage = null === (_b = renderService.drawParams) || void 0 === _b ? void 0 : _b.stage;
|
|
16213
|
+
if (stage && (context.globalAlpha = null !== (_c = stage.attribute.opacity) && void 0 !== _c ? _c : 1), stage && stage.backgroundImg && stage.resources) {
|
|
16212
16214
|
const res = stage.resources.get(clear);
|
|
16213
16215
|
res && "success" === res.state && res.data && context.drawImage(res.data, 0, 0, width, height);
|
|
16214
16216
|
} else context.fillStyle = createColor(context, clear, {
|
|
@@ -16741,13 +16743,19 @@
|
|
|
16741
16743
|
} else this._skipRender = 1;
|
|
16742
16744
|
}, this.beforeRender = stage => {
|
|
16743
16745
|
this._beforeRender && this._beforeRender(stage);
|
|
16746
|
+
}, this.afterClearScreen = drawParams => {
|
|
16747
|
+
this._afterClearScreen && this._afterClearScreen(drawParams);
|
|
16748
|
+
}, this.afterClearRect = drawParams => {
|
|
16749
|
+
this._afterClearRect && this._afterClearRect(drawParams);
|
|
16744
16750
|
}, this.afterRender = stage => {
|
|
16745
16751
|
this.renderCount++, this._afterRender && this._afterRender(stage), this._afterNextRenderCbs && this._afterNextRenderCbs.forEach(cb => cb(stage)), this._afterNextRenderCbs = null, this.tickedBeforeRender = !1;
|
|
16746
16752
|
}, this.afterTickCb = () => {
|
|
16747
16753
|
this.tickedBeforeRender = !0, "rendering" !== this.state && this.renderNextFrame();
|
|
16748
16754
|
}, this.params = params, this.theme = new Theme(), this.hooks = {
|
|
16749
16755
|
beforeRender: new SyncHook(["stage"]),
|
|
16750
|
-
afterRender: new SyncHook(["stage"])
|
|
16756
|
+
afterRender: new SyncHook(["stage"]),
|
|
16757
|
+
afterClearScreen: new SyncHook(["stage"]),
|
|
16758
|
+
afterClearRect: new SyncHook(["stage"])
|
|
16751
16759
|
}, this.global = application.global, !this.global.env && isBrowserEnv() && this.global.setEnv("browser"), this.window = container.get(VWindow), this.renderService = container.get(RenderService), this.pluginService = container.get(PluginService), this.layerService = container.get(LayerService), this.graphicService = container.get(GraphicService), this.pluginService.active(this, params), this.window.create({
|
|
16752
16760
|
width: params.width,
|
|
16753
16761
|
height: params.height,
|
|
@@ -16759,7 +16767,7 @@
|
|
|
16759
16767
|
canvas: params.canvas
|
|
16760
16768
|
}), this.state = "normal", this.renderCount = 0, this.tryInitEventSystem(), this._background = null !== (_a = params.background) && void 0 !== _a ? _a : DefaultConfig.BACKGROUND, this.appendChild(this.layerService.createLayer(this, {
|
|
16761
16769
|
main: !0
|
|
16762
|
-
})), this.nextFrameRenderLayerSet = new Set(), this.willNextFrameRender = !1, this.stage = this, this.renderStyle = params.renderStyle, params.autoRender && this.enableAutoRender(), params.autoRefresh && this.enableAutoRefresh(), !1 === params.disableDirtyBounds && this.enableDirtyBounds(), params.enableHtmlAttribute && this.enableHtmlAttribute(params.enableHtmlAttribute), params.ReactDOM && this.enableReactAttribute(params.ReactDOM), params.enableLayout && this.enableLayout(), this.hooks.beforeRender.tap("constructor", this.beforeRender), this.hooks.afterRender.tap("constructor", this.afterRender), this._beforeRender = params.beforeRender, this._afterRender = params.afterRender, this.supportInteractiveLayer = !1 !== params.interactiveLayer, params.optimize || (params.optimize = {
|
|
16770
|
+
})), this.nextFrameRenderLayerSet = new Set(), this.willNextFrameRender = !1, this.stage = this, this.renderStyle = params.renderStyle, params.autoRender && this.enableAutoRender(), params.autoRefresh && this.enableAutoRefresh(), !1 === params.disableDirtyBounds && this.enableDirtyBounds(), params.enableHtmlAttribute && this.enableHtmlAttribute(params.enableHtmlAttribute), params.ReactDOM && this.enableReactAttribute(params.ReactDOM), params.enableLayout && this.enableLayout(), this.hooks.beforeRender.tap("constructor", this.beforeRender), this.hooks.afterRender.tap("constructor", this.afterRender), this.hooks.afterClearScreen.tap("constructor", this.afterClearScreen), this.hooks.afterClearRect.tap("constructor", this.afterClearRect), this._beforeRender = params.beforeRender, this._afterRender = params.afterRender, this._afterClearScreen = params.afterClearScreen, this._afterClearRect = params.afterClearRect, this.supportInteractiveLayer = !1 !== params.interactiveLayer, params.optimize || (params.optimize = {
|
|
16763
16771
|
tickRenderMode: "effect"
|
|
16764
16772
|
}), this.optmize(params.optimize), params.background && isString$6(this._background) && this._background.includes("/") && this.setAttributes({
|
|
16765
16773
|
background: this._background
|
|
@@ -17154,7 +17162,7 @@
|
|
|
17154
17162
|
return this._cursor;
|
|
17155
17163
|
}
|
|
17156
17164
|
eventPointTransform(e) {
|
|
17157
|
-
const point = this.global.mapToCanvasPoint(e, this.window
|
|
17165
|
+
const point = this.global.mapToCanvasPoint(e, this.window);
|
|
17158
17166
|
return this.stage.window.pointTransform(point.x, point.y);
|
|
17159
17167
|
}
|
|
17160
17168
|
pauseTriggerEvent() {
|
|
@@ -24557,6 +24565,14 @@
|
|
|
24557
24565
|
state.executor.stop();
|
|
24558
24566
|
}), this.stateList = null;
|
|
24559
24567
|
}
|
|
24568
|
+
reApplyState(state) {
|
|
24569
|
+
var _a;
|
|
24570
|
+
const stateInfo = null === (_a = this.stateList) || void 0 === _a ? void 0 : _a.find(stateInfo => stateInfo.state === state);
|
|
24571
|
+
if (stateInfo) {
|
|
24572
|
+
const stateList = this.stateList.slice();
|
|
24573
|
+
stateInfo.executor.stop(), this.stateList = stateList, stateInfo.executor.execute(stateInfo.animationConfig);
|
|
24574
|
+
}
|
|
24575
|
+
}
|
|
24560
24576
|
}
|
|
24561
24577
|
|
|
24562
24578
|
class GraphicStateExtension {
|
|
@@ -24587,11 +24603,20 @@
|
|
|
24587
24603
|
applyUnhighlightState(animationConfig, callback) {
|
|
24588
24604
|
return this._getAnimationStateManager(this).applyUnhighlightState(animationConfig, callback), this;
|
|
24589
24605
|
}
|
|
24590
|
-
stopAnimationState(state, type) {
|
|
24591
|
-
return this._getAnimationStateManager(this).stopState(state, type), this
|
|
24606
|
+
stopAnimationState(state, type, deep = !1) {
|
|
24607
|
+
return this._getAnimationStateManager(this).stopState(state, type), deep && this.isContainer && this.forEachChildren(child => {
|
|
24608
|
+
child.stopAnimationState(state, type, deep);
|
|
24609
|
+
}), this;
|
|
24592
24610
|
}
|
|
24593
24611
|
clearAnimationStates() {
|
|
24594
|
-
|
|
24612
|
+
const stateManager = this._animationStateManager;
|
|
24613
|
+
return stateManager && stateManager.clearState(), this;
|
|
24614
|
+
}
|
|
24615
|
+
reApplyAnimationState(state, deep = !1) {
|
|
24616
|
+
const stateManager = this._animationStateManager;
|
|
24617
|
+
return stateManager && stateManager.reApplyState(state), deep && this.isContainer && this.forEachChildren(child => {
|
|
24618
|
+
child.reApplyAnimationState(state, deep);
|
|
24619
|
+
}), this;
|
|
24595
24620
|
}
|
|
24596
24621
|
static extend(graphic) {
|
|
24597
24622
|
return new GraphicStateExtension()._getAnimationStateManager(graphic), graphic;
|
|
@@ -24644,6 +24669,21 @@
|
|
|
24644
24669
|
getGraphicAttribute(key, prev = !1) {
|
|
24645
24670
|
return !prev && this.finalAttribute ? this.finalAttribute[key] : this.attribute[key];
|
|
24646
24671
|
}
|
|
24672
|
+
pauseAnimation(deep = !1) {
|
|
24673
|
+
this.animates && this.animates.forEach(animate => animate.pause()), deep && this.isContainer && this.forEachChildren(child => {
|
|
24674
|
+
child.pauseAnimation(deep);
|
|
24675
|
+
});
|
|
24676
|
+
}
|
|
24677
|
+
resumeAnimation(deep = !1) {
|
|
24678
|
+
this.animates && this.animates.forEach(animate => animate.resume()), deep && this.isContainer && this.forEachChildren(child => {
|
|
24679
|
+
child.resumeAnimation(deep);
|
|
24680
|
+
});
|
|
24681
|
+
}
|
|
24682
|
+
stopAnimation(deep = !1) {
|
|
24683
|
+
this.animates && this.animates.forEach(animate => animate.stop()), deep && this.isContainer && this.forEachChildren(child => {
|
|
24684
|
+
child.stopAnimation(deep);
|
|
24685
|
+
});
|
|
24686
|
+
}
|
|
24647
24687
|
}
|
|
24648
24688
|
|
|
24649
24689
|
function registerAnimate() {
|
|
@@ -25205,7 +25245,7 @@
|
|
|
25205
25245
|
super(from, to, duration, easing, params);
|
|
25206
25246
|
}
|
|
25207
25247
|
onBind() {
|
|
25208
|
-
var _a, _b;
|
|
25248
|
+
var _a, _b, _c;
|
|
25209
25249
|
super.onBind();
|
|
25210
25250
|
const {
|
|
25211
25251
|
from: from,
|
|
@@ -25214,7 +25254,7 @@
|
|
|
25214
25254
|
fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
|
|
25215
25255
|
this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to;
|
|
25216
25256
|
const finalAttribute = this.target.getFinalAttribute();
|
|
25217
|
-
finalAttribute && this.target.setAttributes(finalAttribute), this.target.setAttributes(fromAttrs);
|
|
25257
|
+
finalAttribute && this.target.setAttributes(finalAttribute), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && this.target.setAttributes(fromAttrs);
|
|
25218
25258
|
}
|
|
25219
25259
|
onEnd(cb) {
|
|
25220
25260
|
super.onEnd(cb);
|
|
@@ -25312,7 +25352,7 @@
|
|
|
25312
25352
|
super(from, to, duration, easing, params);
|
|
25313
25353
|
}
|
|
25314
25354
|
onBind() {
|
|
25315
|
-
var _a, _b;
|
|
25355
|
+
var _a, _b, _c;
|
|
25316
25356
|
super.onBind();
|
|
25317
25357
|
const {
|
|
25318
25358
|
from: from,
|
|
@@ -25321,7 +25361,7 @@
|
|
|
25321
25361
|
fromAttrs = null !== (_b = null === (_a = this.target.context) || void 0 === _a ? void 0 : _a.lastAttrs) && void 0 !== _b ? _b : from;
|
|
25322
25362
|
this.props = to, this.propKeys = Object.keys(to).filter(key => null != to[key]), this.from = fromAttrs, this.to = to;
|
|
25323
25363
|
const finalAttribute = this.target.getFinalAttribute();
|
|
25324
|
-
finalAttribute && this.target.setAttributes(finalAttribute), this.target.setAttributes(fromAttrs);
|
|
25364
|
+
finalAttribute && this.target.setAttributes(finalAttribute), !1 !== (null === (_c = this.params.controlOptions) || void 0 === _c ? void 0 : _c.immediatelyApply) && this.target.setAttributes(fromAttrs);
|
|
25325
25365
|
}
|
|
25326
25366
|
onEnd(cb) {
|
|
25327
25367
|
super.onEnd(cb);
|
|
@@ -27172,16 +27212,15 @@
|
|
|
27172
27212
|
changedY = 0;
|
|
27173
27213
|
"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;
|
|
27174
27214
|
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,
|
|
27175
|
-
|
|
27176
|
-
|
|
27177
|
-
|
|
27178
|
-
|
|
27179
|
-
finalAttrsY = excludeChannels.includes("y") ? graphic.attribute.y : finalAttrs.y;
|
|
27215
|
+
finalAttrsX = graphic.getGraphicAttribute("x"),
|
|
27216
|
+
finalAttrsY = graphic.getGraphicAttribute("y"),
|
|
27217
|
+
fromX = excludeChannels.includes("x") ? finalAttrsX : point && isValidNumber$3(point.x) ? point.x : changedX,
|
|
27218
|
+
fromY = excludeChannels.includes("y") ? finalAttrsY : point && isValidNumber$3(point.y) ? point.y : changedY;
|
|
27180
27219
|
switch (direction) {
|
|
27181
27220
|
case "x":
|
|
27182
27221
|
return {
|
|
27183
27222
|
from: {
|
|
27184
|
-
x: fromX
|
|
27223
|
+
x: excludeChannels.includes("x") ? finalAttrsX : fromX
|
|
27185
27224
|
},
|
|
27186
27225
|
to: {
|
|
27187
27226
|
x: finalAttrsX
|
|
@@ -27229,7 +27268,7 @@
|
|
|
27229
27268
|
case "x":
|
|
27230
27269
|
return {
|
|
27231
27270
|
from: {
|
|
27232
|
-
x: graphic.
|
|
27271
|
+
x: graphic.getGraphicAttribute("x")
|
|
27233
27272
|
},
|
|
27234
27273
|
to: {
|
|
27235
27274
|
x: fromX
|
|
@@ -27238,7 +27277,7 @@
|
|
|
27238
27277
|
case "y":
|
|
27239
27278
|
return {
|
|
27240
27279
|
from: {
|
|
27241
|
-
y: graphic.
|
|
27280
|
+
y: graphic.getGraphicAttribute("y")
|
|
27242
27281
|
},
|
|
27243
27282
|
to: {
|
|
27244
27283
|
y: fromY
|
|
@@ -27247,8 +27286,8 @@
|
|
|
27247
27286
|
default:
|
|
27248
27287
|
return {
|
|
27249
27288
|
from: {
|
|
27250
|
-
x: graphic.
|
|
27251
|
-
y: graphic.
|
|
27289
|
+
x: graphic.getGraphicAttribute("x"),
|
|
27290
|
+
y: graphic.getGraphicAttribute("y")
|
|
27252
27291
|
},
|
|
27253
27292
|
to: {
|
|
27254
27293
|
x: fromX,
|
|
@@ -27466,9 +27505,8 @@
|
|
|
27466
27505
|
w = Math.min(Math.min(currentX + maxLength, maxLength), streamLength - currentX),
|
|
27467
27506
|
width = w + x > parentWidth ? Math.max(parentWidth - x, 0) : w;
|
|
27468
27507
|
this.rect.setAttributes({
|
|
27469
|
-
x: x,
|
|
27470
|
-
width: width
|
|
27471
|
-
dx: Math.min(parentAttr.x1 - parentAttr.x, 0)
|
|
27508
|
+
x: x + Math.min(parentAttr.x1 - parentAttr.x, 0),
|
|
27509
|
+
width: width
|
|
27472
27510
|
}, !1, {
|
|
27473
27511
|
type: AttributeUpdateType.ANIMATE_PLAY,
|
|
27474
27512
|
animationState: {
|
|
@@ -27485,9 +27523,8 @@
|
|
|
27485
27523
|
const h = Math.min(parentHeight - currentY, maxLength);
|
|
27486
27524
|
let height;
|
|
27487
27525
|
y <= 0 ? (height = Math.max(y + h, 0), y = 0) : height = h, this.rect.setAttributes({
|
|
27488
|
-
y: y,
|
|
27489
|
-
height: height
|
|
27490
|
-
dy: Math.min(parentAttr.y1 - parentAttr.y, 0)
|
|
27526
|
+
y: y + Math.min(parentAttr.y1 - parentAttr.y, 0),
|
|
27527
|
+
height: height
|
|
27491
27528
|
}, !1, {
|
|
27492
27529
|
type: AttributeUpdateType.ANIMATE_PLAY,
|
|
27493
27530
|
animationState: {
|
|
@@ -34868,6 +34905,7 @@
|
|
|
34868
34905
|
MOUSEENTER_CELL: 'mouseenter_cell',
|
|
34869
34906
|
MOUSELEAVE_CELL: 'mouseleave_cell',
|
|
34870
34907
|
CONTEXTMENU_CELL: 'contextmenu_cell',
|
|
34908
|
+
CONTEXTMENU_CANVAS: 'contextmenu_canvas',
|
|
34871
34909
|
RESIZE_COLUMN: 'resize_column',
|
|
34872
34910
|
RESIZE_COLUMN_END: 'resize_column_end',
|
|
34873
34911
|
RESIZE_ROW: 'resize_row',
|
|
@@ -36365,6 +36403,9 @@
|
|
|
36365
36403
|
},
|
|
36366
36404
|
get verticalPadding() {
|
|
36367
36405
|
return scroll.verticalPadding ?? 0;
|
|
36406
|
+
},
|
|
36407
|
+
get ignoreFrozenCols() {
|
|
36408
|
+
return scroll.ignoreFrozenCols ?? false;
|
|
36368
36409
|
}
|
|
36369
36410
|
};
|
|
36370
36411
|
}
|
|
@@ -37015,11 +37056,11 @@
|
|
|
37015
37056
|
}
|
|
37016
37057
|
initTreeHierarchyState() {
|
|
37017
37058
|
this._sourceLength = this._source?.length || 0;
|
|
37018
|
-
this.currentIndexedData =
|
|
37019
|
-
|
|
37059
|
+
this.currentIndexedData = [];
|
|
37060
|
+
const nodeLength = this._sourceLength;
|
|
37020
37061
|
for (let i = 0; i < nodeLength; i++) {
|
|
37021
|
-
|
|
37022
|
-
const nodeData = this.getOriginalRecord(
|
|
37062
|
+
this.currentIndexedData.push(i);
|
|
37063
|
+
const nodeData = this.getOriginalRecord(i);
|
|
37023
37064
|
if (!nodeData) {
|
|
37024
37065
|
continue;
|
|
37025
37066
|
}
|
|
@@ -37035,9 +37076,7 @@
|
|
|
37035
37076
|
if (nodeData.hierarchyState === HierarchyState.collapse) {
|
|
37036
37077
|
continue;
|
|
37037
37078
|
}
|
|
37038
|
-
|
|
37039
|
-
i += childrenLength;
|
|
37040
|
-
nodeLength += childrenLength;
|
|
37079
|
+
this.initChildrenNodeHierarchy(i, this.hierarchyExpandLevel, 2, nodeData);
|
|
37041
37080
|
}
|
|
37042
37081
|
else if (nodeData.children === true) {
|
|
37043
37082
|
!nodeData.hierarchyState && (nodeData.hierarchyState = HierarchyState.collapse);
|
|
@@ -37180,9 +37219,10 @@
|
|
|
37180
37219
|
aggregator.push(record);
|
|
37181
37220
|
}
|
|
37182
37221
|
}
|
|
37183
|
-
initChildrenNodeHierarchy(indexKey, hierarchyExpandLevel, currentLevel, nodeData) {
|
|
37222
|
+
initChildrenNodeHierarchy(indexKey, hierarchyExpandLevel, currentLevel, nodeData, insertKeys) {
|
|
37184
37223
|
let childTotalLength = 0;
|
|
37185
37224
|
const nodeLength = nodeData.filteredChildren ? nodeData.filteredChildren.length : nodeData.children?.length ?? 0;
|
|
37225
|
+
const localInsertKeys = insertKeys ?? [];
|
|
37186
37226
|
for (let j = 0; j < nodeLength; j++) {
|
|
37187
37227
|
if (currentLevel <= hierarchyExpandLevel || nodeData.hierarchyState === HierarchyState.expand) {
|
|
37188
37228
|
childTotalLength += 1;
|
|
@@ -37190,7 +37230,7 @@
|
|
|
37190
37230
|
const childNodeData = nodeData.filteredChildren ? nodeData.filteredChildren[j] : nodeData.children[j];
|
|
37191
37231
|
const childIndexKey = Array.isArray(indexKey) ? indexKey.concat(j) : [indexKey, j];
|
|
37192
37232
|
if (currentLevel <= hierarchyExpandLevel || nodeData.hierarchyState === HierarchyState.expand) {
|
|
37193
|
-
|
|
37233
|
+
localInsertKeys.push(childIndexKey);
|
|
37194
37234
|
}
|
|
37195
37235
|
if (childNodeData.filteredChildren ? childNodeData.filteredChildren.length > 0 : childNodeData.children?.length > 0) {
|
|
37196
37236
|
if (currentLevel < hierarchyExpandLevel || childNodeData.hierarchyState === HierarchyState.expand) {
|
|
@@ -37202,12 +37242,15 @@
|
|
|
37202
37242
|
}
|
|
37203
37243
|
}
|
|
37204
37244
|
if (childNodeData.hierarchyState === HierarchyState.expand) {
|
|
37205
|
-
childTotalLength += this.initChildrenNodeHierarchy(childIndexKey, hierarchyExpandLevel, currentLevel + 1, childNodeData);
|
|
37245
|
+
childTotalLength += this.initChildrenNodeHierarchy(childIndexKey, hierarchyExpandLevel, currentLevel + 1, childNodeData, localInsertKeys);
|
|
37206
37246
|
}
|
|
37207
37247
|
if (childNodeData.children === true) {
|
|
37208
37248
|
!childNodeData.hierarchyState && (childNodeData.hierarchyState = HierarchyState.collapse);
|
|
37209
37249
|
}
|
|
37210
37250
|
}
|
|
37251
|
+
if (!insertKeys && localInsertKeys.length > 0) {
|
|
37252
|
+
this.currentIndexedData.push(...localInsertKeys);
|
|
37253
|
+
}
|
|
37211
37254
|
return childTotalLength;
|
|
37212
37255
|
}
|
|
37213
37256
|
updatePagination(pagination) {
|
|
@@ -39735,8 +39778,8 @@
|
|
|
39735
39778
|
if (isValid$3(newRecord)) {
|
|
39736
39779
|
newRecord.hierarchyState = oldSource[i].hierarchyState;
|
|
39737
39780
|
}
|
|
39738
|
-
if (isArray$7(oldRecord
|
|
39739
|
-
isArray$7(newRecord
|
|
39781
|
+
if (isArray$7(oldRecord?.children) &&
|
|
39782
|
+
isArray$7(newRecord?.children) &&
|
|
39740
39783
|
oldRecord.map.size !== 0 &&
|
|
39741
39784
|
newRecord.map.size !== 0) {
|
|
39742
39785
|
syncGroupCollapseState(oldRecord.children, newRecord.children, oldRecord.map, newRecord.map);
|
|
@@ -42613,6 +42656,9 @@
|
|
|
42613
42656
|
});
|
|
42614
42657
|
}
|
|
42615
42658
|
function dealWithIcon(icon, mark, col, row, range, table, dealWithIconComputeVar) {
|
|
42659
|
+
if (!icon) {
|
|
42660
|
+
return undefined;
|
|
42661
|
+
}
|
|
42616
42662
|
const iconAttribute = {};
|
|
42617
42663
|
if (icon.type === 'image') {
|
|
42618
42664
|
if (icon.isGif) {
|
|
@@ -43625,7 +43671,7 @@
|
|
|
43625
43671
|
if (vtableMerge) {
|
|
43626
43672
|
mayHaveIcon = true;
|
|
43627
43673
|
if (table.internalProps.groupTitleCustomLayout) {
|
|
43628
|
-
customResult = dealWithCustom(table.internalProps.groupTitleCustomLayout, undefined,
|
|
43674
|
+
customResult = dealWithCustom(table.internalProps.groupTitleCustomLayout, undefined, col, row, table.getColsWidth(range.start.col, range.end.col), table.getRowsHeight(range.start.row, range.end.row), false, table.isAutoRowHeight(row), [0, 0, 0, 0], range, table);
|
|
43629
43675
|
}
|
|
43630
43676
|
if (table.internalProps.groupTitleFieldFormat) {
|
|
43631
43677
|
value = table.internalProps.groupTitleFieldFormat(rawRecord, col, row, table);
|
|
@@ -46268,7 +46314,6 @@
|
|
|
46268
46314
|
const shadowWidth = theme.frozenColumnLine?.shadow?.width;
|
|
46269
46315
|
const shadowStartColor = theme.frozenColumnLine?.shadow?.startColor;
|
|
46270
46316
|
const shadowEndColor = theme.frozenColumnLine?.shadow?.endColor;
|
|
46271
|
-
theme.cellBorder?.borderColor ?? 'red';
|
|
46272
46317
|
const visible = theme.frozenColumnLine?.shadow?.visible;
|
|
46273
46318
|
this.frozenShadowLine = createRect({
|
|
46274
46319
|
visible: visible === 'always',
|
|
@@ -46434,19 +46479,19 @@
|
|
|
46434
46479
|
const visible1 = theme.scrollStyle?.visible;
|
|
46435
46480
|
const horizontalVisible = theme.scrollStyle?.horizontalVisible ?? visible1;
|
|
46436
46481
|
const verticalVisible = theme.scrollStyle?.verticalVisible ?? visible1;
|
|
46437
|
-
const tableWidth = Math.ceil(this.table.
|
|
46438
|
-
const tableHeight = Math.ceil(this.table.
|
|
46482
|
+
const tableWidth = Math.ceil(this.table.tableNoFrameWidth);
|
|
46483
|
+
const tableHeight = Math.ceil(this.table.tableNoFrameHeight);
|
|
46439
46484
|
const totalHeight = this.table.getAllRowsHeight();
|
|
46440
46485
|
const totalWidth = this.table.getAllColsWidth();
|
|
46441
46486
|
const frozenRowsHeight = this.table.getFrozenRowsHeight();
|
|
46442
46487
|
const frozenColsWidth = this.table.getFrozenColsWidth();
|
|
46443
46488
|
const bottomFrozenRowsHeight = this.table.getBottomFrozenRowsHeight();
|
|
46444
46489
|
const rightFrozenColsWidth = this.table.getRightFrozenColsWidth();
|
|
46490
|
+
const hoverOn = this.table.theme.scrollStyle.hoverOn;
|
|
46445
46491
|
const sizeTolerance = this.table.options.customConfig?._disableColumnAndRowSizeRound ? 1 : 0;
|
|
46446
46492
|
if (totalWidth > tableWidth + sizeTolerance) {
|
|
46447
46493
|
const y = Math.min(tableHeight, totalHeight);
|
|
46448
46494
|
const rangeEnd = Math.max(0.05, (tableWidth - frozenColsWidth) / (totalWidth - frozenColsWidth));
|
|
46449
|
-
const hoverOn = this.table.theme.scrollStyle.hoverOn;
|
|
46450
46495
|
let attrY = 0;
|
|
46451
46496
|
if (this.table.theme.scrollStyle.barToSide) {
|
|
46452
46497
|
attrY =
|
|
@@ -46457,10 +46502,21 @@
|
|
|
46457
46502
|
else {
|
|
46458
46503
|
attrY = y - (hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.y);
|
|
46459
46504
|
}
|
|
46505
|
+
let hScrollBarx = frozenColsWidth + (!hoverOn ? this.table.scenegraph.tableGroup.attribute.x : 0);
|
|
46506
|
+
let hScrollBarWidth = tableWidth - frozenColsWidth - rightFrozenColsWidth;
|
|
46507
|
+
const ignoreFrozenCols = this.table.theme.scrollStyle?.ignoreFrozenCols ?? false;
|
|
46508
|
+
if (ignoreFrozenCols) {
|
|
46509
|
+
hScrollBarx = !hoverOn ? this.table.scenegraph.tableGroup.attribute.x : 0;
|
|
46510
|
+
hScrollBarWidth = tableWidth;
|
|
46511
|
+
}
|
|
46512
|
+
else {
|
|
46513
|
+
hScrollBarx = frozenColsWidth + (!hoverOn ? this.table.scenegraph.tableGroup.attribute.x : 0);
|
|
46514
|
+
hScrollBarWidth = tableWidth - frozenColsWidth - rightFrozenColsWidth;
|
|
46515
|
+
}
|
|
46460
46516
|
this.hScrollBar.setAttributes({
|
|
46461
|
-
x:
|
|
46517
|
+
x: hScrollBarx,
|
|
46462
46518
|
y: attrY,
|
|
46463
|
-
width:
|
|
46519
|
+
width: hScrollBarWidth,
|
|
46464
46520
|
range: [0, rangeEnd],
|
|
46465
46521
|
visible: horizontalVisible === 'always'
|
|
46466
46522
|
});
|
|
@@ -46485,7 +46541,6 @@
|
|
|
46485
46541
|
const x = Math.min(tableWidth, totalWidth);
|
|
46486
46542
|
const rangeEnd = Math.max(0.05, (tableHeight - frozenRowsHeight) / (totalHeight - frozenRowsHeight));
|
|
46487
46543
|
let attrX = 0;
|
|
46488
|
-
const hoverOn = this.table.theme.scrollStyle.hoverOn;
|
|
46489
46544
|
if (this.table.theme.scrollStyle.barToSide) {
|
|
46490
46545
|
attrX =
|
|
46491
46546
|
this.table.tableNoFrameWidth -
|
|
@@ -46700,7 +46755,8 @@
|
|
|
46700
46755
|
}
|
|
46701
46756
|
setTopFrozenColumnShadow() {
|
|
46702
46757
|
const rowY = getRowTopY(this.table);
|
|
46703
|
-
if (this.table.columnHeaderLevelCount === this.table.frozenRowCount ||
|
|
46758
|
+
if (this.table.columnHeaderLevelCount === this.table.frozenRowCount ||
|
|
46759
|
+
this.table.theme.frozenColumnLine?.shadow?.visible !== 'always') {
|
|
46704
46760
|
this.topFrozenShadowLine.setAttributes({
|
|
46705
46761
|
visible: false,
|
|
46706
46762
|
y: 0,
|
|
@@ -49239,11 +49295,10 @@
|
|
|
49239
49295
|
});
|
|
49240
49296
|
|
|
49241
49297
|
function computeColsWidth(table, colStart, colEnd, update) {
|
|
49242
|
-
table.internalProps.columnWidthConfig &&
|
|
49243
|
-
table._parseColumnWidthConfig(table.internalProps.columnWidthConfig);
|
|
49298
|
+
table.internalProps.columnWidthConfig && _parseColumnWidthConfig(table, table.internalProps.columnWidthConfig);
|
|
49244
49299
|
table.isPivotTable() &&
|
|
49245
49300
|
table.internalProps.columnWidthConfigForRowHeader &&
|
|
49246
|
-
|
|
49301
|
+
_parseColumnWidthConfigForPivotRowHeader(table, table.internalProps.columnWidthConfigForRowHeader);
|
|
49247
49302
|
colStart = colStart ?? 0;
|
|
49248
49303
|
colEnd = colEnd ?? table.colCount - 1;
|
|
49249
49304
|
if (colStart === 0 && colEnd === table.colCount - 1) {
|
|
@@ -49801,6 +49856,83 @@
|
|
|
49801
49856
|
}
|
|
49802
49857
|
}
|
|
49803
49858
|
}
|
|
49859
|
+
function _parseColumnWidthConfig(table, columnWidthConfig) {
|
|
49860
|
+
if (table.isPivotTable()) {
|
|
49861
|
+
_parseColumnWidthConfigForPivotTable(table, columnWidthConfig);
|
|
49862
|
+
}
|
|
49863
|
+
else if (table.isListTable()) {
|
|
49864
|
+
_parseColumnWidthConfigForListTable(table, columnWidthConfig);
|
|
49865
|
+
}
|
|
49866
|
+
}
|
|
49867
|
+
function _parseColumnWidthConfigForListTable(table, columnWidthConfig) {
|
|
49868
|
+
for (let i = 0; i < columnWidthConfig?.length; i++) {
|
|
49869
|
+
const item = columnWidthConfig[i];
|
|
49870
|
+
const key = item.key;
|
|
49871
|
+
const width = item.width;
|
|
49872
|
+
const columnData = table.internalProps.layoutMap.getColumnByKey(key);
|
|
49873
|
+
if (columnData.columnDefine) {
|
|
49874
|
+
const { col } = columnData;
|
|
49875
|
+
if (!table.internalProps._widthResizedColMap.has(col)) {
|
|
49876
|
+
table._setColWidth(col, width);
|
|
49877
|
+
table.internalProps._widthResizedColMap.add(col);
|
|
49878
|
+
}
|
|
49879
|
+
}
|
|
49880
|
+
}
|
|
49881
|
+
}
|
|
49882
|
+
function _parseColumnWidthConfigForPivotTable(table, columnWidthConfig) {
|
|
49883
|
+
for (let i = 0; i < columnWidthConfig?.length; i++) {
|
|
49884
|
+
const item = columnWidthConfig[i];
|
|
49885
|
+
const dimensions = item.dimensions;
|
|
49886
|
+
const width = item.width;
|
|
49887
|
+
const cell = table.getCellAddressByHeaderPaths(dimensions);
|
|
49888
|
+
if (cell && cell.col >= table.rowHeaderLevelCount) {
|
|
49889
|
+
const cellPath = table.getCellHeaderPaths(cell.col, table.columnHeaderLevelCount);
|
|
49890
|
+
if (cellPath.colHeaderPaths.length === dimensions.length) {
|
|
49891
|
+
let match = true;
|
|
49892
|
+
for (let i = 0; i < dimensions.length; i++) {
|
|
49893
|
+
const dimension = dimensions[i];
|
|
49894
|
+
const finded = cellPath.colHeaderPaths.findIndex((colPath, index) => {
|
|
49895
|
+
if (colPath.indicatorKey === dimension.indicatorKey) {
|
|
49896
|
+
return true;
|
|
49897
|
+
}
|
|
49898
|
+
if (colPath.dimensionKey === dimension.dimensionKey && colPath.value === dimension.value) {
|
|
49899
|
+
return true;
|
|
49900
|
+
}
|
|
49901
|
+
return false;
|
|
49902
|
+
});
|
|
49903
|
+
if (finded < 0) {
|
|
49904
|
+
match = false;
|
|
49905
|
+
break;
|
|
49906
|
+
}
|
|
49907
|
+
}
|
|
49908
|
+
if (match && !table.internalProps._widthResizedColMap.has(cell.col)) {
|
|
49909
|
+
table._setColWidth(cell.col, width);
|
|
49910
|
+
table.internalProps._widthResizedColMap.add(cell.col);
|
|
49911
|
+
}
|
|
49912
|
+
}
|
|
49913
|
+
}
|
|
49914
|
+
else if (cell && cell.col < table.rowHeaderLevelCount) {
|
|
49915
|
+
if (!table.internalProps._widthResizedColMap.has(cell.col)) {
|
|
49916
|
+
table._setColWidth(cell.col, width);
|
|
49917
|
+
table.internalProps._widthResizedColMap.add(cell.col);
|
|
49918
|
+
}
|
|
49919
|
+
}
|
|
49920
|
+
}
|
|
49921
|
+
}
|
|
49922
|
+
function _parseColumnWidthConfigForPivotRowHeader(table, columnWidthConfig) {
|
|
49923
|
+
for (let i = 0; i < columnWidthConfig?.length; i++) {
|
|
49924
|
+
const item = columnWidthConfig[i];
|
|
49925
|
+
const dimensions = item.dimensions;
|
|
49926
|
+
const width = item.width;
|
|
49927
|
+
const cell = table.getCellAddressByHeaderPaths(dimensions);
|
|
49928
|
+
if (cell && cell.col < table.rowHeaderLevelCount) {
|
|
49929
|
+
if (!table.internalProps._widthResizedColMap.has(cell.col)) {
|
|
49930
|
+
table._setColWidth(cell.col, width);
|
|
49931
|
+
table.internalProps._widthResizedColMap.add(cell.col);
|
|
49932
|
+
}
|
|
49933
|
+
}
|
|
49934
|
+
}
|
|
49935
|
+
}
|
|
49804
49936
|
|
|
49805
49937
|
const emptyGroup = new Group$1({});
|
|
49806
49938
|
emptyGroup.role = 'empty';
|
|
@@ -49816,6 +49948,9 @@
|
|
|
49816
49948
|
else if (columnGroup.colHeight) {
|
|
49817
49949
|
y = columnGroup.colHeight;
|
|
49818
49950
|
}
|
|
49951
|
+
else if (rowStart >= table.columnHeaderLevelCount && rowStart < table.rowCount - table.bottomFrozenRowCount) {
|
|
49952
|
+
y = table.getRowsHeight(table.columnHeaderLevelCount, rowStart - 1);
|
|
49953
|
+
}
|
|
49819
49954
|
for (let j = rowStart; j <= rowEnd; j++) {
|
|
49820
49955
|
const row = j;
|
|
49821
49956
|
let cellLocation = table.getCellLocation(col, row);
|
|
@@ -49893,7 +50028,7 @@
|
|
|
49893
50028
|
if (vtableMerge) {
|
|
49894
50029
|
mayHaveIcon = true;
|
|
49895
50030
|
if (table.internalProps.groupTitleCustomLayout) {
|
|
49896
|
-
customResult = dealWithCustom(table.internalProps.groupTitleCustomLayout, undefined,
|
|
50031
|
+
customResult = dealWithCustom(table.internalProps.groupTitleCustomLayout, undefined, col, row, table.getColsWidth(range.start.col, range.end.col), table.getRowsHeight(range.start.row, range.end.row), false, table.isAutoRowHeight(row), [0, 0, 0, 0], range, table);
|
|
49897
50032
|
}
|
|
49898
50033
|
if (table.internalProps.groupTitleFieldFormat) {
|
|
49899
50034
|
value = table.internalProps.groupTitleFieldFormat(rawRecord, col, row, table);
|
|
@@ -53057,7 +53192,9 @@
|
|
|
53057
53192
|
const frozenRowsHeight = table.getFrozenRowsHeight();
|
|
53058
53193
|
const bottomFrozenRowsHeight = table.getBottomFrozenRowsHeight();
|
|
53059
53194
|
const totalFrozenRowsHeight = frozenRowsHeight + bottomFrozenRowsHeight;
|
|
53060
|
-
const
|
|
53195
|
+
const h = tableNoFrameHeight - totalFrozenRowsHeight;
|
|
53196
|
+
const hh = Math.min(allRowsHeight - totalFrozenRowsHeight, tableNoFrameHeight - totalFrozenRowsHeight);
|
|
53197
|
+
const bodyHeight = hh < h ? h : hh;
|
|
53061
53198
|
tableBodyDomContainer.style.width = `${tableNoFrameWidth}px`;
|
|
53062
53199
|
const tableHeight = Math.min(allRowsHeight - frozenRowsHeight, tableNoFrameHeight - frozenRowsHeight);
|
|
53063
53200
|
tableBodyDomContainer.style.height = `${tableHeight}px`;
|
|
@@ -54269,7 +54406,7 @@
|
|
|
54269
54406
|
}
|
|
54270
54407
|
updateCellRangeIcon(col, row, (icon) => icon.attribute.funcType === IconFuncTypeEnum.collapse || icon.attribute.funcType === IconFuncTypeEnum.expand, (icon) => {
|
|
54271
54408
|
dealWithIcon(iconConfig, icon);
|
|
54272
|
-
icon.name = iconConfig
|
|
54409
|
+
icon.name = iconConfig?.name;
|
|
54273
54410
|
}, scene);
|
|
54274
54411
|
}
|
|
54275
54412
|
function updateCellGroupIcon(cellGroup, filter, dealer) {
|
|
@@ -54855,6 +54992,22 @@
|
|
|
54855
54992
|
this.isPivot = this.table.isPivotTable();
|
|
54856
54993
|
initSceneGraph(this);
|
|
54857
54994
|
}
|
|
54995
|
+
canvasShowMenu() {
|
|
54996
|
+
this.stage.addEventListener('rightdown', (e) => {
|
|
54997
|
+
const eventArgsSet = getCellEventArgsSet(e);
|
|
54998
|
+
if (!eventArgsSet.eventArgs) {
|
|
54999
|
+
this.table.stateManager.triggerContextMenu(-1, -1, eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y);
|
|
55000
|
+
this.table.fireListeners(TABLE_EVENT_TYPE.CONTEXTMENU_CANVAS, {
|
|
55001
|
+
event: e,
|
|
55002
|
+
x: eventArgsSet.abstractPos.x,
|
|
55003
|
+
y: eventArgsSet.abstractPos.y,
|
|
55004
|
+
col: -1,
|
|
55005
|
+
row: -1,
|
|
55006
|
+
target: undefined
|
|
55007
|
+
});
|
|
55008
|
+
}
|
|
55009
|
+
});
|
|
55010
|
+
}
|
|
54858
55011
|
clearCells() {
|
|
54859
55012
|
this.table.animationManager.clear();
|
|
54860
55013
|
if (this.table.isPivotChart() || this.table._hasCustomRenderOrLayout()) {
|
|
@@ -55703,6 +55856,9 @@
|
|
|
55703
55856
|
if (this.table.options.animationAppear) {
|
|
55704
55857
|
dealWithAnimationAppear(this.table);
|
|
55705
55858
|
}
|
|
55859
|
+
if (this.table.options.menu?.contextMenuWorkOnlyCell === false) {
|
|
55860
|
+
this.canvasShowMenu();
|
|
55861
|
+
}
|
|
55706
55862
|
this.updateNextFrame();
|
|
55707
55863
|
}
|
|
55708
55864
|
dealWidthMode() {
|
|
@@ -56210,9 +56366,11 @@
|
|
|
56210
56366
|
this.component.updateScrollBar();
|
|
56211
56367
|
this.updateNextFrame();
|
|
56212
56368
|
}
|
|
56213
|
-
updateCol(removeCells, addCells, updateCells = []) {
|
|
56369
|
+
updateCol(removeCells, addCells, updateCells = [], recalculateColWidths = true) {
|
|
56214
56370
|
updateCol(removeCells, addCells, updateCells, this.table);
|
|
56215
|
-
|
|
56371
|
+
if (recalculateColWidths) {
|
|
56372
|
+
this.recalculateColWidths();
|
|
56373
|
+
}
|
|
56216
56374
|
this.recalculateRowHeights();
|
|
56217
56375
|
this.table.stateManager.checkFrozen();
|
|
56218
56376
|
if (!this.isPivot && !this.table.transpose) {
|
|
@@ -57559,6 +57717,7 @@
|
|
|
57559
57717
|
}
|
|
57560
57718
|
state.columnResize.x = xInTable;
|
|
57561
57719
|
state.table.scenegraph.component.updateResizeCol(state.columnResize.col, yInTable, state.columnResize.isRightFrozen);
|
|
57720
|
+
state.table._updateSize();
|
|
57562
57721
|
if (state.columnResize.col < state.table.frozenColCount &&
|
|
57563
57722
|
!state.table.isPivotTable() &&
|
|
57564
57723
|
!state.table.transpose) {
|
|
@@ -58219,6 +58378,7 @@
|
|
|
58219
58378
|
}
|
|
58220
58379
|
state.rowResize.y = yInTable;
|
|
58221
58380
|
state.table.scenegraph.component.updateResizeRow(state.rowResize.row, xInTable, state.rowResize.isBottomFrozen);
|
|
58381
|
+
state.table._updateSize();
|
|
58222
58382
|
state.table.scenegraph.updateNextFrame();
|
|
58223
58383
|
}
|
|
58224
58384
|
function updateResizeColForRow(detaY, state) {
|
|
@@ -60370,40 +60530,63 @@
|
|
|
60370
60530
|
if (eventArgsSet.eventArgs) {
|
|
60371
60531
|
stateManager.triggerContextMenu(eventArgsSet.eventArgs.col, eventArgsSet.eventArgs.row, eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y);
|
|
60372
60532
|
const { col, row } = eventArgsSet.eventArgs;
|
|
60373
|
-
if (
|
|
60374
|
-
const
|
|
60375
|
-
let
|
|
60376
|
-
|
|
60377
|
-
|
|
60378
|
-
|
|
60379
|
-
|
|
60380
|
-
|
|
60381
|
-
|
|
60533
|
+
if (col >= 0 && row >= 0) {
|
|
60534
|
+
const ranges = table.getSelectedCellRanges();
|
|
60535
|
+
let cellInRange = false;
|
|
60536
|
+
if (ranges.length > 0) {
|
|
60537
|
+
for (let i = 0; i < ranges.length; i++) {
|
|
60538
|
+
const range = ranges[i];
|
|
60539
|
+
const startCol = range.start.col;
|
|
60540
|
+
const endCol = range.end.col;
|
|
60541
|
+
const startRow = range.start.row;
|
|
60542
|
+
const endRow = range.end.row;
|
|
60543
|
+
if ((col >= startCol && col <= endCol && row >= startRow && row <= endRow) ||
|
|
60544
|
+
(col >= endCol && col <= startCol && row >= endRow && row <= startRow) ||
|
|
60545
|
+
(col >= startCol && col <= endCol && row >= endRow && row <= startRow) ||
|
|
60546
|
+
(col >= endCol && col <= startCol && row >= startRow && row <= endRow)) {
|
|
60547
|
+
cellInRange = true;
|
|
60548
|
+
break;
|
|
60549
|
+
}
|
|
60382
60550
|
}
|
|
60383
60551
|
}
|
|
60384
|
-
|
|
60385
|
-
|
|
60386
|
-
|
|
60387
|
-
|
|
60388
|
-
|
|
60389
|
-
|
|
60390
|
-
|
|
60391
|
-
|
|
60392
|
-
|
|
60552
|
+
if (!cellInRange) {
|
|
60553
|
+
table.selectCell(col, row);
|
|
60554
|
+
}
|
|
60555
|
+
if (table.hasListeners(TABLE_EVENT_TYPE.CONTEXTMENU_CELL)) {
|
|
60556
|
+
const cellInfo = table.getCellInfo(col, row);
|
|
60557
|
+
let icon;
|
|
60558
|
+
let position;
|
|
60559
|
+
if (eventArgsSet.eventArgs?.target) {
|
|
60560
|
+
const iconInfo = getIconAndPositionFromTarget(eventArgsSet.eventArgs?.target);
|
|
60561
|
+
if (iconInfo) {
|
|
60562
|
+
icon = iconInfo.icon;
|
|
60563
|
+
position = iconInfo.position;
|
|
60393
60564
|
}
|
|
60394
|
-
: undefined,
|
|
60395
|
-
target: eventArgsSet?.eventArgs?.target,
|
|
60396
|
-
mergeCellInfo: eventArgsSet.eventArgs?.mergeInfo
|
|
60397
|
-
};
|
|
60398
|
-
if (table.options.eventOptions?.contextmenuReturnAllSelectedCells ?? true) {
|
|
60399
|
-
if (cellInRanges(table.stateManager.select.ranges, col, row)) {
|
|
60400
|
-
cellsEvent.cells = table.getSelectedCellInfos();
|
|
60401
60565
|
}
|
|
60402
|
-
|
|
60403
|
-
|
|
60566
|
+
const cellsEvent = {
|
|
60567
|
+
...cellInfo,
|
|
60568
|
+
event: e.nativeEvent,
|
|
60569
|
+
cells: [],
|
|
60570
|
+
targetIcon: icon
|
|
60571
|
+
? {
|
|
60572
|
+
name: icon.name,
|
|
60573
|
+
position: position,
|
|
60574
|
+
funcType: icon.attribute.funcType
|
|
60575
|
+
}
|
|
60576
|
+
: undefined,
|
|
60577
|
+
target: eventArgsSet?.eventArgs?.target,
|
|
60578
|
+
mergeCellInfo: eventArgsSet.eventArgs?.mergeInfo
|
|
60579
|
+
};
|
|
60580
|
+
if (table.options.eventOptions?.contextmenuReturnAllSelectedCells ?? true) {
|
|
60581
|
+
if (cellInRanges(table.stateManager.select.ranges, col, row)) {
|
|
60582
|
+
cellsEvent.cells = table.getSelectedCellInfos();
|
|
60583
|
+
}
|
|
60584
|
+
else {
|
|
60585
|
+
cellsEvent.cells = [[cellInfo]];
|
|
60586
|
+
}
|
|
60404
60587
|
}
|
|
60588
|
+
table.fireListeners(TABLE_EVENT_TYPE.CONTEXTMENU_CELL, cellsEvent);
|
|
60405
60589
|
}
|
|
60406
|
-
table.fireListeners(TABLE_EVENT_TYPE.CONTEXTMENU_CELL, cellsEvent);
|
|
60407
60590
|
}
|
|
60408
60591
|
}
|
|
60409
60592
|
});
|
|
@@ -61628,8 +61811,12 @@
|
|
|
61628
61811
|
table.stateManager.updateInteractionState(InteractionState.grabing);
|
|
61629
61812
|
const targetCol = table.getTargetColAtConsiderRightFrozen(selectX, considerFrozenX);
|
|
61630
61813
|
const targetRow = table.getTargetRowAtConsiderBottomFrozen(selectY, considerFrozenY);
|
|
61631
|
-
if (!table.options.select?.disableDragSelect &&
|
|
61632
|
-
(
|
|
61814
|
+
if (!table.options.select?.disableDragSelect &&
|
|
61815
|
+
isValid$3(targetCol) &&
|
|
61816
|
+
isValid$3(targetRow) &&
|
|
61817
|
+
(!table.options.select?.disableSelect ||
|
|
61818
|
+
!(typeof table.options.select?.disableSelect === 'function' &&
|
|
61819
|
+
table.options.select?.disableSelect?.(targetCol.col, targetRow.row, table)))) {
|
|
61633
61820
|
table.stateManager.updateSelectPos(targetCol.col, targetRow.row, false, false, false, false);
|
|
61634
61821
|
}
|
|
61635
61822
|
});
|
|
@@ -63385,6 +63572,9 @@
|
|
|
63385
63572
|
const rect = table.getCellRangeRelativeRect({ col, row });
|
|
63386
63573
|
const element = table.internalProps.menu.parentElement ?? table.getElement();
|
|
63387
63574
|
const { top, bottom, left, right } = rect;
|
|
63575
|
+
if (col === -1 && row === -1) {
|
|
63576
|
+
return true;
|
|
63577
|
+
}
|
|
63388
63578
|
if (table.isFrozenCell(col, row)) {
|
|
63389
63579
|
return true;
|
|
63390
63580
|
}
|
|
@@ -64976,22 +65166,24 @@
|
|
|
64976
65166
|
}
|
|
64977
65167
|
}
|
|
64978
65168
|
function generateLayoutTree(tree, children) {
|
|
64979
|
-
|
|
64980
|
-
|
|
64981
|
-
|
|
64982
|
-
|
|
64983
|
-
|
|
64984
|
-
|
|
64985
|
-
|
|
64986
|
-
|
|
64987
|
-
|
|
64988
|
-
|
|
64989
|
-
|
|
64990
|
-
|
|
64991
|
-
|
|
64992
|
-
|
|
64993
|
-
|
|
64994
|
-
|
|
65169
|
+
if (Array.isArray(children)) {
|
|
65170
|
+
children?.forEach((node) => {
|
|
65171
|
+
const diemnsonNode = {
|
|
65172
|
+
dimensionKey: node.dimensionKey,
|
|
65173
|
+
indicatorKey: node.indicatorKey,
|
|
65174
|
+
value: node.value,
|
|
65175
|
+
hierarchyState: node.hierarchyState,
|
|
65176
|
+
children: undefined,
|
|
65177
|
+
virtual: node.virtual ?? false,
|
|
65178
|
+
levelSpan: node.levelSpan ?? 1
|
|
65179
|
+
};
|
|
65180
|
+
tree.push(diemnsonNode);
|
|
65181
|
+
if (node.children) {
|
|
65182
|
+
diemnsonNode.children = [];
|
|
65183
|
+
generateLayoutTree(diemnsonNode.children, node.children);
|
|
65184
|
+
}
|
|
65185
|
+
});
|
|
65186
|
+
}
|
|
64995
65187
|
}
|
|
64996
65188
|
function countLayoutTree(children, countParentNode) {
|
|
64997
65189
|
let count = 0;
|
|
@@ -67274,7 +67466,7 @@
|
|
|
67274
67466
|
return TABLE_EVENT_TYPE;
|
|
67275
67467
|
}
|
|
67276
67468
|
options;
|
|
67277
|
-
version = "1.0.
|
|
67469
|
+
version = "1.0.14";
|
|
67278
67470
|
pagination;
|
|
67279
67471
|
id = `VTable${Date.now()}`;
|
|
67280
67472
|
headerStyleCache;
|
|
@@ -67968,8 +68160,17 @@
|
|
|
67968
68160
|
widthP = this.canvasWidth - 1;
|
|
67969
68161
|
heightP = this.canvasHeight - 1;
|
|
67970
68162
|
}
|
|
67971
|
-
const
|
|
67972
|
-
|
|
68163
|
+
const scrollStyle = this.getTheme().scrollStyle;
|
|
68164
|
+
let vScrollBarWidth = 0;
|
|
68165
|
+
let hScrollBarWidth = 0;
|
|
68166
|
+
vScrollBarWidth = this.shouldVScrollBarWidthShow(widthP, heightP, scrollStyle)
|
|
68167
|
+
? getVerticalScrollBarSize(scrollStyle)
|
|
68168
|
+
: 0;
|
|
68169
|
+
hScrollBarWidth = this.shouldHScrollBarWidthShow(widthP, heightP, scrollStyle)
|
|
68170
|
+
? getHorizontalScrollBarSize(scrollStyle)
|
|
68171
|
+
: 0;
|
|
68172
|
+
const width = Math.floor(widthP - vScrollBarWidth);
|
|
68173
|
+
const height = Math.floor(heightP - hScrollBarWidth);
|
|
67973
68174
|
if (this.internalProps.theme?.frameStyle) {
|
|
67974
68175
|
const lineWidths = toBoxArray(this.internalProps.theme.frameStyle?.borderLineWidth ?? [null]);
|
|
67975
68176
|
const shadowWidths = toBoxArray(this.internalProps.theme.frameStyle?.shadowBlur ?? [0]);
|
|
@@ -67982,15 +68183,67 @@
|
|
|
67982
68183
|
else {
|
|
67983
68184
|
this.tableX = (lineWidths[3] ?? 0) + (shadowWidths[3] ?? 0);
|
|
67984
68185
|
this.tableY = (lineWidths[0] ?? 0) + (shadowWidths[0] ?? 0);
|
|
68186
|
+
const rightBorder = (lineWidths[1] ?? 0) + (shadowWidths[1] ?? 0);
|
|
67985
68187
|
this.tableNoFrameWidth =
|
|
67986
|
-
width -
|
|
68188
|
+
width -
|
|
68189
|
+
(rightBorder > vScrollBarWidth ? rightBorder - vScrollBarWidth : 0) -
|
|
68190
|
+
((lineWidths[3] ?? 0) + (shadowWidths[3] ?? 0));
|
|
68191
|
+
const bottomBorder = (lineWidths[2] ?? 0) + (shadowWidths[2] ?? 0);
|
|
67987
68192
|
this.tableNoFrameHeight =
|
|
67988
|
-
height -
|
|
68193
|
+
height -
|
|
68194
|
+
(bottomBorder > hScrollBarWidth ? bottomBorder - hScrollBarWidth : 0) -
|
|
68195
|
+
((lineWidths[0] ?? 0) + (shadowWidths[0] ?? 0));
|
|
67989
68196
|
}
|
|
67990
68197
|
}
|
|
67991
68198
|
this._clearColRangeWidthsMap();
|
|
67992
68199
|
this._clearRowRangeHeightsMap();
|
|
67993
68200
|
}
|
|
68201
|
+
shouldVScrollBarWidthShow(tableWidth, tableHeight, scrollStyle) {
|
|
68202
|
+
if (scrollStyle.hoverOn || scrollStyle.visible === 'none') {
|
|
68203
|
+
return false;
|
|
68204
|
+
}
|
|
68205
|
+
const totalHeight = this.getAllRowsHeight();
|
|
68206
|
+
const sizeTolerance = scrollStyle.visible ? getHorizontalScrollBarSize(scrollStyle) : 0;
|
|
68207
|
+
const isHScrollBarDecideVScrollBar = totalHeight > tableHeight - sizeTolerance && totalHeight <= tableHeight;
|
|
68208
|
+
if (isHScrollBarDecideVScrollBar) {
|
|
68209
|
+
const totalWidth = this.getAllColsWidth();
|
|
68210
|
+
const sizeTolerance = scrollStyle.visible ? getVerticalScrollBarSize(scrollStyle) : 0;
|
|
68211
|
+
const isVScrollBarDecideHScrollBar = totalWidth > tableWidth - sizeTolerance && totalWidth <= tableWidth;
|
|
68212
|
+
if (isVScrollBarDecideHScrollBar) {
|
|
68213
|
+
return false;
|
|
68214
|
+
}
|
|
68215
|
+
if (totalWidth > tableWidth) {
|
|
68216
|
+
return true;
|
|
68217
|
+
}
|
|
68218
|
+
if (totalWidth <= tableWidth - sizeTolerance) {
|
|
68219
|
+
return false;
|
|
68220
|
+
}
|
|
68221
|
+
}
|
|
68222
|
+
return !(totalHeight <= tableHeight - sizeTolerance);
|
|
68223
|
+
}
|
|
68224
|
+
shouldHScrollBarWidthShow(tableWidth, tableHeight, scrollStyle) {
|
|
68225
|
+
if (scrollStyle.hoverOn || scrollStyle.visible === 'none') {
|
|
68226
|
+
return false;
|
|
68227
|
+
}
|
|
68228
|
+
const totalWidth = this.getAllColsWidth();
|
|
68229
|
+
const sizeTolerance = scrollStyle.visible ? getVerticalScrollBarSize(scrollStyle) : 0;
|
|
68230
|
+
const isVScrollBarDecideHScrollBar = totalWidth > tableWidth - sizeTolerance && totalWidth <= tableWidth;
|
|
68231
|
+
if (isVScrollBarDecideHScrollBar) {
|
|
68232
|
+
const totalHeight = this.getAllRowsHeight();
|
|
68233
|
+
const sizeTolerance = scrollStyle.visible ? getHorizontalScrollBarSize(scrollStyle) : 0;
|
|
68234
|
+
const isHScrollBarDecideVScrollBar = totalHeight > tableHeight - sizeTolerance && totalHeight <= tableHeight;
|
|
68235
|
+
if (isHScrollBarDecideVScrollBar) {
|
|
68236
|
+
return false;
|
|
68237
|
+
}
|
|
68238
|
+
if (totalHeight > tableHeight) {
|
|
68239
|
+
return true;
|
|
68240
|
+
}
|
|
68241
|
+
if (totalHeight <= tableHeight - sizeTolerance) {
|
|
68242
|
+
return false;
|
|
68243
|
+
}
|
|
68244
|
+
}
|
|
68245
|
+
return !(totalWidth <= tableWidth - sizeTolerance);
|
|
68246
|
+
}
|
|
67994
68247
|
updateViewBox(newViewBox) {
|
|
67995
68248
|
const oldWidth = (this.options?.viewBox?.x2 ?? 0) - (this.options?.viewBox?.x1 ?? 0);
|
|
67996
68249
|
const oldHeight = (this.options?.viewBox?.y2 ?? 0) - (this.options?.viewBox?.y1 ?? 0);
|
|
@@ -73128,7 +73381,7 @@
|
|
|
73128
73381
|
}
|
|
73129
73382
|
const expand = !hd.hierarchyState || hd.hierarchyState === HierarchyState.expand;
|
|
73130
73383
|
if (!!hd.columns && !!expand) {
|
|
73131
|
-
const isAllHided = hd.columns.every((c) => c.hide);
|
|
73384
|
+
const isAllHided = hd.columns.every((c) => c.hide) || hd.hide;
|
|
73132
73385
|
!isAllHided &&
|
|
73133
73386
|
this._addHeaders(maxRow + 1, hd.columns, [...roots, id], hd.hideColumnsSubHeader || hideColumnsSubHeader, hd.levelSpan).forEach(c => results.push(c));
|
|
73134
73387
|
}
|
|
@@ -74704,7 +74957,6 @@
|
|
|
74704
74957
|
if (options.title) {
|
|
74705
74958
|
const Title = Factory.getComponent('title');
|
|
74706
74959
|
internalProps.title = new Title(options.title, this);
|
|
74707
|
-
this.scenegraph.resize();
|
|
74708
74960
|
}
|
|
74709
74961
|
if (this.options.emptyTip) {
|
|
74710
74962
|
if (this.internalProps.emptyTip) {
|
|
@@ -74721,6 +74973,10 @@
|
|
|
74721
74973
|
this.listTreeStickCellPlugin = new ListTreeStickCellPlugin(this);
|
|
74722
74974
|
}
|
|
74723
74975
|
setTimeout(() => {
|
|
74976
|
+
if (this.isReleased) {
|
|
74977
|
+
return;
|
|
74978
|
+
}
|
|
74979
|
+
this.resize();
|
|
74724
74980
|
this.fireListeners(TABLE_EVENT_TYPE.INITIALIZED, null);
|
|
74725
74981
|
}, 0);
|
|
74726
74982
|
}
|
|
@@ -74779,6 +75035,7 @@
|
|
|
74779
75035
|
this.headerStyleCache = new Map();
|
|
74780
75036
|
this.bodyStyleCache = new Map();
|
|
74781
75037
|
this.bodyBottomStyleCache = new Map();
|
|
75038
|
+
this._updateSize();
|
|
74782
75039
|
this.scenegraph.createSceneGraph();
|
|
74783
75040
|
this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row);
|
|
74784
75041
|
this.renderAsync();
|
|
@@ -75110,6 +75367,9 @@
|
|
|
75110
75367
|
table.colCount = layoutMap.colCount ?? 0;
|
|
75111
75368
|
table.rowCount = layoutMap.recordsCount * layoutMap.bodyRowSpanCount + layoutMap.headerLevelCount;
|
|
75112
75369
|
this.internalProps.frozenColCount = this.options.frozenColCount ?? 0;
|
|
75370
|
+
if (this.options.frozenColCount >= this.colCount) {
|
|
75371
|
+
this.internalProps.frozenColCount = 0;
|
|
75372
|
+
}
|
|
75113
75373
|
table.frozenRowCount = Math.max(layoutMap.headerLevelCount, this.options.frozenRowCount ?? 0);
|
|
75114
75374
|
if (table.bottomFrozenRowCount !== (this.options.bottomFrozenRowCount ?? 0)) {
|
|
75115
75375
|
table.bottomFrozenRowCount = this.options.bottomFrozenRowCount ?? 0;
|
|
@@ -75440,6 +75700,7 @@
|
|
|
75440
75700
|
this.refreshRowColCount();
|
|
75441
75701
|
this.stateManager.initCheckedState(this.records);
|
|
75442
75702
|
this.scenegraph.createSceneGraph();
|
|
75703
|
+
this.resize();
|
|
75443
75704
|
}
|
|
75444
75705
|
getCheckboxState(field) {
|
|
75445
75706
|
if (this.stateManager.checkedState.size < this.rowCount - this.columnHeaderLevelCount) {
|
|
@@ -75554,11 +75815,11 @@
|
|
|
75554
75815
|
this.clearCellStyleCache();
|
|
75555
75816
|
this.scenegraph.createSceneGraph();
|
|
75556
75817
|
this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row);
|
|
75818
|
+
this._updateSize();
|
|
75557
75819
|
if (this.internalProps.title && !this.internalProps.title.isReleased) {
|
|
75558
|
-
this._updateSize();
|
|
75559
75820
|
this.internalProps.title.resize();
|
|
75560
|
-
this.scenegraph.resize();
|
|
75561
75821
|
}
|
|
75822
|
+
this.scenegraph.resize();
|
|
75562
75823
|
if (this.options.emptyTip) {
|
|
75563
75824
|
if (this.internalProps.emptyTip) {
|
|
75564
75825
|
this.internalProps.emptyTip?.resetVisible();
|
|
@@ -75725,21 +75986,6 @@
|
|
|
75725
75986
|
}
|
|
75726
75987
|
return this.dataSource.getTableIndex(index);
|
|
75727
75988
|
}
|
|
75728
|
-
_parseColumnWidthConfig(columnWidthConfig) {
|
|
75729
|
-
for (let i = 0; i < columnWidthConfig?.length; i++) {
|
|
75730
|
-
const item = columnWidthConfig[i];
|
|
75731
|
-
const key = item.key;
|
|
75732
|
-
const width = item.width;
|
|
75733
|
-
const columnData = this.internalProps.layoutMap.getColumnByKey(key);
|
|
75734
|
-
if (columnData.columnDefine) {
|
|
75735
|
-
const { col } = columnData;
|
|
75736
|
-
if (!this.internalProps._widthResizedColMap.has(col)) {
|
|
75737
|
-
this._setColWidth(col, width);
|
|
75738
|
-
this.internalProps._widthResizedColMap.add(col);
|
|
75739
|
-
}
|
|
75740
|
-
}
|
|
75741
|
-
}
|
|
75742
|
-
}
|
|
75743
75989
|
release() {
|
|
75744
75990
|
this.editorManager.release();
|
|
75745
75991
|
super.release();
|
|
@@ -77872,10 +78118,11 @@
|
|
|
77872
78118
|
if (!this.legendComponent || this.visible === false) {
|
|
77873
78119
|
return;
|
|
77874
78120
|
}
|
|
77875
|
-
this.
|
|
77876
|
-
|
|
77877
|
-
|
|
78121
|
+
const attrs = this.getLegendAttributes({
|
|
78122
|
+
width: this.table.tableNoFrameWidth,
|
|
78123
|
+
height: this.table.tableNoFrameHeight
|
|
77878
78124
|
});
|
|
78125
|
+
this.legendComponent.setAttributes(attrs);
|
|
77879
78126
|
this.adjustTableSize(this.legendComponent.attribute);
|
|
77880
78127
|
}
|
|
77881
78128
|
adjustTableSize(attrs) {
|
|
@@ -78565,6 +78812,19 @@
|
|
|
78565
78812
|
}
|
|
78566
78813
|
};
|
|
78567
78814
|
function getMenuInstanceInfo(table, col, row, type, dropDownMenuOptions) {
|
|
78815
|
+
if (col === -1 && row === -1 && type === 'context-menu') {
|
|
78816
|
+
if (dropDownMenuOptions?.content) {
|
|
78817
|
+
return {
|
|
78818
|
+
type,
|
|
78819
|
+
position: dropDownMenuOptions.position,
|
|
78820
|
+
referencePosition: dropDownMenuOptions.referencePosition ?? {
|
|
78821
|
+
rect: { left: 0, right: 0, top: 0, bottom: 0, width: 0, height: 0 }
|
|
78822
|
+
},
|
|
78823
|
+
content: dropDownMenuOptions.content
|
|
78824
|
+
};
|
|
78825
|
+
}
|
|
78826
|
+
return null;
|
|
78827
|
+
}
|
|
78568
78828
|
const { lineHeight, textBaseline, textStick } = table._getCellStyle(col, row);
|
|
78569
78829
|
let rect = table.getCellRangeRelativeRect(table.getCellRange(col, row));
|
|
78570
78830
|
if (textStick) {
|
|
@@ -78647,7 +78907,9 @@
|
|
|
78647
78907
|
const { instance, info: menuInstanceInfo } = instanceInfo;
|
|
78648
78908
|
const attach = instance && instance.bindMenuElement(col, row, menuInstanceInfo);
|
|
78649
78909
|
if (attach) {
|
|
78650
|
-
const range =
|
|
78910
|
+
const range = col === -1 && row === -1
|
|
78911
|
+
? { start: { col: -1, row: -1 }, end: { col: -1, row: -1 } }
|
|
78912
|
+
: this._table.getCellRange(col, row);
|
|
78651
78913
|
this._attachInfo = { range, instance };
|
|
78652
78914
|
}
|
|
78653
78915
|
}
|
|
@@ -78708,6 +78970,22 @@
|
|
|
78708
78970
|
});
|
|
78709
78971
|
}
|
|
78710
78972
|
});
|
|
78973
|
+
table.on(TABLE_EVENT_TYPE.CONTEXTMENU_CANVAS, e => {
|
|
78974
|
+
if (table.internalProps.menu?.renderMode === 'html') {
|
|
78975
|
+
const abstractPos = table._getMouseAbstractPoint(e.event);
|
|
78976
|
+
let menu = null;
|
|
78977
|
+
if (abstractPos.inTable && typeof table.internalProps.menu?.contextMenuItems === 'function') {
|
|
78978
|
+
menu = table.internalProps.menu.contextMenuItems(table.getHeaderField(e.col, e.row), e.row, e.col, table);
|
|
78979
|
+
}
|
|
78980
|
+
else if (abstractPos.inTable && Array.isArray(table.internalProps.menu?.contextMenuItems)) {
|
|
78981
|
+
menu = table.internalProps.menu?.contextMenuItems;
|
|
78982
|
+
}
|
|
78983
|
+
this._bindToCell(-1, -1, 'context-menu', {
|
|
78984
|
+
content: menu,
|
|
78985
|
+
position: { x: abstractPos.x, y: abstractPos.y }
|
|
78986
|
+
});
|
|
78987
|
+
}
|
|
78988
|
+
});
|
|
78711
78989
|
}
|
|
78712
78990
|
_getMenuInstanceInfo(col, row, type, dropDownMenuOptions) {
|
|
78713
78991
|
const table = this._table;
|
|
@@ -84807,10 +85085,10 @@
|
|
|
84807
85085
|
needLowestLevel_colPaths = true;
|
|
84808
85086
|
needLowestLevel_rowPaths = true;
|
|
84809
85087
|
}
|
|
84810
|
-
if (colHeaderPaths.length >= this._getColumnHeaderTreeExpandedMaxLevelCount()) {
|
|
85088
|
+
if ((colHeaderPaths?.length ?? 0) && colHeaderPaths.length >= this._getColumnHeaderTreeExpandedMaxLevelCount()) {
|
|
84811
85089
|
needLowestLevel_colPaths = true;
|
|
84812
85090
|
}
|
|
84813
|
-
if (rowHeaderPaths.length >= this._getRowHeaderTreeExpandedMaxLevelCount()) {
|
|
85091
|
+
if ((rowHeaderPaths?.length ?? 0) && rowHeaderPaths.length >= this._getRowHeaderTreeExpandedMaxLevelCount()) {
|
|
84814
85092
|
needLowestLevel_rowPaths = true;
|
|
84815
85093
|
}
|
|
84816
85094
|
let col;
|
|
@@ -87859,7 +88137,6 @@
|
|
|
87859
88137
|
if (options.title) {
|
|
87860
88138
|
const Title = Factory.getComponent('title');
|
|
87861
88139
|
this.internalProps.title = new Title(options.title, this);
|
|
87862
|
-
this.scenegraph.resize();
|
|
87863
88140
|
}
|
|
87864
88141
|
if (this.options.emptyTip) {
|
|
87865
88142
|
if (this.internalProps.emptyTip) {
|
|
@@ -87872,6 +88149,10 @@
|
|
|
87872
88149
|
}
|
|
87873
88150
|
}
|
|
87874
88151
|
setTimeout(() => {
|
|
88152
|
+
if (this.isReleased) {
|
|
88153
|
+
return;
|
|
88154
|
+
}
|
|
88155
|
+
this.resize();
|
|
87875
88156
|
this.fireListeners(TABLE_EVENT_TYPE.INITIALIZED, null);
|
|
87876
88157
|
}, 0);
|
|
87877
88158
|
}
|
|
@@ -88110,7 +88391,7 @@
|
|
|
88110
88391
|
if (sourceNode.value === targetNode.value && sourceNode.dimensionKey === targetNode.dimensionKey) {
|
|
88111
88392
|
targetNode.hierarchyState =
|
|
88112
88393
|
targetNode.hierarchyState ?? (targetNode?.children ? sourceNode.hierarchyState : undefined);
|
|
88113
|
-
targetNode?.children?.forEach((targetChildNode, index) => {
|
|
88394
|
+
targetNode?.children?.forEach?.((targetChildNode, index) => {
|
|
88114
88395
|
if (sourceNode?.children?.[index] && targetChildNode) {
|
|
88115
88396
|
const beforeRowDimension = sourceNode.children.find((item) => item.dimensionKey === targetChildNode.dimensionKey && item.value === targetChildNode.value);
|
|
88116
88397
|
if (beforeRowDimension) {
|
|
@@ -88579,60 +88860,6 @@
|
|
|
88579
88860
|
});
|
|
88580
88861
|
}
|
|
88581
88862
|
}
|
|
88582
|
-
_parseColumnWidthConfig(columnWidthConfig) {
|
|
88583
|
-
for (let i = 0; i < columnWidthConfig?.length; i++) {
|
|
88584
|
-
const item = columnWidthConfig[i];
|
|
88585
|
-
const dimensions = item.dimensions;
|
|
88586
|
-
const width = item.width;
|
|
88587
|
-
const cell = this.getCellAddressByHeaderPaths(dimensions);
|
|
88588
|
-
if (cell && cell.col >= this.rowHeaderLevelCount) {
|
|
88589
|
-
const cellPath = this.getCellHeaderPaths(cell.col, this.columnHeaderLevelCount);
|
|
88590
|
-
if (cellPath.colHeaderPaths.length === dimensions.length) {
|
|
88591
|
-
let match = true;
|
|
88592
|
-
for (let i = 0; i < dimensions.length; i++) {
|
|
88593
|
-
const dimension = dimensions[i];
|
|
88594
|
-
const finded = cellPath.colHeaderPaths.findIndex((colPath, index) => {
|
|
88595
|
-
if (colPath.indicatorKey === dimension.indicatorKey) {
|
|
88596
|
-
return true;
|
|
88597
|
-
}
|
|
88598
|
-
if (colPath.dimensionKey === dimension.dimensionKey && colPath.value === dimension.value) {
|
|
88599
|
-
return true;
|
|
88600
|
-
}
|
|
88601
|
-
return false;
|
|
88602
|
-
});
|
|
88603
|
-
if (finded < 0) {
|
|
88604
|
-
match = false;
|
|
88605
|
-
break;
|
|
88606
|
-
}
|
|
88607
|
-
}
|
|
88608
|
-
if (match && !this.internalProps._widthResizedColMap.has(cell.col)) {
|
|
88609
|
-
this._setColWidth(cell.col, width);
|
|
88610
|
-
this.internalProps._widthResizedColMap.add(cell.col);
|
|
88611
|
-
}
|
|
88612
|
-
}
|
|
88613
|
-
}
|
|
88614
|
-
else if (cell && cell.col < this.rowHeaderLevelCount) {
|
|
88615
|
-
if (!this.internalProps._widthResizedColMap.has(cell.col)) {
|
|
88616
|
-
this._setColWidth(cell.col, width);
|
|
88617
|
-
this.internalProps._widthResizedColMap.add(cell.col);
|
|
88618
|
-
}
|
|
88619
|
-
}
|
|
88620
|
-
}
|
|
88621
|
-
}
|
|
88622
|
-
_parseColumnWidthConfigForRowHeader(columnWidthConfig) {
|
|
88623
|
-
for (let i = 0; i < columnWidthConfig?.length; i++) {
|
|
88624
|
-
const item = columnWidthConfig[i];
|
|
88625
|
-
const dimensions = item.dimensions;
|
|
88626
|
-
const width = item.width;
|
|
88627
|
-
const cell = this.getCellAddressByHeaderPaths(dimensions);
|
|
88628
|
-
if (cell && cell.col < this.rowHeaderLevelCount) {
|
|
88629
|
-
if (!this.internalProps._widthResizedColMap.has(cell.col)) {
|
|
88630
|
-
this._setColWidth(cell.col, width);
|
|
88631
|
-
this.internalProps._widthResizedColMap.add(cell.col);
|
|
88632
|
-
}
|
|
88633
|
-
}
|
|
88634
|
-
}
|
|
88635
|
-
}
|
|
88636
88863
|
updatePivotSortState(pivotSortStateConfig) {
|
|
88637
88864
|
this.pivotSortState = pivotSortStateConfig;
|
|
88638
88865
|
}
|
|
@@ -89504,6 +89731,8 @@
|
|
|
89504
89731
|
this.internalProps.columnResizeType = options.resize?.columnResizeType ?? options.columnResizeType ?? 'column';
|
|
89505
89732
|
this.internalProps.rowResizeType = options.resize?.rowResizeType ?? options.rowResizeType ?? 'row';
|
|
89506
89733
|
this.internalProps.dataConfig = { isPivotChart: true };
|
|
89734
|
+
this.internalProps.columnWidthConfig = options.columnWidthConfig;
|
|
89735
|
+
this.internalProps.columnWidthConfigForRowHeader = options.columnWidthConfigForRowHeader;
|
|
89507
89736
|
this._axes = isArray$7(options.axes) ? options.axes : [];
|
|
89508
89737
|
let columnDimensionTree;
|
|
89509
89738
|
let rowDimensionTree;
|
|
@@ -89601,7 +89830,6 @@
|
|
|
89601
89830
|
if (options.title) {
|
|
89602
89831
|
const Title = Factory.getComponent('title');
|
|
89603
89832
|
this.internalProps.title = new Title(options.title, this);
|
|
89604
|
-
this.scenegraph.resize();
|
|
89605
89833
|
}
|
|
89606
89834
|
if (this.options.emptyTip) {
|
|
89607
89835
|
if (this.internalProps.emptyTip) {
|
|
@@ -89614,6 +89842,10 @@
|
|
|
89614
89842
|
}
|
|
89615
89843
|
}
|
|
89616
89844
|
setTimeout(() => {
|
|
89845
|
+
if (this.isReleased) {
|
|
89846
|
+
return;
|
|
89847
|
+
}
|
|
89848
|
+
this.resize();
|
|
89617
89849
|
this.fireListeners(TABLE_EVENT_TYPE.INITIALIZED, null);
|
|
89618
89850
|
}, 0);
|
|
89619
89851
|
}
|
|
@@ -89664,6 +89896,8 @@
|
|
|
89664
89896
|
internalProps.columnResizeType = options.resize?.columnResizeType ?? options.columnResizeType ?? 'column';
|
|
89665
89897
|
internalProps.rowResizeType = options.resize?.rowResizeType ?? options.rowResizeType ?? 'row';
|
|
89666
89898
|
internalProps.dataConfig = { isPivotChart: true };
|
|
89899
|
+
this.internalProps.columnWidthConfig = options.columnWidthConfig;
|
|
89900
|
+
this.internalProps.columnWidthConfigForRowHeader = options.columnWidthConfigForRowHeader;
|
|
89667
89901
|
this._axes = isArray$7(options.axes) ? options.axes : [];
|
|
89668
89902
|
let columnDimensionTree;
|
|
89669
89903
|
let rowDimensionTree;
|
|
@@ -91170,7 +91404,7 @@
|
|
|
91170
91404
|
}
|
|
91171
91405
|
|
|
91172
91406
|
registerForVrender();
|
|
91173
|
-
const version = "1.0.
|
|
91407
|
+
const version = "1.0.14";
|
|
91174
91408
|
function getIcons() {
|
|
91175
91409
|
return get$2();
|
|
91176
91410
|
}
|