k-vtable 1.0.12 → 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 +14 -21
- 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 +39 -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/core/group-helper.d.ts +3 -1
- package/cjs/core/group-helper.js +5 -3
- package/cjs/core/group-helper.js.map +1 -1
- package/cjs/data/CachedDataSource.js +2 -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/dataset/dataset-pivot-table.js +1 -2
- package/cjs/dataset/flatDataToObject.js +2 -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/cell-range/simple-cell-range.js +1 -0
- package/cjs/layout/cell-range/simple-cell-range.js.map +1 -1
- package/cjs/layout/index.js +1 -2
- package/cjs/layout/pivot-header-layout.js +6 -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/select/update-select-border.js +21 -6
- 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 +13 -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/new-data-set.d.ts +1 -0
- package/cjs/ts-types/new-data-set.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +23 -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 +466 -203
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.d.ts +0 -4
- package/es/ListTable.js +13 -20
- 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 +39 -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/core/group-helper.d.ts +3 -1
- package/es/core/group-helper.js +5 -3
- package/es/core/group-helper.js.map +1 -1
- package/es/data/CachedDataSource.js +2 -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/dataset/dataset-pivot-table.js +1 -2
- package/es/dataset/flatDataToObject.js +2 -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/cell-range/simple-cell-range.js +1 -0
- package/es/layout/cell-range/simple-cell-range.js.map +1 -1
- package/es/layout/index.js +1 -2
- package/es/layout/pivot-header-layout.js +7 -6
- 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/select/update-select-border.js +17 -4
- 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 +13 -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/new-data-set.d.ts +1 -0
- package/es/ts-types/new-data-set.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +23 -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) {
|
|
@@ -39460,6 +39503,9 @@
|
|
|
39460
39503
|
this.groupAggregator = new this.registedAggregators[AggregationType.CUSTOM]({
|
|
39461
39504
|
field: '',
|
|
39462
39505
|
aggregationFun: (values, records, field) => {
|
|
39506
|
+
if (this.dataConfig.customDealGroupData) {
|
|
39507
|
+
return this.dataConfig.customDealGroupData(records);
|
|
39508
|
+
}
|
|
39463
39509
|
const groupMap = new Map();
|
|
39464
39510
|
const groupResult = [];
|
|
39465
39511
|
for (let i = 0; i < records.length; i++) {
|
|
@@ -39732,8 +39778,8 @@
|
|
|
39732
39778
|
if (isValid$3(newRecord)) {
|
|
39733
39779
|
newRecord.hierarchyState = oldSource[i].hierarchyState;
|
|
39734
39780
|
}
|
|
39735
|
-
if (isArray$7(oldRecord
|
|
39736
|
-
isArray$7(newRecord
|
|
39781
|
+
if (isArray$7(oldRecord?.children) &&
|
|
39782
|
+
isArray$7(newRecord?.children) &&
|
|
39737
39783
|
oldRecord.map.size !== 0 &&
|
|
39738
39784
|
newRecord.map.size !== 0) {
|
|
39739
39785
|
syncGroupCollapseState(oldRecord.children, newRecord.children, oldRecord.map, newRecord.map);
|
|
@@ -42610,6 +42656,9 @@
|
|
|
42610
42656
|
});
|
|
42611
42657
|
}
|
|
42612
42658
|
function dealWithIcon(icon, mark, col, row, range, table, dealWithIconComputeVar) {
|
|
42659
|
+
if (!icon) {
|
|
42660
|
+
return undefined;
|
|
42661
|
+
}
|
|
42613
42662
|
const iconAttribute = {};
|
|
42614
42663
|
if (icon.type === 'image') {
|
|
42615
42664
|
if (icon.isGif) {
|
|
@@ -43622,7 +43671,7 @@
|
|
|
43622
43671
|
if (vtableMerge) {
|
|
43623
43672
|
mayHaveIcon = true;
|
|
43624
43673
|
if (table.internalProps.groupTitleCustomLayout) {
|
|
43625
|
-
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);
|
|
43626
43675
|
}
|
|
43627
43676
|
if (table.internalProps.groupTitleFieldFormat) {
|
|
43628
43677
|
value = table.internalProps.groupTitleFieldFormat(rawRecord, col, row, table);
|
|
@@ -46265,7 +46314,6 @@
|
|
|
46265
46314
|
const shadowWidth = theme.frozenColumnLine?.shadow?.width;
|
|
46266
46315
|
const shadowStartColor = theme.frozenColumnLine?.shadow?.startColor;
|
|
46267
46316
|
const shadowEndColor = theme.frozenColumnLine?.shadow?.endColor;
|
|
46268
|
-
theme.cellBorder?.borderColor ?? 'red';
|
|
46269
46317
|
const visible = theme.frozenColumnLine?.shadow?.visible;
|
|
46270
46318
|
this.frozenShadowLine = createRect({
|
|
46271
46319
|
visible: visible === 'always',
|
|
@@ -46431,19 +46479,19 @@
|
|
|
46431
46479
|
const visible1 = theme.scrollStyle?.visible;
|
|
46432
46480
|
const horizontalVisible = theme.scrollStyle?.horizontalVisible ?? visible1;
|
|
46433
46481
|
const verticalVisible = theme.scrollStyle?.verticalVisible ?? visible1;
|
|
46434
|
-
const tableWidth = Math.ceil(this.table.
|
|
46435
|
-
const tableHeight = Math.ceil(this.table.
|
|
46482
|
+
const tableWidth = Math.ceil(this.table.tableNoFrameWidth);
|
|
46483
|
+
const tableHeight = Math.ceil(this.table.tableNoFrameHeight);
|
|
46436
46484
|
const totalHeight = this.table.getAllRowsHeight();
|
|
46437
46485
|
const totalWidth = this.table.getAllColsWidth();
|
|
46438
46486
|
const frozenRowsHeight = this.table.getFrozenRowsHeight();
|
|
46439
46487
|
const frozenColsWidth = this.table.getFrozenColsWidth();
|
|
46440
46488
|
const bottomFrozenRowsHeight = this.table.getBottomFrozenRowsHeight();
|
|
46441
46489
|
const rightFrozenColsWidth = this.table.getRightFrozenColsWidth();
|
|
46490
|
+
const hoverOn = this.table.theme.scrollStyle.hoverOn;
|
|
46442
46491
|
const sizeTolerance = this.table.options.customConfig?._disableColumnAndRowSizeRound ? 1 : 0;
|
|
46443
46492
|
if (totalWidth > tableWidth + sizeTolerance) {
|
|
46444
46493
|
const y = Math.min(tableHeight, totalHeight);
|
|
46445
46494
|
const rangeEnd = Math.max(0.05, (tableWidth - frozenColsWidth) / (totalWidth - frozenColsWidth));
|
|
46446
|
-
const hoverOn = this.table.theme.scrollStyle.hoverOn;
|
|
46447
46495
|
let attrY = 0;
|
|
46448
46496
|
if (this.table.theme.scrollStyle.barToSide) {
|
|
46449
46497
|
attrY =
|
|
@@ -46454,10 +46502,21 @@
|
|
|
46454
46502
|
else {
|
|
46455
46503
|
attrY = y - (hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.y);
|
|
46456
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
|
+
}
|
|
46457
46516
|
this.hScrollBar.setAttributes({
|
|
46458
|
-
x:
|
|
46517
|
+
x: hScrollBarx,
|
|
46459
46518
|
y: attrY,
|
|
46460
|
-
width:
|
|
46519
|
+
width: hScrollBarWidth,
|
|
46461
46520
|
range: [0, rangeEnd],
|
|
46462
46521
|
visible: horizontalVisible === 'always'
|
|
46463
46522
|
});
|
|
@@ -46482,7 +46541,6 @@
|
|
|
46482
46541
|
const x = Math.min(tableWidth, totalWidth);
|
|
46483
46542
|
const rangeEnd = Math.max(0.05, (tableHeight - frozenRowsHeight) / (totalHeight - frozenRowsHeight));
|
|
46484
46543
|
let attrX = 0;
|
|
46485
|
-
const hoverOn = this.table.theme.scrollStyle.hoverOn;
|
|
46486
46544
|
if (this.table.theme.scrollStyle.barToSide) {
|
|
46487
46545
|
attrX =
|
|
46488
46546
|
this.table.tableNoFrameWidth -
|
|
@@ -46697,7 +46755,8 @@
|
|
|
46697
46755
|
}
|
|
46698
46756
|
setTopFrozenColumnShadow() {
|
|
46699
46757
|
const rowY = getRowTopY(this.table);
|
|
46700
|
-
if (this.table.columnHeaderLevelCount === this.table.frozenRowCount ||
|
|
46758
|
+
if (this.table.columnHeaderLevelCount === this.table.frozenRowCount ||
|
|
46759
|
+
this.table.theme.frozenColumnLine?.shadow?.visible !== 'always') {
|
|
46701
46760
|
this.topFrozenShadowLine.setAttributes({
|
|
46702
46761
|
visible: false,
|
|
46703
46762
|
y: 0,
|
|
@@ -49236,11 +49295,10 @@
|
|
|
49236
49295
|
});
|
|
49237
49296
|
|
|
49238
49297
|
function computeColsWidth(table, colStart, colEnd, update) {
|
|
49239
|
-
table.internalProps.columnWidthConfig &&
|
|
49240
|
-
table._parseColumnWidthConfig(table.internalProps.columnWidthConfig);
|
|
49298
|
+
table.internalProps.columnWidthConfig && _parseColumnWidthConfig(table, table.internalProps.columnWidthConfig);
|
|
49241
49299
|
table.isPivotTable() &&
|
|
49242
49300
|
table.internalProps.columnWidthConfigForRowHeader &&
|
|
49243
|
-
|
|
49301
|
+
_parseColumnWidthConfigForPivotRowHeader(table, table.internalProps.columnWidthConfigForRowHeader);
|
|
49244
49302
|
colStart = colStart ?? 0;
|
|
49245
49303
|
colEnd = colEnd ?? table.colCount - 1;
|
|
49246
49304
|
if (colStart === 0 && colEnd === table.colCount - 1) {
|
|
@@ -49798,6 +49856,83 @@
|
|
|
49798
49856
|
}
|
|
49799
49857
|
}
|
|
49800
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
|
+
}
|
|
49801
49936
|
|
|
49802
49937
|
const emptyGroup = new Group$1({});
|
|
49803
49938
|
emptyGroup.role = 'empty';
|
|
@@ -49813,6 +49948,9 @@
|
|
|
49813
49948
|
else if (columnGroup.colHeight) {
|
|
49814
49949
|
y = columnGroup.colHeight;
|
|
49815
49950
|
}
|
|
49951
|
+
else if (rowStart >= table.columnHeaderLevelCount && rowStart < table.rowCount - table.bottomFrozenRowCount) {
|
|
49952
|
+
y = table.getRowsHeight(table.columnHeaderLevelCount, rowStart - 1);
|
|
49953
|
+
}
|
|
49816
49954
|
for (let j = rowStart; j <= rowEnd; j++) {
|
|
49817
49955
|
const row = j;
|
|
49818
49956
|
let cellLocation = table.getCellLocation(col, row);
|
|
@@ -49890,7 +50028,7 @@
|
|
|
49890
50028
|
if (vtableMerge) {
|
|
49891
50029
|
mayHaveIcon = true;
|
|
49892
50030
|
if (table.internalProps.groupTitleCustomLayout) {
|
|
49893
|
-
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);
|
|
49894
50032
|
}
|
|
49895
50033
|
if (table.internalProps.groupTitleFieldFormat) {
|
|
49896
50034
|
value = table.internalProps.groupTitleFieldFormat(rawRecord, col, row, table);
|
|
@@ -52100,6 +52238,21 @@
|
|
|
52100
52238
|
});
|
|
52101
52239
|
}
|
|
52102
52240
|
}
|
|
52241
|
+
const resetGroupCell = (table, col, row, mergeInfo) => {
|
|
52242
|
+
if (mergeInfo) {
|
|
52243
|
+
const record = table.getRecordByRowCol(mergeInfo.start.col, mergeInfo.start.row);
|
|
52244
|
+
if (record && record.vtableMerge) {
|
|
52245
|
+
mergeInfo.start = {
|
|
52246
|
+
col,
|
|
52247
|
+
row
|
|
52248
|
+
};
|
|
52249
|
+
mergeInfo.end = {
|
|
52250
|
+
col,
|
|
52251
|
+
row
|
|
52252
|
+
};
|
|
52253
|
+
}
|
|
52254
|
+
}
|
|
52255
|
+
};
|
|
52103
52256
|
function updateCellSelectBorder(scene, selectRange, ifExtendSelectRange = true) {
|
|
52104
52257
|
const table = scene.table;
|
|
52105
52258
|
const newStartCol = selectRange.start.col;
|
|
@@ -52120,6 +52273,7 @@
|
|
|
52120
52273
|
continue;
|
|
52121
52274
|
}
|
|
52122
52275
|
const mergeInfo = getCellMergeInfo(table, col, row);
|
|
52276
|
+
resetGroupCell(table, col, row, mergeInfo);
|
|
52123
52277
|
if (mergeInfo && mergeInfo.start.col < startCol) {
|
|
52124
52278
|
startCol = mergeInfo.start.col;
|
|
52125
52279
|
isExtend = true;
|
|
@@ -52133,6 +52287,7 @@
|
|
|
52133
52287
|
continue;
|
|
52134
52288
|
}
|
|
52135
52289
|
const mergeInfo = getCellMergeInfo(table, col, row);
|
|
52290
|
+
resetGroupCell(table, col, row, mergeInfo);
|
|
52136
52291
|
if (mergeInfo && Math.min(mergeInfo.end.col, table.colCount - 1) > endCol) {
|
|
52137
52292
|
endCol = mergeInfo.end.col;
|
|
52138
52293
|
isExtend = true;
|
|
@@ -52152,6 +52307,7 @@
|
|
|
52152
52307
|
continue;
|
|
52153
52308
|
}
|
|
52154
52309
|
const mergeInfo = getCellMergeInfo(table, col, row);
|
|
52310
|
+
resetGroupCell(table, col, row, mergeInfo);
|
|
52155
52311
|
if (mergeInfo && mergeInfo.start.row < startRow) {
|
|
52156
52312
|
startRow = mergeInfo.start.row;
|
|
52157
52313
|
isExtend = true;
|
|
@@ -52165,6 +52321,7 @@
|
|
|
52165
52321
|
continue;
|
|
52166
52322
|
}
|
|
52167
52323
|
const mergeInfo = getCellMergeInfo(table, col, row);
|
|
52324
|
+
resetGroupCell(table, col, row, mergeInfo);
|
|
52168
52325
|
if (mergeInfo && Math.min(mergeInfo.end.row, table.rowCount - 1) > endRow) {
|
|
52169
52326
|
endRow = mergeInfo.end.row;
|
|
52170
52327
|
isExtend = true;
|
|
@@ -53035,7 +53192,9 @@
|
|
|
53035
53192
|
const frozenRowsHeight = table.getFrozenRowsHeight();
|
|
53036
53193
|
const bottomFrozenRowsHeight = table.getBottomFrozenRowsHeight();
|
|
53037
53194
|
const totalFrozenRowsHeight = frozenRowsHeight + bottomFrozenRowsHeight;
|
|
53038
|
-
const
|
|
53195
|
+
const h = tableNoFrameHeight - totalFrozenRowsHeight;
|
|
53196
|
+
const hh = Math.min(allRowsHeight - totalFrozenRowsHeight, tableNoFrameHeight - totalFrozenRowsHeight);
|
|
53197
|
+
const bodyHeight = hh < h ? h : hh;
|
|
53039
53198
|
tableBodyDomContainer.style.width = `${tableNoFrameWidth}px`;
|
|
53040
53199
|
const tableHeight = Math.min(allRowsHeight - frozenRowsHeight, tableNoFrameHeight - frozenRowsHeight);
|
|
53041
53200
|
tableBodyDomContainer.style.height = `${tableHeight}px`;
|
|
@@ -54247,7 +54406,7 @@
|
|
|
54247
54406
|
}
|
|
54248
54407
|
updateCellRangeIcon(col, row, (icon) => icon.attribute.funcType === IconFuncTypeEnum.collapse || icon.attribute.funcType === IconFuncTypeEnum.expand, (icon) => {
|
|
54249
54408
|
dealWithIcon(iconConfig, icon);
|
|
54250
|
-
icon.name = iconConfig
|
|
54409
|
+
icon.name = iconConfig?.name;
|
|
54251
54410
|
}, scene);
|
|
54252
54411
|
}
|
|
54253
54412
|
function updateCellGroupIcon(cellGroup, filter, dealer) {
|
|
@@ -54833,6 +54992,22 @@
|
|
|
54833
54992
|
this.isPivot = this.table.isPivotTable();
|
|
54834
54993
|
initSceneGraph(this);
|
|
54835
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
|
+
}
|
|
54836
55011
|
clearCells() {
|
|
54837
55012
|
this.table.animationManager.clear();
|
|
54838
55013
|
if (this.table.isPivotChart() || this.table._hasCustomRenderOrLayout()) {
|
|
@@ -55681,6 +55856,9 @@
|
|
|
55681
55856
|
if (this.table.options.animationAppear) {
|
|
55682
55857
|
dealWithAnimationAppear(this.table);
|
|
55683
55858
|
}
|
|
55859
|
+
if (this.table.options.menu?.contextMenuWorkOnlyCell === false) {
|
|
55860
|
+
this.canvasShowMenu();
|
|
55861
|
+
}
|
|
55684
55862
|
this.updateNextFrame();
|
|
55685
55863
|
}
|
|
55686
55864
|
dealWidthMode() {
|
|
@@ -56188,9 +56366,11 @@
|
|
|
56188
56366
|
this.component.updateScrollBar();
|
|
56189
56367
|
this.updateNextFrame();
|
|
56190
56368
|
}
|
|
56191
|
-
updateCol(removeCells, addCells, updateCells = []) {
|
|
56369
|
+
updateCol(removeCells, addCells, updateCells = [], recalculateColWidths = true) {
|
|
56192
56370
|
updateCol(removeCells, addCells, updateCells, this.table);
|
|
56193
|
-
|
|
56371
|
+
if (recalculateColWidths) {
|
|
56372
|
+
this.recalculateColWidths();
|
|
56373
|
+
}
|
|
56194
56374
|
this.recalculateRowHeights();
|
|
56195
56375
|
this.table.stateManager.checkFrozen();
|
|
56196
56376
|
if (!this.isPivot && !this.table.transpose) {
|
|
@@ -57537,6 +57717,7 @@
|
|
|
57537
57717
|
}
|
|
57538
57718
|
state.columnResize.x = xInTable;
|
|
57539
57719
|
state.table.scenegraph.component.updateResizeCol(state.columnResize.col, yInTable, state.columnResize.isRightFrozen);
|
|
57720
|
+
state.table._updateSize();
|
|
57540
57721
|
if (state.columnResize.col < state.table.frozenColCount &&
|
|
57541
57722
|
!state.table.isPivotTable() &&
|
|
57542
57723
|
!state.table.transpose) {
|
|
@@ -58197,6 +58378,7 @@
|
|
|
58197
58378
|
}
|
|
58198
58379
|
state.rowResize.y = yInTable;
|
|
58199
58380
|
state.table.scenegraph.component.updateResizeRow(state.rowResize.row, xInTable, state.rowResize.isBottomFrozen);
|
|
58381
|
+
state.table._updateSize();
|
|
58200
58382
|
state.table.scenegraph.updateNextFrame();
|
|
58201
58383
|
}
|
|
58202
58384
|
function updateResizeColForRow(detaY, state) {
|
|
@@ -60348,40 +60530,63 @@
|
|
|
60348
60530
|
if (eventArgsSet.eventArgs) {
|
|
60349
60531
|
stateManager.triggerContextMenu(eventArgsSet.eventArgs.col, eventArgsSet.eventArgs.row, eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y);
|
|
60350
60532
|
const { col, row } = eventArgsSet.eventArgs;
|
|
60351
|
-
if (
|
|
60352
|
-
const
|
|
60353
|
-
let
|
|
60354
|
-
|
|
60355
|
-
|
|
60356
|
-
|
|
60357
|
-
|
|
60358
|
-
|
|
60359
|
-
|
|
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
|
+
}
|
|
60360
60550
|
}
|
|
60361
60551
|
}
|
|
60362
|
-
|
|
60363
|
-
|
|
60364
|
-
|
|
60365
|
-
|
|
60366
|
-
|
|
60367
|
-
|
|
60368
|
-
|
|
60369
|
-
|
|
60370
|
-
|
|
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;
|
|
60371
60564
|
}
|
|
60372
|
-
: undefined,
|
|
60373
|
-
target: eventArgsSet?.eventArgs?.target,
|
|
60374
|
-
mergeCellInfo: eventArgsSet.eventArgs?.mergeInfo
|
|
60375
|
-
};
|
|
60376
|
-
if (table.options.eventOptions?.contextmenuReturnAllSelectedCells ?? true) {
|
|
60377
|
-
if (cellInRanges(table.stateManager.select.ranges, col, row)) {
|
|
60378
|
-
cellsEvent.cells = table.getSelectedCellInfos();
|
|
60379
60565
|
}
|
|
60380
|
-
|
|
60381
|
-
|
|
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
|
+
}
|
|
60382
60587
|
}
|
|
60588
|
+
table.fireListeners(TABLE_EVENT_TYPE.CONTEXTMENU_CELL, cellsEvent);
|
|
60383
60589
|
}
|
|
60384
|
-
table.fireListeners(TABLE_EVENT_TYPE.CONTEXTMENU_CELL, cellsEvent);
|
|
60385
60590
|
}
|
|
60386
60591
|
}
|
|
60387
60592
|
});
|
|
@@ -61606,8 +61811,12 @@
|
|
|
61606
61811
|
table.stateManager.updateInteractionState(InteractionState.grabing);
|
|
61607
61812
|
const targetCol = table.getTargetColAtConsiderRightFrozen(selectX, considerFrozenX);
|
|
61608
61813
|
const targetRow = table.getTargetRowAtConsiderBottomFrozen(selectY, considerFrozenY);
|
|
61609
|
-
if (!table.options.select?.disableDragSelect &&
|
|
61610
|
-
(
|
|
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)))) {
|
|
61611
61820
|
table.stateManager.updateSelectPos(targetCol.col, targetRow.row, false, false, false, false);
|
|
61612
61821
|
}
|
|
61613
61822
|
});
|
|
@@ -63363,6 +63572,9 @@
|
|
|
63363
63572
|
const rect = table.getCellRangeRelativeRect({ col, row });
|
|
63364
63573
|
const element = table.internalProps.menu.parentElement ?? table.getElement();
|
|
63365
63574
|
const { top, bottom, left, right } = rect;
|
|
63575
|
+
if (col === -1 && row === -1) {
|
|
63576
|
+
return true;
|
|
63577
|
+
}
|
|
63366
63578
|
if (table.isFrozenCell(col, row)) {
|
|
63367
63579
|
return true;
|
|
63368
63580
|
}
|
|
@@ -64954,22 +65166,24 @@
|
|
|
64954
65166
|
}
|
|
64955
65167
|
}
|
|
64956
65168
|
function generateLayoutTree(tree, children) {
|
|
64957
|
-
|
|
64958
|
-
|
|
64959
|
-
|
|
64960
|
-
|
|
64961
|
-
|
|
64962
|
-
|
|
64963
|
-
|
|
64964
|
-
|
|
64965
|
-
|
|
64966
|
-
|
|
64967
|
-
|
|
64968
|
-
|
|
64969
|
-
|
|
64970
|
-
|
|
64971
|
-
|
|
64972
|
-
|
|
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
|
+
}
|
|
64973
65187
|
}
|
|
64974
65188
|
function countLayoutTree(children, countParentNode) {
|
|
64975
65189
|
let count = 0;
|
|
@@ -67252,7 +67466,7 @@
|
|
|
67252
67466
|
return TABLE_EVENT_TYPE;
|
|
67253
67467
|
}
|
|
67254
67468
|
options;
|
|
67255
|
-
version = "1.0.
|
|
67469
|
+
version = "1.0.14";
|
|
67256
67470
|
pagination;
|
|
67257
67471
|
id = `VTable${Date.now()}`;
|
|
67258
67472
|
headerStyleCache;
|
|
@@ -67390,6 +67604,8 @@
|
|
|
67390
67604
|
internalProps.groupBy = groupConfig?.groupBy ?? groupBy;
|
|
67391
67605
|
internalProps.groupTitleCheckbox =
|
|
67392
67606
|
groupConfig?.titleCheckbox ?? !!rowSeriesNumber?.enableTreeCheckbox;
|
|
67607
|
+
internalProps.groupCellMerge = groupConfig?.groupCellMerge;
|
|
67608
|
+
internalProps.customDealGroupData = groupConfig?.customDealGroupData;
|
|
67393
67609
|
internalProps.groupTitleFieldFormat =
|
|
67394
67610
|
groupConfig?.titleFieldFormat ?? groupTitleFieldFormat;
|
|
67395
67611
|
internalProps.groupTitleCustomLayout =
|
|
@@ -67944,8 +68160,17 @@
|
|
|
67944
68160
|
widthP = this.canvasWidth - 1;
|
|
67945
68161
|
heightP = this.canvasHeight - 1;
|
|
67946
68162
|
}
|
|
67947
|
-
const
|
|
67948
|
-
|
|
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);
|
|
67949
68174
|
if (this.internalProps.theme?.frameStyle) {
|
|
67950
68175
|
const lineWidths = toBoxArray(this.internalProps.theme.frameStyle?.borderLineWidth ?? [null]);
|
|
67951
68176
|
const shadowWidths = toBoxArray(this.internalProps.theme.frameStyle?.shadowBlur ?? [0]);
|
|
@@ -67958,15 +68183,67 @@
|
|
|
67958
68183
|
else {
|
|
67959
68184
|
this.tableX = (lineWidths[3] ?? 0) + (shadowWidths[3] ?? 0);
|
|
67960
68185
|
this.tableY = (lineWidths[0] ?? 0) + (shadowWidths[0] ?? 0);
|
|
68186
|
+
const rightBorder = (lineWidths[1] ?? 0) + (shadowWidths[1] ?? 0);
|
|
67961
68187
|
this.tableNoFrameWidth =
|
|
67962
|
-
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);
|
|
67963
68192
|
this.tableNoFrameHeight =
|
|
67964
|
-
height -
|
|
68193
|
+
height -
|
|
68194
|
+
(bottomBorder > hScrollBarWidth ? bottomBorder - hScrollBarWidth : 0) -
|
|
68195
|
+
((lineWidths[0] ?? 0) + (shadowWidths[0] ?? 0));
|
|
67965
68196
|
}
|
|
67966
68197
|
}
|
|
67967
68198
|
this._clearColRangeWidthsMap();
|
|
67968
68199
|
this._clearRowRangeHeightsMap();
|
|
67969
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
|
+
}
|
|
67970
68247
|
updateViewBox(newViewBox) {
|
|
67971
68248
|
const oldWidth = (this.options?.viewBox?.x2 ?? 0) - (this.options?.viewBox?.x1 ?? 0);
|
|
67972
68249
|
const oldHeight = (this.options?.viewBox?.y2 ?? 0) - (this.options?.viewBox?.y1 ?? 0);
|
|
@@ -72111,6 +72388,9 @@
|
|
|
72111
72388
|
if (layout.rowHierarchyType !== 'tree') {
|
|
72112
72389
|
return;
|
|
72113
72390
|
}
|
|
72391
|
+
if (layout._table.internalProps.groupCellMerge) {
|
|
72392
|
+
return layout._table.internalProps.groupCellMerge(col, row, cellRange, layout);
|
|
72393
|
+
}
|
|
72114
72394
|
const cellRecord = layout._table.getCellRawRecord(col, row);
|
|
72115
72395
|
if (layout._table.internalProps.groupTitleCheckbox && layout._table.internalProps.rowSeriesNumber) {
|
|
72116
72396
|
if (cellRecord?.vtableMerge && col >= layout.leftRowSeriesNumberColumnCount) {
|
|
@@ -73101,7 +73381,7 @@
|
|
|
73101
73381
|
}
|
|
73102
73382
|
const expand = !hd.hierarchyState || hd.hierarchyState === HierarchyState.expand;
|
|
73103
73383
|
if (!!hd.columns && !!expand) {
|
|
73104
|
-
const isAllHided = hd.columns.every((c) => c.hide);
|
|
73384
|
+
const isAllHided = hd.columns.every((c) => c.hide) || hd.hide;
|
|
73105
73385
|
!isAllHided &&
|
|
73106
73386
|
this._addHeaders(maxRow + 1, hd.columns, [...roots, id], hd.hideColumnsSubHeader || hideColumnsSubHeader, hd.levelSpan).forEach(c => results.push(c));
|
|
73107
73387
|
}
|
|
@@ -73662,9 +73942,9 @@
|
|
|
73662
73942
|
return false;
|
|
73663
73943
|
}
|
|
73664
73944
|
|
|
73665
|
-
function getGroupByDataConfig(groupByOption) {
|
|
73945
|
+
function getGroupByDataConfig(groupByOption, customDealGroupData) {
|
|
73666
73946
|
if (isString$4(groupByOption)) {
|
|
73667
|
-
return { groupByRules: [groupByOption] };
|
|
73947
|
+
return { groupByRules: [groupByOption], customDealGroupData };
|
|
73668
73948
|
}
|
|
73669
73949
|
if (isArray$7(groupByOption)) {
|
|
73670
73950
|
const groupByRules = groupByOption.map(item => {
|
|
@@ -73673,7 +73953,7 @@
|
|
|
73673
73953
|
}
|
|
73674
73954
|
return item.key;
|
|
73675
73955
|
});
|
|
73676
|
-
return { groupByRules };
|
|
73956
|
+
return { groupByRules, customDealGroupData };
|
|
73677
73957
|
}
|
|
73678
73958
|
return {};
|
|
73679
73959
|
}
|
|
@@ -74645,7 +74925,9 @@
|
|
|
74645
74925
|
this.pagination = options.pagination;
|
|
74646
74926
|
internalProps.sortState = options.sortState;
|
|
74647
74927
|
internalProps.multipleSort = !!options.multipleSort;
|
|
74648
|
-
internalProps.dataConfig = this.internalProps.groupBy
|
|
74928
|
+
internalProps.dataConfig = this.internalProps.groupBy
|
|
74929
|
+
? getGroupByDataConfig(this.internalProps.groupBy, this.internalProps.customDealGroupData)
|
|
74930
|
+
: {};
|
|
74649
74931
|
internalProps.columns = options.columns
|
|
74650
74932
|
? cloneDeepSpec(options.columns, ['children'])
|
|
74651
74933
|
: options.header
|
|
@@ -74675,7 +74957,6 @@
|
|
|
74675
74957
|
if (options.title) {
|
|
74676
74958
|
const Title = Factory.getComponent('title');
|
|
74677
74959
|
internalProps.title = new Title(options.title, this);
|
|
74678
|
-
this.scenegraph.resize();
|
|
74679
74960
|
}
|
|
74680
74961
|
if (this.options.emptyTip) {
|
|
74681
74962
|
if (this.internalProps.emptyTip) {
|
|
@@ -74692,6 +74973,10 @@
|
|
|
74692
74973
|
this.listTreeStickCellPlugin = new ListTreeStickCellPlugin(this);
|
|
74693
74974
|
}
|
|
74694
74975
|
setTimeout(() => {
|
|
74976
|
+
if (this.isReleased) {
|
|
74977
|
+
return;
|
|
74978
|
+
}
|
|
74979
|
+
this.resize();
|
|
74695
74980
|
this.fireListeners(TABLE_EVENT_TYPE.INITIALIZED, null);
|
|
74696
74981
|
}, 0);
|
|
74697
74982
|
}
|
|
@@ -74750,6 +75035,7 @@
|
|
|
74750
75035
|
this.headerStyleCache = new Map();
|
|
74751
75036
|
this.bodyStyleCache = new Map();
|
|
74752
75037
|
this.bodyBottomStyleCache = new Map();
|
|
75038
|
+
this._updateSize();
|
|
74753
75039
|
this.scenegraph.createSceneGraph();
|
|
74754
75040
|
this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row);
|
|
74755
75041
|
this.renderAsync();
|
|
@@ -74962,7 +75248,7 @@
|
|
|
74962
75248
|
this.pagination = options.pagination;
|
|
74963
75249
|
internalProps.sortState = options.sortState;
|
|
74964
75250
|
internalProps.dataConfig = this.internalProps.groupBy
|
|
74965
|
-
? getGroupByDataConfig(this.internalProps.groupBy)
|
|
75251
|
+
? getGroupByDataConfig(this.internalProps.groupBy, this.internalProps.customDealGroupData)
|
|
74966
75252
|
: {};
|
|
74967
75253
|
this.showHeader = options.showHeader ?? true;
|
|
74968
75254
|
internalProps.columns = options.columns
|
|
@@ -75081,6 +75367,9 @@
|
|
|
75081
75367
|
table.colCount = layoutMap.colCount ?? 0;
|
|
75082
75368
|
table.rowCount = layoutMap.recordsCount * layoutMap.bodyRowSpanCount + layoutMap.headerLevelCount;
|
|
75083
75369
|
this.internalProps.frozenColCount = this.options.frozenColCount ?? 0;
|
|
75370
|
+
if (this.options.frozenColCount >= this.colCount) {
|
|
75371
|
+
this.internalProps.frozenColCount = 0;
|
|
75372
|
+
}
|
|
75084
75373
|
table.frozenRowCount = Math.max(layoutMap.headerLevelCount, this.options.frozenRowCount ?? 0);
|
|
75085
75374
|
if (table.bottomFrozenRowCount !== (this.options.bottomFrozenRowCount ?? 0)) {
|
|
75086
75375
|
table.bottomFrozenRowCount = this.options.bottomFrozenRowCount ?? 0;
|
|
@@ -75411,6 +75700,7 @@
|
|
|
75411
75700
|
this.refreshRowColCount();
|
|
75412
75701
|
this.stateManager.initCheckedState(this.records);
|
|
75413
75702
|
this.scenegraph.createSceneGraph();
|
|
75703
|
+
this.resize();
|
|
75414
75704
|
}
|
|
75415
75705
|
getCheckboxState(field) {
|
|
75416
75706
|
if (this.stateManager.checkedState.size < this.rowCount - this.columnHeaderLevelCount) {
|
|
@@ -75525,11 +75815,11 @@
|
|
|
75525
75815
|
this.clearCellStyleCache();
|
|
75526
75816
|
this.scenegraph.createSceneGraph();
|
|
75527
75817
|
this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row);
|
|
75818
|
+
this._updateSize();
|
|
75528
75819
|
if (this.internalProps.title && !this.internalProps.title.isReleased) {
|
|
75529
|
-
this._updateSize();
|
|
75530
75820
|
this.internalProps.title.resize();
|
|
75531
|
-
this.scenegraph.resize();
|
|
75532
75821
|
}
|
|
75822
|
+
this.scenegraph.resize();
|
|
75533
75823
|
if (this.options.emptyTip) {
|
|
75534
75824
|
if (this.internalProps.emptyTip) {
|
|
75535
75825
|
this.internalProps.emptyTip?.resetVisible();
|
|
@@ -75696,21 +75986,6 @@
|
|
|
75696
75986
|
}
|
|
75697
75987
|
return this.dataSource.getTableIndex(index);
|
|
75698
75988
|
}
|
|
75699
|
-
_parseColumnWidthConfig(columnWidthConfig) {
|
|
75700
|
-
for (let i = 0; i < columnWidthConfig?.length; i++) {
|
|
75701
|
-
const item = columnWidthConfig[i];
|
|
75702
|
-
const key = item.key;
|
|
75703
|
-
const width = item.width;
|
|
75704
|
-
const columnData = this.internalProps.layoutMap.getColumnByKey(key);
|
|
75705
|
-
if (columnData.columnDefine) {
|
|
75706
|
-
const { col } = columnData;
|
|
75707
|
-
if (!this.internalProps._widthResizedColMap.has(col)) {
|
|
75708
|
-
this._setColWidth(col, width);
|
|
75709
|
-
this.internalProps._widthResizedColMap.add(col);
|
|
75710
|
-
}
|
|
75711
|
-
}
|
|
75712
|
-
}
|
|
75713
|
-
}
|
|
75714
75989
|
release() {
|
|
75715
75990
|
this.editorManager.release();
|
|
75716
75991
|
super.release();
|
|
@@ -77843,10 +78118,11 @@
|
|
|
77843
78118
|
if (!this.legendComponent || this.visible === false) {
|
|
77844
78119
|
return;
|
|
77845
78120
|
}
|
|
77846
|
-
this.
|
|
77847
|
-
|
|
77848
|
-
|
|
78121
|
+
const attrs = this.getLegendAttributes({
|
|
78122
|
+
width: this.table.tableNoFrameWidth,
|
|
78123
|
+
height: this.table.tableNoFrameHeight
|
|
77849
78124
|
});
|
|
78125
|
+
this.legendComponent.setAttributes(attrs);
|
|
77850
78126
|
this.adjustTableSize(this.legendComponent.attribute);
|
|
77851
78127
|
}
|
|
77852
78128
|
adjustTableSize(attrs) {
|
|
@@ -78536,6 +78812,19 @@
|
|
|
78536
78812
|
}
|
|
78537
78813
|
};
|
|
78538
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
|
+
}
|
|
78539
78828
|
const { lineHeight, textBaseline, textStick } = table._getCellStyle(col, row);
|
|
78540
78829
|
let rect = table.getCellRangeRelativeRect(table.getCellRange(col, row));
|
|
78541
78830
|
if (textStick) {
|
|
@@ -78618,7 +78907,9 @@
|
|
|
78618
78907
|
const { instance, info: menuInstanceInfo } = instanceInfo;
|
|
78619
78908
|
const attach = instance && instance.bindMenuElement(col, row, menuInstanceInfo);
|
|
78620
78909
|
if (attach) {
|
|
78621
|
-
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);
|
|
78622
78913
|
this._attachInfo = { range, instance };
|
|
78623
78914
|
}
|
|
78624
78915
|
}
|
|
@@ -78679,6 +78970,22 @@
|
|
|
78679
78970
|
});
|
|
78680
78971
|
}
|
|
78681
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
|
+
});
|
|
78682
78989
|
}
|
|
78683
78990
|
_getMenuInstanceInfo(col, row, type, dropDownMenuOptions) {
|
|
78684
78991
|
const table = this._table;
|
|
@@ -84778,10 +85085,10 @@
|
|
|
84778
85085
|
needLowestLevel_colPaths = true;
|
|
84779
85086
|
needLowestLevel_rowPaths = true;
|
|
84780
85087
|
}
|
|
84781
|
-
if (colHeaderPaths.length >= this._getColumnHeaderTreeExpandedMaxLevelCount()) {
|
|
85088
|
+
if ((colHeaderPaths?.length ?? 0) && colHeaderPaths.length >= this._getColumnHeaderTreeExpandedMaxLevelCount()) {
|
|
84782
85089
|
needLowestLevel_colPaths = true;
|
|
84783
85090
|
}
|
|
84784
|
-
if (rowHeaderPaths.length >= this._getRowHeaderTreeExpandedMaxLevelCount()) {
|
|
85091
|
+
if ((rowHeaderPaths?.length ?? 0) && rowHeaderPaths.length >= this._getRowHeaderTreeExpandedMaxLevelCount()) {
|
|
84785
85092
|
needLowestLevel_rowPaths = true;
|
|
84786
85093
|
}
|
|
84787
85094
|
let col;
|
|
@@ -87830,7 +88137,6 @@
|
|
|
87830
88137
|
if (options.title) {
|
|
87831
88138
|
const Title = Factory.getComponent('title');
|
|
87832
88139
|
this.internalProps.title = new Title(options.title, this);
|
|
87833
|
-
this.scenegraph.resize();
|
|
87834
88140
|
}
|
|
87835
88141
|
if (this.options.emptyTip) {
|
|
87836
88142
|
if (this.internalProps.emptyTip) {
|
|
@@ -87843,6 +88149,10 @@
|
|
|
87843
88149
|
}
|
|
87844
88150
|
}
|
|
87845
88151
|
setTimeout(() => {
|
|
88152
|
+
if (this.isReleased) {
|
|
88153
|
+
return;
|
|
88154
|
+
}
|
|
88155
|
+
this.resize();
|
|
87846
88156
|
this.fireListeners(TABLE_EVENT_TYPE.INITIALIZED, null);
|
|
87847
88157
|
}, 0);
|
|
87848
88158
|
}
|
|
@@ -88081,7 +88391,7 @@
|
|
|
88081
88391
|
if (sourceNode.value === targetNode.value && sourceNode.dimensionKey === targetNode.dimensionKey) {
|
|
88082
88392
|
targetNode.hierarchyState =
|
|
88083
88393
|
targetNode.hierarchyState ?? (targetNode?.children ? sourceNode.hierarchyState : undefined);
|
|
88084
|
-
targetNode?.children?.forEach((targetChildNode, index) => {
|
|
88394
|
+
targetNode?.children?.forEach?.((targetChildNode, index) => {
|
|
88085
88395
|
if (sourceNode?.children?.[index] && targetChildNode) {
|
|
88086
88396
|
const beforeRowDimension = sourceNode.children.find((item) => item.dimensionKey === targetChildNode.dimensionKey && item.value === targetChildNode.value);
|
|
88087
88397
|
if (beforeRowDimension) {
|
|
@@ -88550,60 +88860,6 @@
|
|
|
88550
88860
|
});
|
|
88551
88861
|
}
|
|
88552
88862
|
}
|
|
88553
|
-
_parseColumnWidthConfig(columnWidthConfig) {
|
|
88554
|
-
for (let i = 0; i < columnWidthConfig?.length; i++) {
|
|
88555
|
-
const item = columnWidthConfig[i];
|
|
88556
|
-
const dimensions = item.dimensions;
|
|
88557
|
-
const width = item.width;
|
|
88558
|
-
const cell = this.getCellAddressByHeaderPaths(dimensions);
|
|
88559
|
-
if (cell && cell.col >= this.rowHeaderLevelCount) {
|
|
88560
|
-
const cellPath = this.getCellHeaderPaths(cell.col, this.columnHeaderLevelCount);
|
|
88561
|
-
if (cellPath.colHeaderPaths.length === dimensions.length) {
|
|
88562
|
-
let match = true;
|
|
88563
|
-
for (let i = 0; i < dimensions.length; i++) {
|
|
88564
|
-
const dimension = dimensions[i];
|
|
88565
|
-
const finded = cellPath.colHeaderPaths.findIndex((colPath, index) => {
|
|
88566
|
-
if (colPath.indicatorKey === dimension.indicatorKey) {
|
|
88567
|
-
return true;
|
|
88568
|
-
}
|
|
88569
|
-
if (colPath.dimensionKey === dimension.dimensionKey && colPath.value === dimension.value) {
|
|
88570
|
-
return true;
|
|
88571
|
-
}
|
|
88572
|
-
return false;
|
|
88573
|
-
});
|
|
88574
|
-
if (finded < 0) {
|
|
88575
|
-
match = false;
|
|
88576
|
-
break;
|
|
88577
|
-
}
|
|
88578
|
-
}
|
|
88579
|
-
if (match && !this.internalProps._widthResizedColMap.has(cell.col)) {
|
|
88580
|
-
this._setColWidth(cell.col, width);
|
|
88581
|
-
this.internalProps._widthResizedColMap.add(cell.col);
|
|
88582
|
-
}
|
|
88583
|
-
}
|
|
88584
|
-
}
|
|
88585
|
-
else if (cell && cell.col < this.rowHeaderLevelCount) {
|
|
88586
|
-
if (!this.internalProps._widthResizedColMap.has(cell.col)) {
|
|
88587
|
-
this._setColWidth(cell.col, width);
|
|
88588
|
-
this.internalProps._widthResizedColMap.add(cell.col);
|
|
88589
|
-
}
|
|
88590
|
-
}
|
|
88591
|
-
}
|
|
88592
|
-
}
|
|
88593
|
-
_parseColumnWidthConfigForRowHeader(columnWidthConfig) {
|
|
88594
|
-
for (let i = 0; i < columnWidthConfig?.length; i++) {
|
|
88595
|
-
const item = columnWidthConfig[i];
|
|
88596
|
-
const dimensions = item.dimensions;
|
|
88597
|
-
const width = item.width;
|
|
88598
|
-
const cell = this.getCellAddressByHeaderPaths(dimensions);
|
|
88599
|
-
if (cell && cell.col < this.rowHeaderLevelCount) {
|
|
88600
|
-
if (!this.internalProps._widthResizedColMap.has(cell.col)) {
|
|
88601
|
-
this._setColWidth(cell.col, width);
|
|
88602
|
-
this.internalProps._widthResizedColMap.add(cell.col);
|
|
88603
|
-
}
|
|
88604
|
-
}
|
|
88605
|
-
}
|
|
88606
|
-
}
|
|
88607
88863
|
updatePivotSortState(pivotSortStateConfig) {
|
|
88608
88864
|
this.pivotSortState = pivotSortStateConfig;
|
|
88609
88865
|
}
|
|
@@ -89475,6 +89731,8 @@
|
|
|
89475
89731
|
this.internalProps.columnResizeType = options.resize?.columnResizeType ?? options.columnResizeType ?? 'column';
|
|
89476
89732
|
this.internalProps.rowResizeType = options.resize?.rowResizeType ?? options.rowResizeType ?? 'row';
|
|
89477
89733
|
this.internalProps.dataConfig = { isPivotChart: true };
|
|
89734
|
+
this.internalProps.columnWidthConfig = options.columnWidthConfig;
|
|
89735
|
+
this.internalProps.columnWidthConfigForRowHeader = options.columnWidthConfigForRowHeader;
|
|
89478
89736
|
this._axes = isArray$7(options.axes) ? options.axes : [];
|
|
89479
89737
|
let columnDimensionTree;
|
|
89480
89738
|
let rowDimensionTree;
|
|
@@ -89572,7 +89830,6 @@
|
|
|
89572
89830
|
if (options.title) {
|
|
89573
89831
|
const Title = Factory.getComponent('title');
|
|
89574
89832
|
this.internalProps.title = new Title(options.title, this);
|
|
89575
|
-
this.scenegraph.resize();
|
|
89576
89833
|
}
|
|
89577
89834
|
if (this.options.emptyTip) {
|
|
89578
89835
|
if (this.internalProps.emptyTip) {
|
|
@@ -89585,6 +89842,10 @@
|
|
|
89585
89842
|
}
|
|
89586
89843
|
}
|
|
89587
89844
|
setTimeout(() => {
|
|
89845
|
+
if (this.isReleased) {
|
|
89846
|
+
return;
|
|
89847
|
+
}
|
|
89848
|
+
this.resize();
|
|
89588
89849
|
this.fireListeners(TABLE_EVENT_TYPE.INITIALIZED, null);
|
|
89589
89850
|
}, 0);
|
|
89590
89851
|
}
|
|
@@ -89635,6 +89896,8 @@
|
|
|
89635
89896
|
internalProps.columnResizeType = options.resize?.columnResizeType ?? options.columnResizeType ?? 'column';
|
|
89636
89897
|
internalProps.rowResizeType = options.resize?.rowResizeType ?? options.rowResizeType ?? 'row';
|
|
89637
89898
|
internalProps.dataConfig = { isPivotChart: true };
|
|
89899
|
+
this.internalProps.columnWidthConfig = options.columnWidthConfig;
|
|
89900
|
+
this.internalProps.columnWidthConfigForRowHeader = options.columnWidthConfigForRowHeader;
|
|
89638
89901
|
this._axes = isArray$7(options.axes) ? options.axes : [];
|
|
89639
89902
|
let columnDimensionTree;
|
|
89640
89903
|
let rowDimensionTree;
|
|
@@ -91141,7 +91404,7 @@
|
|
|
91141
91404
|
}
|
|
91142
91405
|
|
|
91143
91406
|
registerForVrender();
|
|
91144
|
-
const version = "1.0.
|
|
91407
|
+
const version = "1.0.14";
|
|
91145
91408
|
function getIcons() {
|
|
91146
91409
|
return get$2();
|
|
91147
91410
|
}
|