k-vtable 1.0.13 → 1.0.15
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/body-helper/style.js +2 -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/FouseInput.js +1 -2
- 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 +16 -5
- 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 +33 -21
- 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 +3 -5
- 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/select/update-select-border.js +33 -15
- package/cjs/scenegraph/select/update-select-border.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 +12 -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 +499 -223
- 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/body-helper/style.js +2 -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/FouseInput.js +1 -2
- 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 +16 -5
- 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 +32 -20
- 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 +3 -5
- 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/select/update-select-border.js +33 -15
- package/es/scenegraph/select/update-select-border.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 +12 -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 +7 -4
- 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);
|
|
@@ -51820,17 +51955,32 @@
|
|
|
51820
51955
|
}
|
|
51821
51956
|
|
|
51822
51957
|
function updateAllSelectComponent(scene) {
|
|
51958
|
+
const size0 = scene.customSelectedRangeComponents.size;
|
|
51959
|
+
let index0 = 0;
|
|
51823
51960
|
scene.customSelectedRangeComponents.forEach((selectComp, key) => {
|
|
51824
|
-
updateComponent(selectComp, key, scene
|
|
51961
|
+
updateComponent(selectComp, key, scene, {
|
|
51962
|
+
size: size0,
|
|
51963
|
+
index: ++index0
|
|
51964
|
+
});
|
|
51825
51965
|
});
|
|
51966
|
+
const size1 = scene.selectingRangeComponents.size;
|
|
51967
|
+
let index1 = 0;
|
|
51826
51968
|
scene.selectingRangeComponents.forEach((selectComp, key) => {
|
|
51827
|
-
updateComponent(selectComp, key, scene
|
|
51969
|
+
updateComponent(selectComp, key, scene, {
|
|
51970
|
+
size: size1,
|
|
51971
|
+
index: ++index1
|
|
51972
|
+
});
|
|
51828
51973
|
});
|
|
51974
|
+
const size2 = scene.selectedRangeComponents.size;
|
|
51975
|
+
let index2 = 0;
|
|
51829
51976
|
scene.selectedRangeComponents.forEach((selectComp, key) => {
|
|
51830
|
-
updateComponent(selectComp, key, scene
|
|
51977
|
+
updateComponent(selectComp, key, scene, {
|
|
51978
|
+
size: size2,
|
|
51979
|
+
index: ++index2
|
|
51980
|
+
});
|
|
51831
51981
|
});
|
|
51832
51982
|
}
|
|
51833
|
-
function updateComponent(selectComp, key, scene) {
|
|
51983
|
+
function updateComponent(selectComp, key, scene, other) {
|
|
51834
51984
|
const table = scene.table;
|
|
51835
51985
|
const [startColStr, startRowStr, endColStr, endRowStr] = key.split('-');
|
|
51836
51986
|
const startCol = parseInt(startColStr, 10);
|
|
@@ -51893,12 +52043,20 @@
|
|
|
51893
52043
|
const rowsHeight = table.getRowsHeight(computeRectCellRangeStartRow, computeRectCellRangeEndRow);
|
|
51894
52044
|
const firstCellBound = scene.highPerformanceGetCell(computeRectCellRangeStartCol, computeRectCellRangeStartRow).globalAABBBounds;
|
|
51895
52045
|
selectComp.rect.setAttributes({
|
|
51896
|
-
x: firstCellBound.x1 - scene.tableGroup.attribute.x
|
|
51897
|
-
y: firstCellBound.y1 - scene.tableGroup.attribute.y
|
|
51898
|
-
width: colsWidth
|
|
51899
|
-
height: rowsHeight
|
|
52046
|
+
x: firstCellBound.x1 - scene.tableGroup.attribute.x,
|
|
52047
|
+
y: firstCellBound.y1 - scene.tableGroup.attribute.y,
|
|
52048
|
+
width: colsWidth,
|
|
52049
|
+
height: rowsHeight,
|
|
51900
52050
|
visible: true,
|
|
51901
|
-
cornerRadius:
|
|
52051
|
+
cornerRadius: other
|
|
52052
|
+
? other.size === 1
|
|
52053
|
+
? 2
|
|
52054
|
+
: other.index === 1
|
|
52055
|
+
? [2, 0, 0, 2]
|
|
52056
|
+
: other.index === other.size
|
|
52057
|
+
? [0, 2, 2, 0]
|
|
52058
|
+
: 0
|
|
52059
|
+
: 0
|
|
51902
52060
|
});
|
|
51903
52061
|
if (selectComp.fillhandle) {
|
|
51904
52062
|
const fillHandle = scene.table.options.excelOptions?.fillHandle;
|
|
@@ -51907,18 +52065,26 @@
|
|
|
51907
52065
|
visible = fillHandle({ selectRanges: scene.table.stateManager.select.ranges, table: scene.table });
|
|
51908
52066
|
}
|
|
51909
52067
|
let lastCellBound;
|
|
51910
|
-
|
|
51911
|
-
|
|
52068
|
+
let handlerX;
|
|
52069
|
+
if (endCol < table.colCount - 1) {
|
|
52070
|
+
lastCellBound = scene.highPerformanceGetCell(endCol, endRow).globalAABBBounds;
|
|
52071
|
+
handlerX = lastCellBound.x2 - scene.tableGroup.attribute.x - 3;
|
|
51912
52072
|
}
|
|
51913
52073
|
else {
|
|
51914
|
-
|
|
52074
|
+
if (startCol === 0) {
|
|
52075
|
+
lastCellBound = scene.highPerformanceGetCell(0, endRow).globalAABBBounds;
|
|
52076
|
+
handlerX = lastCellBound.x1 - scene.tableGroup.attribute.x;
|
|
52077
|
+
}
|
|
52078
|
+
else {
|
|
52079
|
+
lastCellBound = scene.highPerformanceGetCell(startCol - 1, endRow).globalAABBBounds;
|
|
52080
|
+
handlerX = lastCellBound.x2 - scene.tableGroup.attribute.x - 3;
|
|
52081
|
+
}
|
|
51915
52082
|
}
|
|
51916
|
-
|
|
51917
|
-
|
|
51918
|
-
lastCellBound = scene.highPerformanceGetCell(computeRectCellRangeEndCol, computeRectCellRangeEndRow).globalAABBBounds;
|
|
52083
|
+
if (endRow < table.rowCount - 1) {
|
|
52084
|
+
lastCellBound = scene.highPerformanceGetCell(endCol, endRow).globalAABBBounds;
|
|
51919
52085
|
}
|
|
51920
52086
|
else {
|
|
51921
|
-
lastCellBound = scene.highPerformanceGetCell(
|
|
52087
|
+
lastCellBound = scene.highPerformanceGetCell(endCol, startRow - 1).globalAABBBounds;
|
|
51922
52088
|
}
|
|
51923
52089
|
const handlerY = lastCellBound.y2 - scene.tableGroup.attribute.y - 3;
|
|
51924
52090
|
selectComp.fillhandle?.setAttributes({
|
|
@@ -53057,10 +53223,11 @@
|
|
|
53057
53223
|
const frozenRowsHeight = table.getFrozenRowsHeight();
|
|
53058
53224
|
const bottomFrozenRowsHeight = table.getBottomFrozenRowsHeight();
|
|
53059
53225
|
const totalFrozenRowsHeight = frozenRowsHeight + bottomFrozenRowsHeight;
|
|
53060
|
-
const
|
|
53226
|
+
const h = table.tableNoFrameHeight - totalFrozenRowsHeight;
|
|
53227
|
+
const hh = Math.min(allRowsHeight - totalFrozenRowsHeight, tableNoFrameHeight - totalFrozenRowsHeight);
|
|
53228
|
+
const bodyHeight = hh < h ? h : hh;
|
|
53061
53229
|
tableBodyDomContainer.style.width = `${tableNoFrameWidth}px`;
|
|
53062
|
-
|
|
53063
|
-
tableBodyDomContainer.style.height = `${tableHeight}px`;
|
|
53230
|
+
tableBodyDomContainer.style.height = `${bodyHeight}px`;
|
|
53064
53231
|
tableBodyDomContainer.style.top = `${table.tableY + frozenRowsHeight}px`;
|
|
53065
53232
|
if (table.frozenColCount > 0) {
|
|
53066
53233
|
headerDomContainer.style.left = `${table.tableX + frozenColsWidth}px`;
|
|
@@ -54269,7 +54436,7 @@
|
|
|
54269
54436
|
}
|
|
54270
54437
|
updateCellRangeIcon(col, row, (icon) => icon.attribute.funcType === IconFuncTypeEnum.collapse || icon.attribute.funcType === IconFuncTypeEnum.expand, (icon) => {
|
|
54271
54438
|
dealWithIcon(iconConfig, icon);
|
|
54272
|
-
icon.name = iconConfig
|
|
54439
|
+
icon.name = iconConfig?.name;
|
|
54273
54440
|
}, scene);
|
|
54274
54441
|
}
|
|
54275
54442
|
function updateCellGroupIcon(cellGroup, filter, dealer) {
|
|
@@ -54855,6 +55022,22 @@
|
|
|
54855
55022
|
this.isPivot = this.table.isPivotTable();
|
|
54856
55023
|
initSceneGraph(this);
|
|
54857
55024
|
}
|
|
55025
|
+
canvasShowMenu() {
|
|
55026
|
+
this.stage.addEventListener('rightdown', (e) => {
|
|
55027
|
+
const eventArgsSet = getCellEventArgsSet(e);
|
|
55028
|
+
if (!eventArgsSet.eventArgs) {
|
|
55029
|
+
this.table.stateManager.triggerContextMenu(-1, -1, eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y);
|
|
55030
|
+
this.table.fireListeners(TABLE_EVENT_TYPE.CONTEXTMENU_CANVAS, {
|
|
55031
|
+
event: e,
|
|
55032
|
+
x: eventArgsSet.abstractPos.x,
|
|
55033
|
+
y: eventArgsSet.abstractPos.y,
|
|
55034
|
+
col: -1,
|
|
55035
|
+
row: -1,
|
|
55036
|
+
target: undefined
|
|
55037
|
+
});
|
|
55038
|
+
}
|
|
55039
|
+
});
|
|
55040
|
+
}
|
|
54858
55041
|
clearCells() {
|
|
54859
55042
|
this.table.animationManager.clear();
|
|
54860
55043
|
if (this.table.isPivotChart() || this.table._hasCustomRenderOrLayout()) {
|
|
@@ -55703,6 +55886,9 @@
|
|
|
55703
55886
|
if (this.table.options.animationAppear) {
|
|
55704
55887
|
dealWithAnimationAppear(this.table);
|
|
55705
55888
|
}
|
|
55889
|
+
if (this.table.options.menu?.contextMenuWorkOnlyCell === false) {
|
|
55890
|
+
this.canvasShowMenu();
|
|
55891
|
+
}
|
|
55706
55892
|
this.updateNextFrame();
|
|
55707
55893
|
}
|
|
55708
55894
|
dealWidthMode() {
|
|
@@ -56210,9 +56396,11 @@
|
|
|
56210
56396
|
this.component.updateScrollBar();
|
|
56211
56397
|
this.updateNextFrame();
|
|
56212
56398
|
}
|
|
56213
|
-
updateCol(removeCells, addCells, updateCells = []) {
|
|
56399
|
+
updateCol(removeCells, addCells, updateCells = [], recalculateColWidths = true) {
|
|
56214
56400
|
updateCol(removeCells, addCells, updateCells, this.table);
|
|
56215
|
-
|
|
56401
|
+
if (recalculateColWidths) {
|
|
56402
|
+
this.recalculateColWidths();
|
|
56403
|
+
}
|
|
56216
56404
|
this.recalculateRowHeights();
|
|
56217
56405
|
this.table.stateManager.checkFrozen();
|
|
56218
56406
|
if (!this.isPivot && !this.table.transpose) {
|
|
@@ -57559,6 +57747,7 @@
|
|
|
57559
57747
|
}
|
|
57560
57748
|
state.columnResize.x = xInTable;
|
|
57561
57749
|
state.table.scenegraph.component.updateResizeCol(state.columnResize.col, yInTable, state.columnResize.isRightFrozen);
|
|
57750
|
+
state.table._updateSize();
|
|
57562
57751
|
if (state.columnResize.col < state.table.frozenColCount &&
|
|
57563
57752
|
!state.table.isPivotTable() &&
|
|
57564
57753
|
!state.table.transpose) {
|
|
@@ -58219,6 +58408,7 @@
|
|
|
58219
58408
|
}
|
|
58220
58409
|
state.rowResize.y = yInTable;
|
|
58221
58410
|
state.table.scenegraph.component.updateResizeRow(state.rowResize.row, xInTable, state.rowResize.isBottomFrozen);
|
|
58411
|
+
state.table._updateSize();
|
|
58222
58412
|
state.table.scenegraph.updateNextFrame();
|
|
58223
58413
|
}
|
|
58224
58414
|
function updateResizeColForRow(detaY, state) {
|
|
@@ -60370,40 +60560,64 @@
|
|
|
60370
60560
|
if (eventArgsSet.eventArgs) {
|
|
60371
60561
|
stateManager.triggerContextMenu(eventArgsSet.eventArgs.col, eventArgsSet.eventArgs.row, eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y);
|
|
60372
60562
|
const { col, row } = eventArgsSet.eventArgs;
|
|
60373
|
-
if (
|
|
60374
|
-
const
|
|
60375
|
-
let
|
|
60376
|
-
|
|
60377
|
-
|
|
60378
|
-
|
|
60379
|
-
|
|
60380
|
-
|
|
60381
|
-
|
|
60563
|
+
if (col >= 0 && row >= 0) {
|
|
60564
|
+
const ranges = table.getSelectedCellRanges();
|
|
60565
|
+
let cellInRange = false;
|
|
60566
|
+
if (ranges.length > 0) {
|
|
60567
|
+
for (let i = 0; i < ranges.length; i++) {
|
|
60568
|
+
const range = ranges[i];
|
|
60569
|
+
const startCol = range.start.col;
|
|
60570
|
+
const endCol = range.end.col;
|
|
60571
|
+
const startRow = range.start.row;
|
|
60572
|
+
const endRow = range.end.row;
|
|
60573
|
+
if ((col >= startCol && col <= endCol && row >= startRow && row <= endRow) ||
|
|
60574
|
+
(col >= endCol && col <= startCol && row >= endRow && row <= startRow) ||
|
|
60575
|
+
(col >= startCol && col <= endCol && row >= endRow && row <= startRow) ||
|
|
60576
|
+
(col >= endCol && col <= startCol && row >= startRow && row <= endRow)) {
|
|
60577
|
+
cellInRange = true;
|
|
60578
|
+
break;
|
|
60579
|
+
}
|
|
60382
60580
|
}
|
|
60383
60581
|
}
|
|
60384
|
-
const
|
|
60385
|
-
|
|
60386
|
-
|
|
60387
|
-
|
|
60388
|
-
|
|
60389
|
-
|
|
60390
|
-
|
|
60391
|
-
|
|
60392
|
-
|
|
60582
|
+
const disableSelectOnContextMenu = table.options.select?.disableSelectOnContextMenu;
|
|
60583
|
+
if (!cellInRange && !disableSelectOnContextMenu) {
|
|
60584
|
+
table.selectCell(col, row);
|
|
60585
|
+
}
|
|
60586
|
+
if (table.hasListeners(TABLE_EVENT_TYPE.CONTEXTMENU_CELL)) {
|
|
60587
|
+
const cellInfo = table.getCellInfo(col, row);
|
|
60588
|
+
let icon;
|
|
60589
|
+
let position;
|
|
60590
|
+
if (eventArgsSet.eventArgs?.target) {
|
|
60591
|
+
const iconInfo = getIconAndPositionFromTarget(eventArgsSet.eventArgs?.target);
|
|
60592
|
+
if (iconInfo) {
|
|
60593
|
+
icon = iconInfo.icon;
|
|
60594
|
+
position = iconInfo.position;
|
|
60393
60595
|
}
|
|
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
60596
|
}
|
|
60402
|
-
|
|
60403
|
-
|
|
60597
|
+
const cellsEvent = {
|
|
60598
|
+
...cellInfo,
|
|
60599
|
+
event: e.nativeEvent,
|
|
60600
|
+
cells: [],
|
|
60601
|
+
targetIcon: icon
|
|
60602
|
+
? {
|
|
60603
|
+
name: icon.name,
|
|
60604
|
+
position: position,
|
|
60605
|
+
funcType: icon.attribute.funcType
|
|
60606
|
+
}
|
|
60607
|
+
: undefined,
|
|
60608
|
+
target: eventArgsSet?.eventArgs?.target,
|
|
60609
|
+
mergeCellInfo: eventArgsSet.eventArgs?.mergeInfo
|
|
60610
|
+
};
|
|
60611
|
+
if (table.options.eventOptions?.contextmenuReturnAllSelectedCells ?? true) {
|
|
60612
|
+
if (cellInRanges(table.stateManager.select.ranges, col, row)) {
|
|
60613
|
+
cellsEvent.cells = table.getSelectedCellInfos();
|
|
60614
|
+
}
|
|
60615
|
+
else {
|
|
60616
|
+
cellsEvent.cells = [[cellInfo]];
|
|
60617
|
+
}
|
|
60404
60618
|
}
|
|
60619
|
+
table.fireListeners(TABLE_EVENT_TYPE.CONTEXTMENU_CELL, cellsEvent);
|
|
60405
60620
|
}
|
|
60406
|
-
table.fireListeners(TABLE_EVENT_TYPE.CONTEXTMENU_CELL, cellsEvent);
|
|
60407
60621
|
}
|
|
60408
60622
|
}
|
|
60409
60623
|
});
|
|
@@ -61628,8 +61842,12 @@
|
|
|
61628
61842
|
table.stateManager.updateInteractionState(InteractionState.grabing);
|
|
61629
61843
|
const targetCol = table.getTargetColAtConsiderRightFrozen(selectX, considerFrozenX);
|
|
61630
61844
|
const targetRow = table.getTargetRowAtConsiderBottomFrozen(selectY, considerFrozenY);
|
|
61631
|
-
if (!table.options.select?.disableDragSelect &&
|
|
61632
|
-
(
|
|
61845
|
+
if (!table.options.select?.disableDragSelect &&
|
|
61846
|
+
isValid$3(targetCol) &&
|
|
61847
|
+
isValid$3(targetRow) &&
|
|
61848
|
+
(!table.options.select?.disableSelect ||
|
|
61849
|
+
!(typeof table.options.select?.disableSelect === 'function' &&
|
|
61850
|
+
table.options.select?.disableSelect?.(targetCol.col, targetRow.row, table)))) {
|
|
61633
61851
|
table.stateManager.updateSelectPos(targetCol.col, targetRow.row, false, false, false, false);
|
|
61634
61852
|
}
|
|
61635
61853
|
});
|
|
@@ -62502,21 +62720,32 @@
|
|
|
62502
62720
|
const lastRow = Math.max(this.table.stateManager.select.ranges[this.table.stateManager.select.ranges.length - 1].start.row, this.table.stateManager.select.ranges[this.table.stateManager.select.ranges.length - 1].end.row);
|
|
62503
62721
|
const startCol = Math.min(this.table.stateManager.select.ranges[this.table.stateManager.select.ranges.length - 1].start.col, this.table.stateManager.select.ranges[this.table.stateManager.select.ranges.length - 1].end.col);
|
|
62504
62722
|
const startRow = Math.min(this.table.stateManager.select.ranges[this.table.stateManager.select.ranges.length - 1].start.row, this.table.stateManager.select.ranges[this.table.stateManager.select.ranges.length - 1].end.row);
|
|
62505
|
-
let
|
|
62723
|
+
let lastCellBoundTargetX;
|
|
62506
62724
|
if (lastCol < this.table.colCount - 1) {
|
|
62507
|
-
lastCellBound = this.table.scenegraph.highPerformanceGetCell(lastCol, lastRow).globalAABBBounds;
|
|
62725
|
+
const lastCellBound = this.table.scenegraph.highPerformanceGetCell(lastCol, lastRow).globalAABBBounds;
|
|
62726
|
+
lastCellBoundTargetX = lastCellBound.x2;
|
|
62508
62727
|
}
|
|
62509
62728
|
else {
|
|
62510
|
-
|
|
62729
|
+
if (startCol === 0) {
|
|
62730
|
+
const lastCellBound = this.table.scenegraph.highPerformanceGetCell(0, lastRow).globalAABBBounds;
|
|
62731
|
+
lastCellBoundTargetX = lastCellBound.x1;
|
|
62732
|
+
}
|
|
62733
|
+
else {
|
|
62734
|
+
const lastCellBound = this.table.scenegraph.highPerformanceGetCell(startCol - 1, lastRow).globalAABBBounds;
|
|
62735
|
+
lastCellBoundTargetX = lastCellBound.x2;
|
|
62736
|
+
}
|
|
62511
62737
|
}
|
|
62512
|
-
const distanceX = Math.abs(eventArgsSet.abstractPos.x -
|
|
62738
|
+
const distanceX = Math.abs(eventArgsSet.abstractPos.x - lastCellBoundTargetX);
|
|
62739
|
+
let lastCellBoundTargetY;
|
|
62513
62740
|
if (lastRow < this.table.rowCount - 1) {
|
|
62514
|
-
lastCellBound = this.table.scenegraph.highPerformanceGetCell(lastCol, lastRow).globalAABBBounds;
|
|
62741
|
+
const lastCellBound = this.table.scenegraph.highPerformanceGetCell(lastCol, lastRow).globalAABBBounds;
|
|
62742
|
+
lastCellBoundTargetY = lastCellBound.y2;
|
|
62515
62743
|
}
|
|
62516
62744
|
else {
|
|
62517
|
-
lastCellBound = this.table.scenegraph.highPerformanceGetCell(lastCol, startRow - 1).globalAABBBounds;
|
|
62745
|
+
const lastCellBound = this.table.scenegraph.highPerformanceGetCell(lastCol, startRow - 1).globalAABBBounds;
|
|
62746
|
+
lastCellBoundTargetY = lastCellBound.y2;
|
|
62518
62747
|
}
|
|
62519
|
-
const distanceY = Math.abs(eventArgsSet.abstractPos.y -
|
|
62748
|
+
const distanceY = Math.abs(eventArgsSet.abstractPos.y - lastCellBoundTargetY);
|
|
62520
62749
|
const squareSize = 6 * 3;
|
|
62521
62750
|
if (this.table.stateManager.fillHandle?.isFilling ||
|
|
62522
62751
|
(distanceX <= squareSize / 2 && distanceY <= squareSize / 2)) {
|
|
@@ -63385,6 +63614,9 @@
|
|
|
63385
63614
|
const rect = table.getCellRangeRelativeRect({ col, row });
|
|
63386
63615
|
const element = table.internalProps.menu.parentElement ?? table.getElement();
|
|
63387
63616
|
const { top, bottom, left, right } = rect;
|
|
63617
|
+
if (col === -1 && row === -1) {
|
|
63618
|
+
return true;
|
|
63619
|
+
}
|
|
63388
63620
|
if (table.isFrozenCell(col, row)) {
|
|
63389
63621
|
return true;
|
|
63390
63622
|
}
|
|
@@ -64976,22 +65208,24 @@
|
|
|
64976
65208
|
}
|
|
64977
65209
|
}
|
|
64978
65210
|
function generateLayoutTree(tree, children) {
|
|
64979
|
-
|
|
64980
|
-
|
|
64981
|
-
|
|
64982
|
-
|
|
64983
|
-
|
|
64984
|
-
|
|
64985
|
-
|
|
64986
|
-
|
|
64987
|
-
|
|
64988
|
-
|
|
64989
|
-
|
|
64990
|
-
|
|
64991
|
-
|
|
64992
|
-
|
|
64993
|
-
|
|
64994
|
-
|
|
65211
|
+
if (Array.isArray(children)) {
|
|
65212
|
+
children?.forEach((node) => {
|
|
65213
|
+
const diemnsonNode = {
|
|
65214
|
+
dimensionKey: node.dimensionKey,
|
|
65215
|
+
indicatorKey: node.indicatorKey,
|
|
65216
|
+
value: node.value,
|
|
65217
|
+
hierarchyState: node.hierarchyState,
|
|
65218
|
+
children: undefined,
|
|
65219
|
+
virtual: node.virtual ?? false,
|
|
65220
|
+
levelSpan: node.levelSpan ?? 1
|
|
65221
|
+
};
|
|
65222
|
+
tree.push(diemnsonNode);
|
|
65223
|
+
if (node.children) {
|
|
65224
|
+
diemnsonNode.children = [];
|
|
65225
|
+
generateLayoutTree(diemnsonNode.children, node.children);
|
|
65226
|
+
}
|
|
65227
|
+
});
|
|
65228
|
+
}
|
|
64995
65229
|
}
|
|
64996
65230
|
function countLayoutTree(children, countParentNode) {
|
|
64997
65231
|
let count = 0;
|
|
@@ -67274,7 +67508,7 @@
|
|
|
67274
67508
|
return TABLE_EVENT_TYPE;
|
|
67275
67509
|
}
|
|
67276
67510
|
options;
|
|
67277
|
-
version = "1.0.
|
|
67511
|
+
version = "1.0.15";
|
|
67278
67512
|
pagination;
|
|
67279
67513
|
id = `VTable${Date.now()}`;
|
|
67280
67514
|
headerStyleCache;
|
|
@@ -67968,8 +68202,17 @@
|
|
|
67968
68202
|
widthP = this.canvasWidth - 1;
|
|
67969
68203
|
heightP = this.canvasHeight - 1;
|
|
67970
68204
|
}
|
|
67971
|
-
const
|
|
67972
|
-
|
|
68205
|
+
const scrollStyle = this.getTheme().scrollStyle;
|
|
68206
|
+
let vScrollBarWidth = 0;
|
|
68207
|
+
let hScrollBarWidth = 0;
|
|
68208
|
+
vScrollBarWidth = this.shouldVScrollBarWidthShow(widthP, heightP, scrollStyle)
|
|
68209
|
+
? getVerticalScrollBarSize(scrollStyle)
|
|
68210
|
+
: 0;
|
|
68211
|
+
hScrollBarWidth = this.shouldHScrollBarWidthShow(widthP, heightP, scrollStyle)
|
|
68212
|
+
? getHorizontalScrollBarSize(scrollStyle)
|
|
68213
|
+
: 0;
|
|
68214
|
+
const width = Math.floor(widthP - vScrollBarWidth);
|
|
68215
|
+
const height = Math.floor(heightP - hScrollBarWidth);
|
|
67973
68216
|
if (this.internalProps.theme?.frameStyle) {
|
|
67974
68217
|
const lineWidths = toBoxArray(this.internalProps.theme.frameStyle?.borderLineWidth ?? [null]);
|
|
67975
68218
|
const shadowWidths = toBoxArray(this.internalProps.theme.frameStyle?.shadowBlur ?? [0]);
|
|
@@ -67982,15 +68225,67 @@
|
|
|
67982
68225
|
else {
|
|
67983
68226
|
this.tableX = (lineWidths[3] ?? 0) + (shadowWidths[3] ?? 0);
|
|
67984
68227
|
this.tableY = (lineWidths[0] ?? 0) + (shadowWidths[0] ?? 0);
|
|
68228
|
+
const rightBorder = (lineWidths[1] ?? 0) + (shadowWidths[1] ?? 0);
|
|
67985
68229
|
this.tableNoFrameWidth =
|
|
67986
|
-
width -
|
|
68230
|
+
width -
|
|
68231
|
+
(rightBorder > vScrollBarWidth ? rightBorder - vScrollBarWidth : 0) -
|
|
68232
|
+
((lineWidths[3] ?? 0) + (shadowWidths[3] ?? 0));
|
|
68233
|
+
const bottomBorder = (lineWidths[2] ?? 0) + (shadowWidths[2] ?? 0);
|
|
67987
68234
|
this.tableNoFrameHeight =
|
|
67988
|
-
height -
|
|
68235
|
+
height -
|
|
68236
|
+
(bottomBorder > hScrollBarWidth ? bottomBorder - hScrollBarWidth : 0) -
|
|
68237
|
+
((lineWidths[0] ?? 0) + (shadowWidths[0] ?? 0));
|
|
67989
68238
|
}
|
|
67990
68239
|
}
|
|
67991
68240
|
this._clearColRangeWidthsMap();
|
|
67992
68241
|
this._clearRowRangeHeightsMap();
|
|
67993
68242
|
}
|
|
68243
|
+
shouldVScrollBarWidthShow(tableWidth, tableHeight, scrollStyle) {
|
|
68244
|
+
if (scrollStyle.hoverOn || scrollStyle.visible === 'none') {
|
|
68245
|
+
return false;
|
|
68246
|
+
}
|
|
68247
|
+
const totalHeight = this.getAllRowsHeight();
|
|
68248
|
+
const sizeTolerance = scrollStyle.visible ? getHorizontalScrollBarSize(scrollStyle) : 0;
|
|
68249
|
+
const isHScrollBarDecideVScrollBar = totalHeight > tableHeight - sizeTolerance && totalHeight <= tableHeight;
|
|
68250
|
+
if (isHScrollBarDecideVScrollBar) {
|
|
68251
|
+
const totalWidth = this.getAllColsWidth();
|
|
68252
|
+
const sizeTolerance = scrollStyle.visible ? getVerticalScrollBarSize(scrollStyle) : 0;
|
|
68253
|
+
const isVScrollBarDecideHScrollBar = totalWidth > tableWidth - sizeTolerance && totalWidth <= tableWidth;
|
|
68254
|
+
if (isVScrollBarDecideHScrollBar) {
|
|
68255
|
+
return false;
|
|
68256
|
+
}
|
|
68257
|
+
if (totalWidth > tableWidth) {
|
|
68258
|
+
return true;
|
|
68259
|
+
}
|
|
68260
|
+
if (totalWidth <= tableWidth - sizeTolerance) {
|
|
68261
|
+
return false;
|
|
68262
|
+
}
|
|
68263
|
+
}
|
|
68264
|
+
return !(totalHeight <= tableHeight - sizeTolerance);
|
|
68265
|
+
}
|
|
68266
|
+
shouldHScrollBarWidthShow(tableWidth, tableHeight, scrollStyle) {
|
|
68267
|
+
if (scrollStyle.hoverOn || scrollStyle.visible === 'none') {
|
|
68268
|
+
return false;
|
|
68269
|
+
}
|
|
68270
|
+
const totalWidth = this.getAllColsWidth();
|
|
68271
|
+
const sizeTolerance = scrollStyle.visible ? getVerticalScrollBarSize(scrollStyle) : 0;
|
|
68272
|
+
const isVScrollBarDecideHScrollBar = totalWidth > tableWidth - sizeTolerance && totalWidth <= tableWidth;
|
|
68273
|
+
if (isVScrollBarDecideHScrollBar) {
|
|
68274
|
+
const totalHeight = this.getAllRowsHeight();
|
|
68275
|
+
const sizeTolerance = scrollStyle.visible ? getHorizontalScrollBarSize(scrollStyle) : 0;
|
|
68276
|
+
const isHScrollBarDecideVScrollBar = totalHeight > tableHeight - sizeTolerance && totalHeight <= tableHeight;
|
|
68277
|
+
if (isHScrollBarDecideVScrollBar) {
|
|
68278
|
+
return false;
|
|
68279
|
+
}
|
|
68280
|
+
if (totalHeight > tableHeight) {
|
|
68281
|
+
return true;
|
|
68282
|
+
}
|
|
68283
|
+
if (totalHeight <= tableHeight - sizeTolerance) {
|
|
68284
|
+
return false;
|
|
68285
|
+
}
|
|
68286
|
+
}
|
|
68287
|
+
return !(totalWidth <= tableWidth - sizeTolerance);
|
|
68288
|
+
}
|
|
67994
68289
|
updateViewBox(newViewBox) {
|
|
67995
68290
|
const oldWidth = (this.options?.viewBox?.x2 ?? 0) - (this.options?.viewBox?.x1 ?? 0);
|
|
67996
68291
|
const oldHeight = (this.options?.viewBox?.y2 ?? 0) - (this.options?.viewBox?.y1 ?? 0);
|
|
@@ -73128,7 +73423,7 @@
|
|
|
73128
73423
|
}
|
|
73129
73424
|
const expand = !hd.hierarchyState || hd.hierarchyState === HierarchyState.expand;
|
|
73130
73425
|
if (!!hd.columns && !!expand) {
|
|
73131
|
-
const isAllHided = hd.columns.every((c) => c.hide);
|
|
73426
|
+
const isAllHided = hd.columns.every((c) => c.hide) || hd.hide;
|
|
73132
73427
|
!isAllHided &&
|
|
73133
73428
|
this._addHeaders(maxRow + 1, hd.columns, [...roots, id], hd.hideColumnsSubHeader || hideColumnsSubHeader, hd.levelSpan).forEach(c => results.push(c));
|
|
73134
73429
|
}
|
|
@@ -74704,7 +74999,6 @@
|
|
|
74704
74999
|
if (options.title) {
|
|
74705
75000
|
const Title = Factory.getComponent('title');
|
|
74706
75001
|
internalProps.title = new Title(options.title, this);
|
|
74707
|
-
this.scenegraph.resize();
|
|
74708
75002
|
}
|
|
74709
75003
|
if (this.options.emptyTip) {
|
|
74710
75004
|
if (this.internalProps.emptyTip) {
|
|
@@ -74721,6 +75015,10 @@
|
|
|
74721
75015
|
this.listTreeStickCellPlugin = new ListTreeStickCellPlugin(this);
|
|
74722
75016
|
}
|
|
74723
75017
|
setTimeout(() => {
|
|
75018
|
+
if (this.isReleased) {
|
|
75019
|
+
return;
|
|
75020
|
+
}
|
|
75021
|
+
this.resize();
|
|
74724
75022
|
this.fireListeners(TABLE_EVENT_TYPE.INITIALIZED, null);
|
|
74725
75023
|
}, 0);
|
|
74726
75024
|
}
|
|
@@ -74779,6 +75077,7 @@
|
|
|
74779
75077
|
this.headerStyleCache = new Map();
|
|
74780
75078
|
this.bodyStyleCache = new Map();
|
|
74781
75079
|
this.bodyBottomStyleCache = new Map();
|
|
75080
|
+
this._updateSize();
|
|
74782
75081
|
this.scenegraph.createSceneGraph();
|
|
74783
75082
|
this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row);
|
|
74784
75083
|
this.renderAsync();
|
|
@@ -75110,6 +75409,9 @@
|
|
|
75110
75409
|
table.colCount = layoutMap.colCount ?? 0;
|
|
75111
75410
|
table.rowCount = layoutMap.recordsCount * layoutMap.bodyRowSpanCount + layoutMap.headerLevelCount;
|
|
75112
75411
|
this.internalProps.frozenColCount = this.options.frozenColCount ?? 0;
|
|
75412
|
+
if (this.options.frozenColCount >= this.colCount) {
|
|
75413
|
+
this.internalProps.frozenColCount = 0;
|
|
75414
|
+
}
|
|
75113
75415
|
table.frozenRowCount = Math.max(layoutMap.headerLevelCount, this.options.frozenRowCount ?? 0);
|
|
75114
75416
|
if (table.bottomFrozenRowCount !== (this.options.bottomFrozenRowCount ?? 0)) {
|
|
75115
75417
|
table.bottomFrozenRowCount = this.options.bottomFrozenRowCount ?? 0;
|
|
@@ -75440,6 +75742,7 @@
|
|
|
75440
75742
|
this.refreshRowColCount();
|
|
75441
75743
|
this.stateManager.initCheckedState(this.records);
|
|
75442
75744
|
this.scenegraph.createSceneGraph();
|
|
75745
|
+
this.resize();
|
|
75443
75746
|
}
|
|
75444
75747
|
getCheckboxState(field) {
|
|
75445
75748
|
if (this.stateManager.checkedState.size < this.rowCount - this.columnHeaderLevelCount) {
|
|
@@ -75554,11 +75857,11 @@
|
|
|
75554
75857
|
this.clearCellStyleCache();
|
|
75555
75858
|
this.scenegraph.createSceneGraph();
|
|
75556
75859
|
this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row);
|
|
75860
|
+
this._updateSize();
|
|
75557
75861
|
if (this.internalProps.title && !this.internalProps.title.isReleased) {
|
|
75558
|
-
this._updateSize();
|
|
75559
75862
|
this.internalProps.title.resize();
|
|
75560
|
-
this.scenegraph.resize();
|
|
75561
75863
|
}
|
|
75864
|
+
this.scenegraph.resize();
|
|
75562
75865
|
if (this.options.emptyTip) {
|
|
75563
75866
|
if (this.internalProps.emptyTip) {
|
|
75564
75867
|
this.internalProps.emptyTip?.resetVisible();
|
|
@@ -75725,21 +76028,6 @@
|
|
|
75725
76028
|
}
|
|
75726
76029
|
return this.dataSource.getTableIndex(index);
|
|
75727
76030
|
}
|
|
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
76031
|
release() {
|
|
75744
76032
|
this.editorManager.release();
|
|
75745
76033
|
super.release();
|
|
@@ -77872,10 +78160,11 @@
|
|
|
77872
78160
|
if (!this.legendComponent || this.visible === false) {
|
|
77873
78161
|
return;
|
|
77874
78162
|
}
|
|
77875
|
-
this.
|
|
77876
|
-
|
|
77877
|
-
|
|
78163
|
+
const attrs = this.getLegendAttributes({
|
|
78164
|
+
width: this.table.tableNoFrameWidth,
|
|
78165
|
+
height: this.table.tableNoFrameHeight
|
|
77878
78166
|
});
|
|
78167
|
+
this.legendComponent.setAttributes(attrs);
|
|
77879
78168
|
this.adjustTableSize(this.legendComponent.attribute);
|
|
77880
78169
|
}
|
|
77881
78170
|
adjustTableSize(attrs) {
|
|
@@ -78565,6 +78854,19 @@
|
|
|
78565
78854
|
}
|
|
78566
78855
|
};
|
|
78567
78856
|
function getMenuInstanceInfo(table, col, row, type, dropDownMenuOptions) {
|
|
78857
|
+
if (col === -1 && row === -1 && type === 'context-menu') {
|
|
78858
|
+
if (dropDownMenuOptions?.content) {
|
|
78859
|
+
return {
|
|
78860
|
+
type,
|
|
78861
|
+
position: dropDownMenuOptions.position,
|
|
78862
|
+
referencePosition: dropDownMenuOptions.referencePosition ?? {
|
|
78863
|
+
rect: { left: 0, right: 0, top: 0, bottom: 0, width: 0, height: 0 }
|
|
78864
|
+
},
|
|
78865
|
+
content: dropDownMenuOptions.content
|
|
78866
|
+
};
|
|
78867
|
+
}
|
|
78868
|
+
return null;
|
|
78869
|
+
}
|
|
78568
78870
|
const { lineHeight, textBaseline, textStick } = table._getCellStyle(col, row);
|
|
78569
78871
|
let rect = table.getCellRangeRelativeRect(table.getCellRange(col, row));
|
|
78570
78872
|
if (textStick) {
|
|
@@ -78647,7 +78949,9 @@
|
|
|
78647
78949
|
const { instance, info: menuInstanceInfo } = instanceInfo;
|
|
78648
78950
|
const attach = instance && instance.bindMenuElement(col, row, menuInstanceInfo);
|
|
78649
78951
|
if (attach) {
|
|
78650
|
-
const range =
|
|
78952
|
+
const range = col === -1 && row === -1
|
|
78953
|
+
? { start: { col: -1, row: -1 }, end: { col: -1, row: -1 } }
|
|
78954
|
+
: this._table.getCellRange(col, row);
|
|
78651
78955
|
this._attachInfo = { range, instance };
|
|
78652
78956
|
}
|
|
78653
78957
|
}
|
|
@@ -78708,6 +79012,22 @@
|
|
|
78708
79012
|
});
|
|
78709
79013
|
}
|
|
78710
79014
|
});
|
|
79015
|
+
table.on(TABLE_EVENT_TYPE.CONTEXTMENU_CANVAS, e => {
|
|
79016
|
+
if (table.internalProps.menu?.renderMode === 'html') {
|
|
79017
|
+
const abstractPos = table._getMouseAbstractPoint(e.event);
|
|
79018
|
+
let menu = null;
|
|
79019
|
+
if (abstractPos.inTable && typeof table.internalProps.menu?.contextMenuItems === 'function') {
|
|
79020
|
+
menu = table.internalProps.menu.contextMenuItems(table.getHeaderField(e.col, e.row), e.row, e.col, table);
|
|
79021
|
+
}
|
|
79022
|
+
else if (abstractPos.inTable && Array.isArray(table.internalProps.menu?.contextMenuItems)) {
|
|
79023
|
+
menu = table.internalProps.menu?.contextMenuItems;
|
|
79024
|
+
}
|
|
79025
|
+
this._bindToCell(-1, -1, 'context-menu', {
|
|
79026
|
+
content: menu,
|
|
79027
|
+
position: { x: abstractPos.x, y: abstractPos.y }
|
|
79028
|
+
});
|
|
79029
|
+
}
|
|
79030
|
+
});
|
|
78711
79031
|
}
|
|
78712
79032
|
_getMenuInstanceInfo(col, row, type, dropDownMenuOptions) {
|
|
78713
79033
|
const table = this._table;
|
|
@@ -84807,10 +85127,10 @@
|
|
|
84807
85127
|
needLowestLevel_colPaths = true;
|
|
84808
85128
|
needLowestLevel_rowPaths = true;
|
|
84809
85129
|
}
|
|
84810
|
-
if (colHeaderPaths.length >= this._getColumnHeaderTreeExpandedMaxLevelCount()) {
|
|
85130
|
+
if ((colHeaderPaths?.length ?? 0) && colHeaderPaths.length >= this._getColumnHeaderTreeExpandedMaxLevelCount()) {
|
|
84811
85131
|
needLowestLevel_colPaths = true;
|
|
84812
85132
|
}
|
|
84813
|
-
if (rowHeaderPaths.length >= this._getRowHeaderTreeExpandedMaxLevelCount()) {
|
|
85133
|
+
if ((rowHeaderPaths?.length ?? 0) && rowHeaderPaths.length >= this._getRowHeaderTreeExpandedMaxLevelCount()) {
|
|
84814
85134
|
needLowestLevel_rowPaths = true;
|
|
84815
85135
|
}
|
|
84816
85136
|
let col;
|
|
@@ -87859,7 +88179,6 @@
|
|
|
87859
88179
|
if (options.title) {
|
|
87860
88180
|
const Title = Factory.getComponent('title');
|
|
87861
88181
|
this.internalProps.title = new Title(options.title, this);
|
|
87862
|
-
this.scenegraph.resize();
|
|
87863
88182
|
}
|
|
87864
88183
|
if (this.options.emptyTip) {
|
|
87865
88184
|
if (this.internalProps.emptyTip) {
|
|
@@ -87872,6 +88191,10 @@
|
|
|
87872
88191
|
}
|
|
87873
88192
|
}
|
|
87874
88193
|
setTimeout(() => {
|
|
88194
|
+
if (this.isReleased) {
|
|
88195
|
+
return;
|
|
88196
|
+
}
|
|
88197
|
+
this.resize();
|
|
87875
88198
|
this.fireListeners(TABLE_EVENT_TYPE.INITIALIZED, null);
|
|
87876
88199
|
}, 0);
|
|
87877
88200
|
}
|
|
@@ -88110,7 +88433,7 @@
|
|
|
88110
88433
|
if (sourceNode.value === targetNode.value && sourceNode.dimensionKey === targetNode.dimensionKey) {
|
|
88111
88434
|
targetNode.hierarchyState =
|
|
88112
88435
|
targetNode.hierarchyState ?? (targetNode?.children ? sourceNode.hierarchyState : undefined);
|
|
88113
|
-
targetNode?.children?.forEach((targetChildNode, index) => {
|
|
88436
|
+
targetNode?.children?.forEach?.((targetChildNode, index) => {
|
|
88114
88437
|
if (sourceNode?.children?.[index] && targetChildNode) {
|
|
88115
88438
|
const beforeRowDimension = sourceNode.children.find((item) => item.dimensionKey === targetChildNode.dimensionKey && item.value === targetChildNode.value);
|
|
88116
88439
|
if (beforeRowDimension) {
|
|
@@ -88579,60 +88902,6 @@
|
|
|
88579
88902
|
});
|
|
88580
88903
|
}
|
|
88581
88904
|
}
|
|
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
88905
|
updatePivotSortState(pivotSortStateConfig) {
|
|
88637
88906
|
this.pivotSortState = pivotSortStateConfig;
|
|
88638
88907
|
}
|
|
@@ -89504,6 +89773,8 @@
|
|
|
89504
89773
|
this.internalProps.columnResizeType = options.resize?.columnResizeType ?? options.columnResizeType ?? 'column';
|
|
89505
89774
|
this.internalProps.rowResizeType = options.resize?.rowResizeType ?? options.rowResizeType ?? 'row';
|
|
89506
89775
|
this.internalProps.dataConfig = { isPivotChart: true };
|
|
89776
|
+
this.internalProps.columnWidthConfig = options.columnWidthConfig;
|
|
89777
|
+
this.internalProps.columnWidthConfigForRowHeader = options.columnWidthConfigForRowHeader;
|
|
89507
89778
|
this._axes = isArray$7(options.axes) ? options.axes : [];
|
|
89508
89779
|
let columnDimensionTree;
|
|
89509
89780
|
let rowDimensionTree;
|
|
@@ -89601,7 +89872,6 @@
|
|
|
89601
89872
|
if (options.title) {
|
|
89602
89873
|
const Title = Factory.getComponent('title');
|
|
89603
89874
|
this.internalProps.title = new Title(options.title, this);
|
|
89604
|
-
this.scenegraph.resize();
|
|
89605
89875
|
}
|
|
89606
89876
|
if (this.options.emptyTip) {
|
|
89607
89877
|
if (this.internalProps.emptyTip) {
|
|
@@ -89614,6 +89884,10 @@
|
|
|
89614
89884
|
}
|
|
89615
89885
|
}
|
|
89616
89886
|
setTimeout(() => {
|
|
89887
|
+
if (this.isReleased) {
|
|
89888
|
+
return;
|
|
89889
|
+
}
|
|
89890
|
+
this.resize();
|
|
89617
89891
|
this.fireListeners(TABLE_EVENT_TYPE.INITIALIZED, null);
|
|
89618
89892
|
}, 0);
|
|
89619
89893
|
}
|
|
@@ -89664,6 +89938,8 @@
|
|
|
89664
89938
|
internalProps.columnResizeType = options.resize?.columnResizeType ?? options.columnResizeType ?? 'column';
|
|
89665
89939
|
internalProps.rowResizeType = options.resize?.rowResizeType ?? options.rowResizeType ?? 'row';
|
|
89666
89940
|
internalProps.dataConfig = { isPivotChart: true };
|
|
89941
|
+
this.internalProps.columnWidthConfig = options.columnWidthConfig;
|
|
89942
|
+
this.internalProps.columnWidthConfigForRowHeader = options.columnWidthConfigForRowHeader;
|
|
89667
89943
|
this._axes = isArray$7(options.axes) ? options.axes : [];
|
|
89668
89944
|
let columnDimensionTree;
|
|
89669
89945
|
let rowDimensionTree;
|
|
@@ -91170,7 +91446,7 @@
|
|
|
91170
91446
|
}
|
|
91171
91447
|
|
|
91172
91448
|
registerForVrender();
|
|
91173
|
-
const version = "1.0.
|
|
91449
|
+
const version = "1.0.15";
|
|
91174
91450
|
function getIcons() {
|
|
91175
91451
|
return get$2();
|
|
91176
91452
|
}
|