@visactor/vtable 0.9.3-alpha.4 → 0.9.3-alpha.5
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.js +8 -8
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.d.ts +7 -4
- package/cjs/PivotChart.js +17 -17
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable.js +7 -7
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/components/axis/axis.js +5 -4
- package/cjs/components/axis/axis.js.map +1 -1
- package/cjs/components/axis/get-axis-component-size.d.ts +3 -0
- package/cjs/components/axis/get-axis-component-size.js +50 -0
- package/cjs/components/axis/get-axis-component-size.js.map +1 -0
- package/cjs/components/axis/linear-scale.js +2 -1
- package/cjs/components/axis/linear-scale.js.map +1 -1
- package/cjs/components/legend/legend.d.ts +1 -1
- package/cjs/components/legend/legend.js +1 -1
- package/cjs/components/legend/legend.js.map +1 -1
- package/cjs/components/menu/dom/BaseMenu.d.ts +1 -1
- package/cjs/components/menu/dom/BaseMenu.js +2 -2
- package/cjs/components/menu/dom/BaseMenu.js.map +1 -1
- package/cjs/components/menu/dom/MenuHandler.d.ts +1 -1
- package/cjs/components/menu/dom/MenuHandler.js +5 -5
- package/cjs/components/menu/dom/MenuHandler.js.map +1 -1
- package/cjs/components/menu/dom/logic/MenuContainer.d.ts +1 -1
- package/cjs/components/menu/dom/logic/MenuContainer.js +2 -2
- package/cjs/components/menu/dom/logic/MenuContainer.js.map +1 -1
- package/cjs/components/menu/dom/logic/MenuElement.d.ts +1 -1
- package/cjs/components/menu/dom/logic/MenuElement.js +2 -2
- package/cjs/components/menu/dom/logic/MenuElement.js.map +1 -1
- package/cjs/components/title/title.d.ts +1 -1
- package/cjs/components/title/title.js +1 -1
- package/cjs/components/title/title.js.map +1 -1
- package/cjs/components/tooltip/BaseTooltip.d.ts +1 -1
- package/cjs/components/tooltip/BaseTooltip.js +2 -2
- package/cjs/components/tooltip/BaseTooltip.js.map +1 -1
- package/cjs/components/tooltip/TooltipHandler.d.ts +1 -1
- package/cjs/components/tooltip/TooltipHandler.js +7 -7
- package/cjs/components/tooltip/TooltipHandler.js.map +1 -1
- package/cjs/components/tooltip/logic/BubbleTooltipElement.d.ts +1 -1
- package/cjs/components/tooltip/logic/BubbleTooltipElement.js +2 -2
- package/cjs/components/tooltip/logic/BubbleTooltipElement.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +8 -7
- package/cjs/core/BaseTable.js +35 -64
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/FouseInput.d.ts +1 -1
- package/cjs/core/FouseInput.js +1 -1
- package/cjs/core/FouseInput.js.map +1 -1
- package/cjs/core/tableHelper.js +3 -3
- package/cjs/core/tableHelper.js.map +1 -1
- package/cjs/data/CachedDataSource.d.ts +1 -1
- package/cjs/data/CachedDataSource.js +2 -2
- package/cjs/data/CachedDataSource.js.map +1 -1
- package/cjs/data/DataSource.d.ts +1 -1
- package/cjs/data/DataSource.js +2 -2
- package/cjs/data/DataSource.js.map +1 -1
- package/cjs/data/FilterDataSource.js.map +1 -1
- package/cjs/event/EventHandler.d.ts +1 -1
- package/cjs/event/EventHandler.js +1 -1
- package/cjs/event/EventHandler.js.map +1 -1
- package/cjs/event/EventTarget.d.ts +3 -3
- package/cjs/event/EventTarget.js +5 -5
- package/cjs/event/EventTarget.js.map +1 -1
- package/cjs/event/drill.js +1 -1
- package/cjs/event/drill.js.map +1 -1
- package/cjs/event/event.d.ts +1 -1
- package/cjs/event/event.js +11 -7
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/table-group.js +3 -1
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/event/media-click.js +1 -1
- package/cjs/event/media-click.js.map +1 -1
- package/cjs/event/pivot-chart/axis-hover.js +2 -2
- package/cjs/event/pivot-chart/axis-hover.js.map +1 -1
- package/cjs/event/sparkline-event.js +2 -2
- package/cjs/event/sparkline-event.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/chart-helper/get-axis-config.d.ts +1 -0
- package/cjs/layout/chart-helper/get-axis-config.js +56 -40
- package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
- package/cjs/layout/chart-helper/get-chart-spec.js +18 -12
- package/cjs/layout/chart-helper/get-chart-spec.js.map +1 -1
- package/cjs/layout/pivot-header-layout.d.ts +4 -0
- package/cjs/layout/pivot-header-layout.js +16 -0
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/pivot-layout.d.ts +4 -0
- package/cjs/layout/pivot-layout.js +16 -0
- package/cjs/layout/pivot-layout.js.map +1 -1
- package/cjs/layout/simple-header-layout.d.ts +4 -0
- package/cjs/layout/simple-header-layout.js +16 -0
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/cjs/scenegraph/component/menu.d.ts +1 -1
- package/cjs/scenegraph/component/menu.js +1 -1
- package/cjs/scenegraph/component/menu.js.map +1 -1
- package/cjs/scenegraph/graphic/icon.d.ts +2 -2
- package/cjs/scenegraph/graphic/icon.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js +7 -7
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.js +4 -2
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +4 -4
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js +23 -4
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js +1 -1
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/utils/text-icon-layout.js +1 -1
- package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/cjs/state/state.js +5 -2
- package/cjs/state/state.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +12 -11
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/component/axis.d.ts +1 -1
- package/cjs/ts-types/component/axis.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/list-table/layout-map/api.d.ts +1 -0
- package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
- package/dist/vtable.js +604 -443
- package/dist/vtable.min.js +3 -3
- package/es/ListTable.js +8 -8
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.d.ts +7 -4
- package/es/PivotChart.js +17 -17
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable.js +7 -7
- package/es/PivotTable.js.map +1 -1
- package/es/components/axis/axis.js +3 -3
- package/es/components/axis/axis.js.map +1 -1
- package/es/components/axis/get-axis-component-size.d.ts +3 -0
- package/es/components/axis/get-axis-component-size.js +44 -0
- package/es/components/axis/get-axis-component-size.js.map +1 -0
- package/es/components/axis/linear-scale.js +2 -1
- package/es/components/axis/linear-scale.js.map +1 -1
- package/es/components/legend/legend.d.ts +1 -1
- package/es/components/legend/legend.js +1 -1
- package/es/components/legend/legend.js.map +1 -1
- package/es/components/menu/dom/BaseMenu.d.ts +1 -1
- package/es/components/menu/dom/BaseMenu.js +2 -2
- package/es/components/menu/dom/BaseMenu.js.map +1 -1
- package/es/components/menu/dom/MenuHandler.d.ts +1 -1
- package/es/components/menu/dom/MenuHandler.js +5 -5
- package/es/components/menu/dom/MenuHandler.js.map +1 -1
- package/es/components/menu/dom/logic/MenuContainer.d.ts +1 -1
- package/es/components/menu/dom/logic/MenuContainer.js +2 -2
- package/es/components/menu/dom/logic/MenuContainer.js.map +1 -1
- package/es/components/menu/dom/logic/MenuElement.d.ts +1 -1
- package/es/components/menu/dom/logic/MenuElement.js +2 -2
- package/es/components/menu/dom/logic/MenuElement.js.map +1 -1
- package/es/components/title/title.d.ts +1 -1
- package/es/components/title/title.js +1 -1
- package/es/components/title/title.js.map +1 -1
- package/es/components/tooltip/BaseTooltip.d.ts +1 -1
- package/es/components/tooltip/BaseTooltip.js +2 -2
- package/es/components/tooltip/BaseTooltip.js.map +1 -1
- package/es/components/tooltip/TooltipHandler.d.ts +1 -1
- package/es/components/tooltip/TooltipHandler.js +7 -7
- package/es/components/tooltip/TooltipHandler.js.map +1 -1
- package/es/components/tooltip/logic/BubbleTooltipElement.d.ts +1 -1
- package/es/components/tooltip/logic/BubbleTooltipElement.js +2 -2
- package/es/components/tooltip/logic/BubbleTooltipElement.js.map +1 -1
- package/es/core/BaseTable.d.ts +8 -7
- package/es/core/BaseTable.js +36 -64
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/FouseInput.d.ts +1 -1
- package/es/core/FouseInput.js +1 -1
- package/es/core/FouseInput.js.map +1 -1
- package/es/core/tableHelper.js +3 -3
- package/es/core/tableHelper.js.map +1 -1
- package/es/data/CachedDataSource.d.ts +1 -1
- package/es/data/CachedDataSource.js +2 -2
- package/es/data/CachedDataSource.js.map +1 -1
- package/es/data/DataSource.d.ts +1 -1
- package/es/data/DataSource.js +2 -2
- package/es/data/DataSource.js.map +1 -1
- package/es/data/FilterDataSource.js.map +1 -1
- package/es/event/EventHandler.d.ts +1 -1
- package/es/event/EventHandler.js +1 -1
- package/es/event/EventHandler.js.map +1 -1
- package/es/event/EventTarget.d.ts +3 -3
- package/es/event/EventTarget.js +5 -5
- package/es/event/EventTarget.js.map +1 -1
- package/es/event/drill.js +1 -1
- package/es/event/drill.js.map +1 -1
- package/es/event/event.d.ts +1 -1
- package/es/event/event.js +12 -6
- package/es/event/event.js.map +1 -1
- package/es/event/listener/table-group.js +3 -1
- package/es/event/listener/table-group.js.map +1 -1
- package/es/event/media-click.js +1 -1
- package/es/event/media-click.js.map +1 -1
- package/es/event/pivot-chart/axis-hover.js +2 -2
- package/es/event/pivot-chart/axis-hover.js.map +1 -1
- package/es/event/sparkline-event.js +2 -2
- package/es/event/sparkline-event.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/chart-helper/get-axis-config.d.ts +1 -0
- package/es/layout/chart-helper/get-axis-config.js +53 -38
- package/es/layout/chart-helper/get-axis-config.js.map +1 -1
- package/es/layout/chart-helper/get-chart-spec.js +19 -13
- package/es/layout/chart-helper/get-chart-spec.js.map +1 -1
- package/es/layout/pivot-header-layout.d.ts +4 -0
- package/es/layout/pivot-header-layout.js +16 -0
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/pivot-layout.d.ts +4 -0
- package/es/layout/pivot-layout.js +16 -0
- package/es/layout/pivot-layout.js.map +1 -1
- package/es/layout/simple-header-layout.d.ts +4 -0
- package/es/layout/simple-header-layout.js +16 -0
- package/es/layout/simple-header-layout.js.map +1 -1
- package/es/scenegraph/component/menu.d.ts +1 -1
- package/es/scenegraph/component/menu.js +1 -1
- package/es/scenegraph/component/menu.js.map +1 -1
- package/es/scenegraph/graphic/icon.d.ts +2 -2
- package/es/scenegraph/graphic/icon.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/image-cell.js +4 -4
- package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/es/scenegraph/group-creater/progress/proxy.js +4 -2
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +4 -4
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/es/scenegraph/layout/compute-col-width.js +26 -3
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/scenegraph.js +1 -1
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/utils/text-icon-layout.js +1 -1
- package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/es/state/state.js +5 -2
- package/es/state/state.js.map +1 -1
- package/es/ts-types/base-table.d.ts +12 -11
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/component/axis.d.ts +1 -1
- package/es/ts-types/component/axis.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/list-table/layout-map/api.d.ts +1 -0
- package/es/ts-types/list-table/layout-map/api.js.map +1 -1
- package/package.json +2 -2
package/dist/vtable.js
CHANGED
|
@@ -350,7 +350,7 @@
|
|
|
350
350
|
listeners: {},
|
|
351
351
|
listenerData: {}
|
|
352
352
|
};
|
|
353
|
-
|
|
353
|
+
on(type, listener) {
|
|
354
354
|
const list = this.listenersData.listeners[type] || (this.listenersData.listeners[type] = []);
|
|
355
355
|
list.push(listener);
|
|
356
356
|
const id = idCount$1++;
|
|
@@ -368,14 +368,14 @@
|
|
|
368
368
|
};
|
|
369
369
|
return id;
|
|
370
370
|
}
|
|
371
|
-
|
|
371
|
+
off(id) {
|
|
372
372
|
if (!this.listenersData) {
|
|
373
373
|
return;
|
|
374
374
|
}
|
|
375
375
|
this.listenersData.listenerData[id].remove();
|
|
376
376
|
}
|
|
377
377
|
addEventListener(type, listener, option) {
|
|
378
|
-
this.
|
|
378
|
+
this.on(type, listener);
|
|
379
379
|
}
|
|
380
380
|
removeEventListener(type, listener) {
|
|
381
381
|
if (!this.listenersData) {
|
|
@@ -384,7 +384,7 @@
|
|
|
384
384
|
for (const key in this.listenersData.listenerData) {
|
|
385
385
|
const listenerData = this.listenersData.listenerData[key];
|
|
386
386
|
if (listenerData.type === type && listenerData.listener === listener) {
|
|
387
|
-
this.
|
|
387
|
+
this.off(key);
|
|
388
388
|
}
|
|
389
389
|
}
|
|
390
390
|
}
|
|
@@ -404,7 +404,7 @@
|
|
|
404
404
|
}
|
|
405
405
|
return list.map(listener => listener.call(this, event)).filter(r => isValid$1(r));
|
|
406
406
|
}
|
|
407
|
-
|
|
407
|
+
release() {
|
|
408
408
|
delete this.listenersData;
|
|
409
409
|
}
|
|
410
410
|
};
|
|
@@ -1644,7 +1644,7 @@
|
|
|
1644
1644
|
}
|
|
1645
1645
|
this.listeners = {};
|
|
1646
1646
|
}
|
|
1647
|
-
|
|
1647
|
+
release() {
|
|
1648
1648
|
if (Env.mode === 'node') {
|
|
1649
1649
|
return;
|
|
1650
1650
|
}
|
|
@@ -36282,6 +36282,10 @@
|
|
|
36282
36282
|
setExtraAttrFromSpec(nice, zero, range, expand) {
|
|
36283
36283
|
this.nice = nice;
|
|
36284
36284
|
this.zero = zero;
|
|
36285
|
+
if (this.zero) {
|
|
36286
|
+
range.min = Math.min(range.min, 0);
|
|
36287
|
+
range.max = Math.max(range.max, 0);
|
|
36288
|
+
}
|
|
36285
36289
|
this.domain = range;
|
|
36286
36290
|
this.expand = expand;
|
|
36287
36291
|
}
|
|
@@ -36531,7 +36535,7 @@
|
|
|
36531
36535
|
this.type = option.type ?? 'band';
|
|
36532
36536
|
this.inverse = 'inverse' in option ? !!option.inverse : false;
|
|
36533
36537
|
if (option.type === 'band') {
|
|
36534
|
-
this.data = option.
|
|
36538
|
+
this.data = option.domain;
|
|
36535
36539
|
}
|
|
36536
36540
|
this.initScale();
|
|
36537
36541
|
this.initData();
|
|
@@ -36655,15 +36659,16 @@
|
|
|
36655
36659
|
}
|
|
36656
36660
|
updateScaleRange() {
|
|
36657
36661
|
const { width, height } = this.getLayoutRect();
|
|
36662
|
+
const inverse = this.option.inverse || false;
|
|
36658
36663
|
let newRange = [0, 0];
|
|
36659
36664
|
if (isXAxis(this.orient)) {
|
|
36660
36665
|
if (isValidNumber(width)) {
|
|
36661
|
-
newRange = [0, width];
|
|
36666
|
+
newRange = inverse ? [width, 0] : [0, width];
|
|
36662
36667
|
}
|
|
36663
36668
|
}
|
|
36664
36669
|
else {
|
|
36665
36670
|
if (isValidNumber(height)) {
|
|
36666
|
-
newRange = [height, 0];
|
|
36671
|
+
newRange = inverse ? [0, height] : [height, 0];
|
|
36667
36672
|
}
|
|
36668
36673
|
}
|
|
36669
36674
|
this.scale.updateRange(newRange);
|
|
@@ -37132,8 +37137,8 @@
|
|
|
37132
37137
|
}
|
|
37133
37138
|
return [];
|
|
37134
37139
|
}
|
|
37135
|
-
|
|
37136
|
-
super.
|
|
37140
|
+
release() {
|
|
37141
|
+
super.release?.();
|
|
37137
37142
|
}
|
|
37138
37143
|
clearSortedMap() {
|
|
37139
37144
|
this.currentIndexedData && (this.currentIndexedData.length = 0);
|
|
@@ -37240,8 +37245,8 @@
|
|
|
37240
37245
|
recordPromiseCallBack(index, record) {
|
|
37241
37246
|
this._recordCache[index] = record;
|
|
37242
37247
|
}
|
|
37243
|
-
|
|
37244
|
-
super.
|
|
37248
|
+
release() {
|
|
37249
|
+
super.release?.();
|
|
37245
37250
|
}
|
|
37246
37251
|
}
|
|
37247
37252
|
|
|
@@ -37708,7 +37713,7 @@
|
|
|
37708
37713
|
if (table.dataSource.enableHierarchyState) {
|
|
37709
37714
|
table.refreshRowColCount();
|
|
37710
37715
|
}
|
|
37711
|
-
table.
|
|
37716
|
+
table.render();
|
|
37712
37717
|
})
|
|
37713
37718
|
];
|
|
37714
37719
|
}
|
|
@@ -37717,7 +37722,7 @@
|
|
|
37717
37722
|
const data = records;
|
|
37718
37723
|
table.internalProps.records = records;
|
|
37719
37724
|
const newDataSource = (table.internalProps.dataSource = CachedDataSource.ofArray(data, table.pagerConf, table.options.hierarchyExpandLevel ?? (table.hasHierarchyTreeHeader?.() ? 1 : undefined)));
|
|
37720
|
-
table.
|
|
37725
|
+
table.addReleaseObj(newDataSource);
|
|
37721
37726
|
});
|
|
37722
37727
|
}
|
|
37723
37728
|
function _setDataSource(table, dataSource) {
|
|
@@ -37728,7 +37733,7 @@
|
|
|
37728
37733
|
}
|
|
37729
37734
|
else {
|
|
37730
37735
|
const newDataSource = (table.internalProps.dataSource = new CachedDataSource(dataSource));
|
|
37731
|
-
table.
|
|
37736
|
+
table.addReleaseObj(newDataSource);
|
|
37732
37737
|
}
|
|
37733
37738
|
}
|
|
37734
37739
|
else {
|
|
@@ -37798,9 +37803,6 @@
|
|
|
37798
37803
|
}
|
|
37799
37804
|
return orgWidth;
|
|
37800
37805
|
}
|
|
37801
|
-
function isAutoDefine(width) {
|
|
37802
|
-
return Boolean(width && typeof width === 'string' && width.toLowerCase() === 'auto');
|
|
37803
|
-
}
|
|
37804
37806
|
function _getScrollableVisibleRect(table) {
|
|
37805
37807
|
let frozenColsWidth = 0;
|
|
37806
37808
|
if (table.internalProps.frozenColCount > 0) {
|
|
@@ -38247,7 +38249,7 @@
|
|
|
38247
38249
|
return undefined;
|
|
38248
38250
|
}
|
|
38249
38251
|
|
|
38250
|
-
|
|
38252
|
+
get$1();
|
|
38251
38253
|
function createImageCellGroup(columnGroup, xOrigin, yOrigin, col, row, width, height, keepAspectRatio, imageAutoSizing, padding, textAlign, textBaseline, table, cellTheme) {
|
|
38252
38254
|
const headerStyle = table._getCellStyle(col, row);
|
|
38253
38255
|
const functionalPadding = getFunctionalProp('padding', headerStyle, col, row, table);
|
|
@@ -38284,7 +38286,7 @@
|
|
|
38284
38286
|
y: padding[0],
|
|
38285
38287
|
width: width - padding[1] - padding[3],
|
|
38286
38288
|
height: height - padding[0] - padding[2],
|
|
38287
|
-
image: value
|
|
38289
|
+
image: value,
|
|
38288
38290
|
cursor: 'pointer'
|
|
38289
38291
|
});
|
|
38290
38292
|
image.name = 'image';
|
|
@@ -38347,7 +38349,7 @@
|
|
|
38347
38349
|
function updateImageCellContentWhileResize(cellGroup, col, row, table) {
|
|
38348
38350
|
const image = cellGroup.getChildByName('image');
|
|
38349
38351
|
const originImage = (typeof image.attribute.image !== 'string' && image.attribute.image) ||
|
|
38350
|
-
image.resources
|
|
38352
|
+
image.resources?.get(image.attribute.image).data;
|
|
38351
38353
|
if (!originImage) {
|
|
38352
38354
|
return;
|
|
38353
38355
|
}
|
|
@@ -39787,6 +39789,7 @@
|
|
|
39787
39789
|
iconAttribute.height = icon.height;
|
|
39788
39790
|
iconAttribute.visibleTime = icon.visibleTime ?? 'always';
|
|
39789
39791
|
iconAttribute.funcType = icon.funcType;
|
|
39792
|
+
iconAttribute.interactive = icon.interactive;
|
|
39790
39793
|
let hierarchyOffset = 0;
|
|
39791
39794
|
if (isNumber(col) &&
|
|
39792
39795
|
isNumber(row) &&
|
|
@@ -40692,7 +40695,7 @@
|
|
|
40692
40695
|
componentGroup.appendChild(this._menuInstance);
|
|
40693
40696
|
this.bindEvent();
|
|
40694
40697
|
}
|
|
40695
|
-
|
|
40698
|
+
release() {
|
|
40696
40699
|
}
|
|
40697
40700
|
attach(x, y, col, row, type, menuInfo) {
|
|
40698
40701
|
if (type === MenuType.dropDown && this.checkDropDownMenuChange(col, row)) {
|
|
@@ -42415,6 +42418,312 @@
|
|
|
42415
42418
|
bind(GroupRenderContribution).toService(AdjustColorGroupAfterRenderContribution);
|
|
42416
42419
|
});
|
|
42417
42420
|
|
|
42421
|
+
function getAxisConfigInPivotChart(col, row, layout) {
|
|
42422
|
+
if (!layout._table.isPivotChart()) {
|
|
42423
|
+
return undefined;
|
|
42424
|
+
}
|
|
42425
|
+
if (layout.indicatorsAsCol) {
|
|
42426
|
+
if (layout.hasTwoIndicatorAxes &&
|
|
42427
|
+
row === layout.columnHeaderLevelCount - 1 &&
|
|
42428
|
+
col >= layout.rowHeaderLevelCount &&
|
|
42429
|
+
col < layout.colCount - layout.rightFrozenColCount) {
|
|
42430
|
+
const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, layout.columnHeaderLevelCount - 1);
|
|
42431
|
+
let defaultKey = indicatorKeys[1];
|
|
42432
|
+
if (isArray$3(defaultKey)) {
|
|
42433
|
+
defaultKey = defaultKey[0];
|
|
42434
|
+
}
|
|
42435
|
+
if (!defaultKey) {
|
|
42436
|
+
return undefined;
|
|
42437
|
+
}
|
|
42438
|
+
const isZeroAlign = checkZeroAlign(col, row, 'top', layout);
|
|
42439
|
+
const data = layout.dataset.collectedValues[defaultKey + (isZeroAlign ? '_align' : '')]
|
|
42440
|
+
? layout.dataset.collectedValues[defaultKey + (isZeroAlign ? '_align' : '')]
|
|
42441
|
+
: layout.dataset.collectedValues[defaultKey];
|
|
42442
|
+
const index = layout.getRecordIndexByCol(col);
|
|
42443
|
+
const range = data[layout.getColKeysPath()[index][Math.max(0, layout.columnHeaderLevelCount - 1 - layout.topAxesCount)]];
|
|
42444
|
+
const axisOption = getAxisOption(col, row, 'top', layout);
|
|
42445
|
+
if (axisOption?.visible === false) {
|
|
42446
|
+
return;
|
|
42447
|
+
}
|
|
42448
|
+
return merge$2({
|
|
42449
|
+
range: range
|
|
42450
|
+
}, axisOption, {
|
|
42451
|
+
orient: 'top',
|
|
42452
|
+
type: 'linear',
|
|
42453
|
+
label: {
|
|
42454
|
+
flush: true
|
|
42455
|
+
}
|
|
42456
|
+
});
|
|
42457
|
+
}
|
|
42458
|
+
else if (row === layout.rowCount - layout.bottomFrozenRowCount &&
|
|
42459
|
+
col >= layout.rowHeaderLevelCount &&
|
|
42460
|
+
col < layout.colCount - layout.rightFrozenColCount) {
|
|
42461
|
+
const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, row);
|
|
42462
|
+
let defaultKey = indicatorKeys[0];
|
|
42463
|
+
if (isArray$3(defaultKey)) {
|
|
42464
|
+
defaultKey = defaultKey[0];
|
|
42465
|
+
}
|
|
42466
|
+
const isZeroAlign = checkZeroAlign(col, row, 'bottom', layout);
|
|
42467
|
+
const data = layout.dataset.collectedValues[defaultKey + (isZeroAlign ? '_align' : '')]
|
|
42468
|
+
? layout.dataset.collectedValues[defaultKey + (isZeroAlign ? '_align' : '')]
|
|
42469
|
+
: layout.dataset.collectedValues[defaultKey];
|
|
42470
|
+
const index = layout.getRecordIndexByCol(col);
|
|
42471
|
+
const range = data[layout.getColKeysPath()[index][Math.max(0, layout.columnHeaderLevelCount - 1 - layout.topAxesCount)]];
|
|
42472
|
+
let indicatorInfo = null;
|
|
42473
|
+
indicatorKeys.forEach(key => {
|
|
42474
|
+
const info = layout.getIndicatorInfo(key);
|
|
42475
|
+
if (info) {
|
|
42476
|
+
indicatorInfo = info;
|
|
42477
|
+
}
|
|
42478
|
+
});
|
|
42479
|
+
const axisOption = getAxisOption(col, row, 'bottom', layout);
|
|
42480
|
+
if (axisOption?.visible === false) {
|
|
42481
|
+
return;
|
|
42482
|
+
}
|
|
42483
|
+
return merge$2({
|
|
42484
|
+
title: {
|
|
42485
|
+
visible: true,
|
|
42486
|
+
text: indicatorInfo?.caption,
|
|
42487
|
+
autoRotate: true
|
|
42488
|
+
},
|
|
42489
|
+
range: range
|
|
42490
|
+
}, axisOption, {
|
|
42491
|
+
orient: 'bottom',
|
|
42492
|
+
type: 'linear',
|
|
42493
|
+
label: {
|
|
42494
|
+
flush: true
|
|
42495
|
+
}
|
|
42496
|
+
});
|
|
42497
|
+
}
|
|
42498
|
+
else if (col === layout.rowHeaderLevelCount - 1 &&
|
|
42499
|
+
row >= layout.columnHeaderLevelCount &&
|
|
42500
|
+
row < layout.rowCount - layout.bottomFrozenRowCount) {
|
|
42501
|
+
let rowDimensionKey = layout.getDimensionKeyInChartSpec(layout.rowHeaderLevelCount, row)[0];
|
|
42502
|
+
if (isArray$3(rowDimensionKey)) {
|
|
42503
|
+
rowDimensionKey = rowDimensionKey[0];
|
|
42504
|
+
}
|
|
42505
|
+
const data = layout.dataset.collectedValues[rowDimensionKey];
|
|
42506
|
+
const recordRow = layout.getRecordIndexByRow(row);
|
|
42507
|
+
const rowPath = layout.getRowKeysPath()[recordRow];
|
|
42508
|
+
const domain = data[rowPath[rowPath.length - 1]];
|
|
42509
|
+
const axisOption = getAxisOption(col, row, 'left', layout);
|
|
42510
|
+
if (axisOption?.visible === false) {
|
|
42511
|
+
return;
|
|
42512
|
+
}
|
|
42513
|
+
return merge$2({
|
|
42514
|
+
domain: Array.from(domain).reverse()
|
|
42515
|
+
}, axisOption, {
|
|
42516
|
+
orient: 'left',
|
|
42517
|
+
type: 'band'
|
|
42518
|
+
});
|
|
42519
|
+
}
|
|
42520
|
+
}
|
|
42521
|
+
else {
|
|
42522
|
+
if (col === layout.rowHeaderLevelCount - 1 &&
|
|
42523
|
+
row >= layout.columnHeaderLevelCount &&
|
|
42524
|
+
row < layout.rowCount - layout.bottomFrozenRowCount) {
|
|
42525
|
+
const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, row);
|
|
42526
|
+
let defaultKey = indicatorKeys[0];
|
|
42527
|
+
if (isArray$3(defaultKey)) {
|
|
42528
|
+
defaultKey = defaultKey[0];
|
|
42529
|
+
}
|
|
42530
|
+
const isZeroAlign = checkZeroAlign(col, row, 'left', layout);
|
|
42531
|
+
const data = layout.dataset.collectedValues[defaultKey + (isZeroAlign ? '_align' : '')]
|
|
42532
|
+
? layout.dataset.collectedValues[defaultKey + (isZeroAlign ? '_align' : '')]
|
|
42533
|
+
: layout.dataset.collectedValues[defaultKey];
|
|
42534
|
+
const index = layout.getRecordIndexByRow(row);
|
|
42535
|
+
const range = data[layout.getRowKeysPath()[index][Math.max(0, layout.rowHeaderLevelCount - 1 - layout.leftAxesCount)]];
|
|
42536
|
+
let indicatorInfo = null;
|
|
42537
|
+
indicatorKeys.forEach(key => {
|
|
42538
|
+
const info = layout.getIndicatorInfo(key);
|
|
42539
|
+
if (info) {
|
|
42540
|
+
indicatorInfo = info;
|
|
42541
|
+
}
|
|
42542
|
+
});
|
|
42543
|
+
const axisOption = getAxisOption(col, row, 'left', layout);
|
|
42544
|
+
if (axisOption?.visible === false) {
|
|
42545
|
+
return;
|
|
42546
|
+
}
|
|
42547
|
+
return merge$2({
|
|
42548
|
+
title: {
|
|
42549
|
+
visible: true,
|
|
42550
|
+
text: indicatorInfo?.caption,
|
|
42551
|
+
autoRotate: true
|
|
42552
|
+
},
|
|
42553
|
+
range: range
|
|
42554
|
+
}, axisOption, {
|
|
42555
|
+
orient: 'left',
|
|
42556
|
+
type: 'linear',
|
|
42557
|
+
label: {
|
|
42558
|
+
flush: true
|
|
42559
|
+
}
|
|
42560
|
+
});
|
|
42561
|
+
}
|
|
42562
|
+
else if (col === layout.colCount - layout.rightFrozenColCount &&
|
|
42563
|
+
row >= layout.columnHeaderLevelCount &&
|
|
42564
|
+
row < layout.rowCount - layout.bottomFrozenRowCount) {
|
|
42565
|
+
const indicatorKeys = layout.getIndicatorKeyInChartSpec(layout.rowHeaderLevelCount - 1, row);
|
|
42566
|
+
let defaultKey = indicatorKeys[1];
|
|
42567
|
+
if (isArray$3(defaultKey)) {
|
|
42568
|
+
defaultKey = defaultKey[0];
|
|
42569
|
+
}
|
|
42570
|
+
if (!defaultKey) {
|
|
42571
|
+
return undefined;
|
|
42572
|
+
}
|
|
42573
|
+
const isZeroAlign = checkZeroAlign(col, row, 'right', layout);
|
|
42574
|
+
const data = layout.dataset.collectedValues[defaultKey + (isZeroAlign ? '_align' : '')]
|
|
42575
|
+
? layout.dataset.collectedValues[defaultKey + (isZeroAlign ? '_align' : '')]
|
|
42576
|
+
: layout.dataset.collectedValues[defaultKey];
|
|
42577
|
+
const index = layout.getRecordIndexByRow(row);
|
|
42578
|
+
const range = data[layout.getRowKeysPath()[index][Math.max(0, layout.rowHeaderLevelCount - 1 - layout.leftAxesCount)]];
|
|
42579
|
+
const axisOption = getAxisOption(col, row, 'right', layout);
|
|
42580
|
+
if (axisOption?.visible === false) {
|
|
42581
|
+
return;
|
|
42582
|
+
}
|
|
42583
|
+
return merge$2({
|
|
42584
|
+
range: range
|
|
42585
|
+
}, axisOption, {
|
|
42586
|
+
orient: 'right',
|
|
42587
|
+
type: 'linear',
|
|
42588
|
+
label: {
|
|
42589
|
+
flush: true
|
|
42590
|
+
}
|
|
42591
|
+
});
|
|
42592
|
+
}
|
|
42593
|
+
else if (row === layout.rowCount - layout.bottomFrozenRowCount &&
|
|
42594
|
+
col >= layout.rowHeaderLevelCount &&
|
|
42595
|
+
col < layout.colCount - layout.rightFrozenColCount) {
|
|
42596
|
+
let columnDimensionKey = layout.getDimensionKeyInChartSpec(col, layout.columnHeaderLevelCount)[0];
|
|
42597
|
+
if (isArray$3(columnDimensionKey)) {
|
|
42598
|
+
columnDimensionKey = columnDimensionKey[0];
|
|
42599
|
+
}
|
|
42600
|
+
const data = layout.dataset.collectedValues[columnDimensionKey];
|
|
42601
|
+
const recordCol = layout.getRecordIndexByCol(col);
|
|
42602
|
+
const colPath = layout.getColKeysPath()[recordCol];
|
|
42603
|
+
const domain = data[colPath[colPath.length - 1]];
|
|
42604
|
+
const axisOption = getAxisOption(col, row, 'bottom', layout);
|
|
42605
|
+
if (axisOption?.visible === false) {
|
|
42606
|
+
return;
|
|
42607
|
+
}
|
|
42608
|
+
return merge$2({
|
|
42609
|
+
domain: Array.from(domain)
|
|
42610
|
+
}, axisOption, {
|
|
42611
|
+
orient: 'bottom',
|
|
42612
|
+
type: 'band'
|
|
42613
|
+
});
|
|
42614
|
+
}
|
|
42615
|
+
}
|
|
42616
|
+
return undefined;
|
|
42617
|
+
}
|
|
42618
|
+
function getAxisOption(col, row, orient, layout) {
|
|
42619
|
+
const spec = layout.getRawChartSpec(col, row);
|
|
42620
|
+
if (spec && isArray$3(spec.axes)) {
|
|
42621
|
+
const axisOption = spec.axes.find((axis) => {
|
|
42622
|
+
return axis.orient === orient;
|
|
42623
|
+
});
|
|
42624
|
+
if (axisOption) {
|
|
42625
|
+
return axisOption;
|
|
42626
|
+
}
|
|
42627
|
+
}
|
|
42628
|
+
const axisOption = layout._table.pivotChartAxes.find(axisOption => {
|
|
42629
|
+
return axisOption.orient === orient;
|
|
42630
|
+
});
|
|
42631
|
+
return axisOption;
|
|
42632
|
+
}
|
|
42633
|
+
function checkZeroAlign(col, row, orient, layout) {
|
|
42634
|
+
const orients = [];
|
|
42635
|
+
if (orient === 'left' || orient === 'right') {
|
|
42636
|
+
orients.push('left', 'right');
|
|
42637
|
+
}
|
|
42638
|
+
else if (orient === 'top' || orient === 'bottom') {
|
|
42639
|
+
orients.push('top', 'bottom');
|
|
42640
|
+
}
|
|
42641
|
+
const spec = layout.getRawChartSpec(col, row);
|
|
42642
|
+
let axesSpec;
|
|
42643
|
+
if (spec && isArray$3(spec.axes)) {
|
|
42644
|
+
axesSpec = spec.axes;
|
|
42645
|
+
}
|
|
42646
|
+
else {
|
|
42647
|
+
axesSpec = layout._table.pivotChartAxes;
|
|
42648
|
+
}
|
|
42649
|
+
if (isArray$3(axesSpec)) {
|
|
42650
|
+
const axes = [];
|
|
42651
|
+
axesSpec.forEach((axis) => {
|
|
42652
|
+
if (orients.includes(axis.orient)) {
|
|
42653
|
+
axes.push(axis);
|
|
42654
|
+
}
|
|
42655
|
+
});
|
|
42656
|
+
for (let i = 0; i < axes.length; i++) {
|
|
42657
|
+
const axis = axes[i];
|
|
42658
|
+
if (axis.sync &&
|
|
42659
|
+
axis.sync.zeroAlign &&
|
|
42660
|
+
axis.sync.axisId &&
|
|
42661
|
+
axes.find(axisSync => {
|
|
42662
|
+
return axisSync.id === axis.sync.axisId;
|
|
42663
|
+
})) {
|
|
42664
|
+
return true;
|
|
42665
|
+
}
|
|
42666
|
+
}
|
|
42667
|
+
}
|
|
42668
|
+
return false;
|
|
42669
|
+
}
|
|
42670
|
+
|
|
42671
|
+
function computeAxisConpomentWidth(config, table) {
|
|
42672
|
+
const attribute = merge$2({}, commonAxis, config);
|
|
42673
|
+
const tickWidth = attribute.tick.width ?? 4;
|
|
42674
|
+
let labelWidth = 0;
|
|
42675
|
+
if (attribute.label.visible) {
|
|
42676
|
+
if (attribute.type === 'band') {
|
|
42677
|
+
const domain = attribute.domain;
|
|
42678
|
+
domain.forEach((text) => {
|
|
42679
|
+
labelWidth = Math.max(labelWidth, table.measureText(text, {
|
|
42680
|
+
fontSize: attribute.label?.style?.fontSize,
|
|
42681
|
+
fontFamily: attribute.label?.style?.fontFamily
|
|
42682
|
+
}).width);
|
|
42683
|
+
});
|
|
42684
|
+
}
|
|
42685
|
+
else {
|
|
42686
|
+
const range = attribute.range;
|
|
42687
|
+
const minNumber = Math.abs(range.min) > 1 ? Math.round(range.min) : range.min;
|
|
42688
|
+
const maxNumber = Math.abs(range.max) > 1 ? Math.round(range.max) : range.max;
|
|
42689
|
+
const minString = formatDecimal(minNumber);
|
|
42690
|
+
const maxString = formatDecimal(maxNumber);
|
|
42691
|
+
[minString, maxString].forEach(text => {
|
|
42692
|
+
labelWidth = Math.max(labelWidth, table.measureText(text, {
|
|
42693
|
+
fontSize: attribute.label?.style?.fontSize,
|
|
42694
|
+
fontFamily: attribute.label?.style?.fontFamily
|
|
42695
|
+
}).width + 2);
|
|
42696
|
+
});
|
|
42697
|
+
}
|
|
42698
|
+
labelWidth += attribute.label.space ?? 4;
|
|
42699
|
+
}
|
|
42700
|
+
let titleWidth = 0;
|
|
42701
|
+
if (attribute.title.visible && attribute.title.text) {
|
|
42702
|
+
if (attribute.title.autoRotate) {
|
|
42703
|
+
titleWidth =
|
|
42704
|
+
table.measureText(attribute.title.text, {
|
|
42705
|
+
fontSize: attribute.title?.style?.fontSize,
|
|
42706
|
+
fontFamily: attribute.title?.style?.fontFamily
|
|
42707
|
+
}).height + 2;
|
|
42708
|
+
}
|
|
42709
|
+
else {
|
|
42710
|
+
titleWidth =
|
|
42711
|
+
table.measureText(attribute.title.text, {
|
|
42712
|
+
fontSize: attribute.title?.style?.fontSize,
|
|
42713
|
+
fontFamily: attribute.title?.style?.fontFamily
|
|
42714
|
+
}).width + 2;
|
|
42715
|
+
}
|
|
42716
|
+
titleWidth += attribute.title.space ?? 4;
|
|
42717
|
+
}
|
|
42718
|
+
return tickWidth + labelWidth + titleWidth;
|
|
42719
|
+
}
|
|
42720
|
+
function formatDecimal(number) {
|
|
42721
|
+
if (typeof number !== 'number') {
|
|
42722
|
+
number = Number(number);
|
|
42723
|
+
}
|
|
42724
|
+
return Number(number.toPrecision(1)).toString();
|
|
42725
|
+
}
|
|
42726
|
+
|
|
42418
42727
|
function computeColsWidth(table, colStart, colEnd, update) {
|
|
42419
42728
|
colStart = colStart ?? 0;
|
|
42420
42729
|
colEnd = colEnd ?? table.colCount - 1;
|
|
@@ -42501,13 +42810,19 @@
|
|
|
42501
42810
|
}
|
|
42502
42811
|
function computeColWidth(col, startRow, endRow, table, forceCompute) {
|
|
42503
42812
|
const { layoutMap, transpose } = table.internalProps;
|
|
42504
|
-
|
|
42813
|
+
let { width } = layoutMap?.getColumnWidthDefined(col) ?? {};
|
|
42505
42814
|
if (transpose) {
|
|
42506
42815
|
if (table.widthMode === 'standard') {
|
|
42507
42816
|
if (table.isRowHeader(col, 0) || table.isCornerHeader(col, 0)) {
|
|
42508
|
-
|
|
42817
|
+
const defaultWidth = Array.isArray(table.defaultHeaderColWidth)
|
|
42509
42818
|
? table.defaultHeaderColWidth[col] ?? table.defaultColWidth
|
|
42510
42819
|
: table.defaultHeaderColWidth;
|
|
42820
|
+
if (defaultWidth === 'auto') {
|
|
42821
|
+
width = 'auto';
|
|
42822
|
+
}
|
|
42823
|
+
else {
|
|
42824
|
+
return defaultWidth;
|
|
42825
|
+
}
|
|
42511
42826
|
}
|
|
42512
42827
|
if (width !== 'auto') {
|
|
42513
42828
|
if (typeof width === 'string') {
|
|
@@ -42538,7 +42853,10 @@
|
|
|
42538
42853
|
else if (width) {
|
|
42539
42854
|
return width;
|
|
42540
42855
|
}
|
|
42541
|
-
|
|
42856
|
+
const defaultWidth = table.getColWidthDefine(col);
|
|
42857
|
+
if (defaultWidth !== 'auto') {
|
|
42858
|
+
return table.getColWidth(col);
|
|
42859
|
+
}
|
|
42542
42860
|
}
|
|
42543
42861
|
return computeAutoColWidth(width, col, startRow, endRow, forceCompute, table);
|
|
42544
42862
|
}
|
|
@@ -42560,6 +42878,22 @@
|
|
|
42560
42878
|
}
|
|
42561
42879
|
}
|
|
42562
42880
|
for (let row = startRow; row <= endRow; row += deltaRow) {
|
|
42881
|
+
if (table.isPivotChart()) {
|
|
42882
|
+
const layout = table.internalProps.layoutMap;
|
|
42883
|
+
const axisConfig = getAxisConfigInPivotChart(col, row, layout);
|
|
42884
|
+
if (axisConfig) {
|
|
42885
|
+
const axisWidth = computeAxisConpomentWidth(axisConfig, table);
|
|
42886
|
+
if (typeof axisWidth === 'number') {
|
|
42887
|
+
maxWidth = Math.max(axisWidth, maxWidth);
|
|
42888
|
+
continue;
|
|
42889
|
+
}
|
|
42890
|
+
}
|
|
42891
|
+
else if (layout.isLeftBottomCorner(col, row) ||
|
|
42892
|
+
layout.isRightTopCorner(col, row) ||
|
|
42893
|
+
layout.isRightBottomCorner(col, row)) {
|
|
42894
|
+
continue;
|
|
42895
|
+
}
|
|
42896
|
+
}
|
|
42563
42897
|
const customWidth = computeCustomRenderWidth(col, row, table);
|
|
42564
42898
|
if (typeof customWidth === 'number') {
|
|
42565
42899
|
maxWidth = Math.max(customWidth, maxWidth);
|
|
@@ -43827,7 +44161,7 @@
|
|
|
43827
44161
|
}
|
|
43828
44162
|
proxy.rowStart = direction === 'up' ? proxy.rowStart + count : proxy.rowStart - count;
|
|
43829
44163
|
proxy.rowEnd = direction === 'up' ? proxy.rowEnd + count : proxy.rowEnd - count;
|
|
43830
|
-
checkFirstRowMerge(
|
|
44164
|
+
checkFirstRowMerge(syncTopRow, proxy);
|
|
43831
44165
|
updateRowContent(syncTopRow, syncBottomRow, proxy);
|
|
43832
44166
|
if (proxy.table.heightMode === 'autoHeight') {
|
|
43833
44167
|
updateAutoRow(proxy.bodyLeftCol, proxy.bodyRightCol, syncTopRow, syncBottomRow, proxy.table, direction);
|
|
@@ -43863,7 +44197,7 @@
|
|
|
43863
44197
|
}
|
|
43864
44198
|
proxy.rowStart = distStartRow;
|
|
43865
44199
|
proxy.rowEnd = distEndRow;
|
|
43866
|
-
checkFirstRowMerge(
|
|
44200
|
+
checkFirstRowMerge(syncTopRow, proxy);
|
|
43867
44201
|
updateRowContent(syncTopRow, syncBottomRow, proxy);
|
|
43868
44202
|
console.log('updateAutoRow', distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up');
|
|
43869
44203
|
if (proxy.table.heightMode === 'autoHeight') {
|
|
@@ -43905,12 +44239,12 @@
|
|
|
43905
44239
|
function updateCellGroupPosition(colGroup, direction, proxy) {
|
|
43906
44240
|
if (direction === 'up') {
|
|
43907
44241
|
const cellGroup = colGroup.firstChild;
|
|
43908
|
-
proxy.updateCellGroupPosition(cellGroup, colGroup.lastChild.row + 1, colGroup.lastChild.attribute.y + colGroup.lastChild.
|
|
44242
|
+
proxy.updateCellGroupPosition(cellGroup, colGroup.lastChild.row + 1, colGroup.lastChild.attribute.y + proxy.table.getRowHeight(colGroup.lastChild.row));
|
|
43909
44243
|
colGroup.appendChild(cellGroup);
|
|
43910
44244
|
}
|
|
43911
44245
|
else {
|
|
43912
44246
|
const cellGroup = colGroup.lastChild;
|
|
43913
|
-
proxy.updateCellGroupPosition(cellGroup, colGroup.firstChild.row - 1, colGroup.firstChild.attribute.y - cellGroup.
|
|
44247
|
+
proxy.updateCellGroupPosition(cellGroup, colGroup.firstChild.row - 1, colGroup.firstChild.attribute.y - proxy.table.getRowHeight(cellGroup.row));
|
|
43914
44248
|
colGroup.insertBefore(cellGroup, colGroup.firstChild);
|
|
43915
44249
|
}
|
|
43916
44250
|
}
|
|
@@ -44338,11 +44672,15 @@
|
|
|
44338
44672
|
return cellGroup;
|
|
44339
44673
|
}
|
|
44340
44674
|
const cellGroup = this.table.scenegraph.getCell(col, row, getShadow);
|
|
44341
|
-
cellGroup.
|
|
44675
|
+
if (cellGroup.col === col && cellGroup.row) {
|
|
44676
|
+
this.cellCache.set(col, cellGroup);
|
|
44677
|
+
}
|
|
44342
44678
|
return cellGroup;
|
|
44343
44679
|
}
|
|
44344
44680
|
const cellGroup = this.table.scenegraph.getCell(col, row, getShadow);
|
|
44345
|
-
cellGroup.
|
|
44681
|
+
if (cellGroup.col === col && cellGroup.row) {
|
|
44682
|
+
this.cellCache.set(col, cellGroup);
|
|
44683
|
+
}
|
|
44346
44684
|
return cellGroup;
|
|
44347
44685
|
}
|
|
44348
44686
|
}
|
|
@@ -45501,7 +45839,10 @@
|
|
|
45501
45839
|
}
|
|
45502
45840
|
if (cell && cell.role === 'shadow-cell' && !getShadow) {
|
|
45503
45841
|
const range = this.table.getCellRange(col, row);
|
|
45504
|
-
|
|
45842
|
+
if (range.start.col === col && range.start.row === row) ;
|
|
45843
|
+
else {
|
|
45844
|
+
cell = this.getCell(range.start.col, range.start.row);
|
|
45845
|
+
}
|
|
45505
45846
|
}
|
|
45506
45847
|
return cell || emptyGroup;
|
|
45507
45848
|
}
|
|
@@ -47255,10 +47596,17 @@
|
|
|
47255
47596
|
}
|
|
47256
47597
|
}
|
|
47257
47598
|
detaX = Math.ceil(detaX);
|
|
47258
|
-
this.table.scenegraph.updateColWidth(this.columnResize.col, detaX);
|
|
47259
47599
|
if (this.table.widthMode === 'adaptive' && this.columnResize.col < this.table.colCount - 1) {
|
|
47600
|
+
const rightColWidth = this.table.getColWidth(this.columnResize.col + 1);
|
|
47601
|
+
if (rightColWidth - detaX < 0) {
|
|
47602
|
+
detaX = rightColWidth;
|
|
47603
|
+
}
|
|
47604
|
+
this.table.scenegraph.updateColWidth(this.columnResize.col, detaX);
|
|
47260
47605
|
this.table.scenegraph.updateColWidth(this.columnResize.col + 1, -detaX);
|
|
47261
47606
|
}
|
|
47607
|
+
else {
|
|
47608
|
+
this.table.scenegraph.updateColWidth(this.columnResize.col, detaX);
|
|
47609
|
+
}
|
|
47262
47610
|
this.columnResize.x = xInTable;
|
|
47263
47611
|
this.table.scenegraph.component.updateResizeCol(this.columnResize.col, yInTable);
|
|
47264
47612
|
if (this.columnResize.col < this.table.frozenColCount &&
|
|
@@ -47592,7 +47940,7 @@
|
|
|
47592
47940
|
|
|
47593
47941
|
function bindMediaClick(table) {
|
|
47594
47942
|
if (Env.mode === 'browser') {
|
|
47595
|
-
table.
|
|
47943
|
+
table.on(TABLE_EVENT_TYPE.CLICK_CELL, (e) => {
|
|
47596
47944
|
const { col, row } = e;
|
|
47597
47945
|
let type;
|
|
47598
47946
|
if (table.internalProps.layoutMap.isHeader(col, row)) {
|
|
@@ -47695,7 +48043,7 @@
|
|
|
47695
48043
|
}
|
|
47696
48044
|
|
|
47697
48045
|
function bindDrillEvent(table) {
|
|
47698
|
-
table.
|
|
48046
|
+
table.on(TABLE_EVENT_TYPE.MOUSEENTER_CELL, (e) => {
|
|
47699
48047
|
const { col, row } = e;
|
|
47700
48048
|
if (col === -1 || row === -1) {
|
|
47701
48049
|
return;
|
|
@@ -47730,7 +48078,7 @@
|
|
|
47730
48078
|
if (!hasSparkLine) {
|
|
47731
48079
|
return;
|
|
47732
48080
|
}
|
|
47733
|
-
table.
|
|
48081
|
+
table.on(TABLE_EVENT_TYPE.MOUSEMOVE_CELL, (e) => {
|
|
47734
48082
|
const { col, row, x, y } = e;
|
|
47735
48083
|
const type = table.getBodyColumnType(col, row);
|
|
47736
48084
|
if (type !== 'sparkline') {
|
|
@@ -47738,7 +48086,7 @@
|
|
|
47738
48086
|
}
|
|
47739
48087
|
table.stateManeger.updateSparklineHoverPose(col, row, x, y);
|
|
47740
48088
|
});
|
|
47741
|
-
table.
|
|
48089
|
+
table.on(TABLE_EVENT_TYPE.MOUSELEAVE_TABLE, (e) => {
|
|
47742
48090
|
table.stateManeger.updateSparklineHoverPose(-1, -1, 0, 0);
|
|
47743
48091
|
});
|
|
47744
48092
|
}
|
|
@@ -47961,7 +48309,7 @@
|
|
|
47961
48309
|
const hitIcon = eventArgsSet?.eventArgs?.target?.role?.startsWith('icon')
|
|
47962
48310
|
? eventArgsSet.eventArgs.target
|
|
47963
48311
|
: undefined;
|
|
47964
|
-
if (!hitIcon) {
|
|
48312
|
+
if (!hitIcon || hitIcon.attribute.interactive === false) {
|
|
47965
48313
|
if (e.pointerType === 'touch') {
|
|
47966
48314
|
eventManeger.touchEnd = false;
|
|
47967
48315
|
eventManeger.touchSetTimeout = setTimeout(() => {
|
|
@@ -48167,6 +48515,7 @@
|
|
|
48167
48515
|
const cellsEvent = {
|
|
48168
48516
|
...cellInfo,
|
|
48169
48517
|
event: e.nativeEvent,
|
|
48518
|
+
federatedEvent: e,
|
|
48170
48519
|
cells: [],
|
|
48171
48520
|
targetIcon: icon
|
|
48172
48521
|
? {
|
|
@@ -48540,7 +48889,7 @@
|
|
|
48540
48889
|
if (!table.isPivotChart()) {
|
|
48541
48890
|
return;
|
|
48542
48891
|
}
|
|
48543
|
-
table.
|
|
48892
|
+
table.on(TABLE_EVENT_TYPE.MOUSEENTER_CELL, e => {
|
|
48544
48893
|
const cellGroup = table.scenegraph.getCell(e.col, e.row);
|
|
48545
48894
|
cellGroup.forEachChildren(child => {
|
|
48546
48895
|
if (child.name === 'axis') {
|
|
@@ -48550,7 +48899,7 @@
|
|
|
48550
48899
|
}
|
|
48551
48900
|
});
|
|
48552
48901
|
});
|
|
48553
|
-
table.
|
|
48902
|
+
table.on(TABLE_EVENT_TYPE.MOUSELEAVE_CELL, e => {
|
|
48554
48903
|
const cellGroup = table.scenegraph.getCell(e.col, e.row);
|
|
48555
48904
|
cellGroup.forEachChildren(child => {
|
|
48556
48905
|
if (child.name === 'axis') {
|
|
@@ -48622,7 +48971,7 @@
|
|
|
48622
48971
|
}
|
|
48623
48972
|
bindSelfEvent() {
|
|
48624
48973
|
const stateManeger = this.table.stateManeger;
|
|
48625
|
-
this.table.
|
|
48974
|
+
this.table.on(TABLE_EVENT_TYPE.ICON_CLICK, iconInfo => {
|
|
48626
48975
|
const { col, row, x, y, funcType, icon } = iconInfo;
|
|
48627
48976
|
if (funcType === IconFuncTypeEnum.dropDown) {
|
|
48628
48977
|
stateManeger.triggerDropDownMenu(col, row, x, y);
|
|
@@ -48640,18 +48989,22 @@
|
|
|
48640
48989
|
this.table.toggleHierarchyState(col, row);
|
|
48641
48990
|
}
|
|
48642
48991
|
});
|
|
48643
|
-
this.table.
|
|
48992
|
+
this.table.on(TABLE_EVENT_TYPE.DROPDOWNMENU_CLICK, () => {
|
|
48644
48993
|
stateManeger.hideMenu();
|
|
48645
48994
|
});
|
|
48646
48995
|
if (checkHaveTextStick(this.table)) {
|
|
48647
|
-
this.table.
|
|
48996
|
+
this.table.on(TABLE_EVENT_TYPE.SCROLL, e => {
|
|
48648
48997
|
handleTextStick(this.table);
|
|
48649
48998
|
});
|
|
48650
48999
|
}
|
|
48651
49000
|
bindMediaClick(this.table);
|
|
48652
|
-
this.table.
|
|
48653
|
-
if (
|
|
48654
|
-
|
|
49001
|
+
this.table.on(TABLE_EVENT_TYPE.DBLCLICK_CELL, (e) => {
|
|
49002
|
+
if (e.federatedEvent) {
|
|
49003
|
+
const eventArgsSet = getCellEventArgsSet(e.federatedEvent);
|
|
49004
|
+
const resizeCol = this.table.scenegraph.getResizeColAt(eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y, eventArgsSet.eventArgs?.targetCell);
|
|
49005
|
+
if (this.table._canResizeColumn(resizeCol.col, resizeCol.row) && resizeCol.col >= 0) {
|
|
49006
|
+
this.table.scenegraph.updateAutoColWidth(resizeCol.col);
|
|
49007
|
+
}
|
|
48655
49008
|
}
|
|
48656
49009
|
});
|
|
48657
49010
|
if (this.table.isPivotTable()) {
|
|
@@ -48724,7 +49077,7 @@
|
|
|
48724
49077
|
return false;
|
|
48725
49078
|
}
|
|
48726
49079
|
dealColumnResize(xInTable, yInTable) {
|
|
48727
|
-
this.table.stateManeger.updateResizeCol(xInTable,
|
|
49080
|
+
this.table.stateManeger.updateResizeCol(xInTable, yInTable);
|
|
48728
49081
|
}
|
|
48729
49082
|
chechColumnMover(eventArgsSet) {
|
|
48730
49083
|
const { eventArgs } = eventArgsSet;
|
|
@@ -49412,13 +49765,13 @@
|
|
|
49412
49765
|
get rootElement() {
|
|
49413
49766
|
return this._rootElement;
|
|
49414
49767
|
}
|
|
49415
|
-
|
|
49768
|
+
release() {
|
|
49416
49769
|
this.unbindFromCell();
|
|
49417
49770
|
const rootElement = this._rootElement;
|
|
49418
49771
|
if (rootElement?.parentElement) {
|
|
49419
49772
|
rootElement.parentElement.removeChild(rootElement);
|
|
49420
49773
|
}
|
|
49421
|
-
this._handler.
|
|
49774
|
+
this._handler.release();
|
|
49422
49775
|
delete this._rootElement;
|
|
49423
49776
|
}
|
|
49424
49777
|
bindToCell(table, col, row, menuInstanceInfo) {
|
|
@@ -49985,10 +50338,10 @@
|
|
|
49985
50338
|
constructor(table) {
|
|
49986
50339
|
this._table = table;
|
|
49987
50340
|
}
|
|
49988
|
-
|
|
50341
|
+
release() {
|
|
49989
50342
|
this.unbindTooltipElement();
|
|
49990
50343
|
if (this._tooltipElement) {
|
|
49991
|
-
this._tooltipElement.
|
|
50344
|
+
this._tooltipElement.release?.();
|
|
49992
50345
|
}
|
|
49993
50346
|
this._tooltipElement = undefined;
|
|
49994
50347
|
}
|
|
@@ -50140,13 +50493,13 @@
|
|
|
50140
50493
|
}
|
|
50141
50494
|
return false;
|
|
50142
50495
|
}
|
|
50143
|
-
|
|
50496
|
+
release() {
|
|
50144
50497
|
this.unbindFromCell();
|
|
50145
50498
|
const rootElement = this._rootElement;
|
|
50146
50499
|
if (rootElement?.parentElement) {
|
|
50147
50500
|
rootElement.parentElement.removeChild(rootElement);
|
|
50148
50501
|
}
|
|
50149
|
-
this._handler?.
|
|
50502
|
+
this._handler?.release?.();
|
|
50150
50503
|
delete this._rootElement;
|
|
50151
50504
|
delete this._messageElement;
|
|
50152
50505
|
}
|
|
@@ -50379,10 +50732,10 @@
|
|
|
50379
50732
|
this._bindTableEvent(table);
|
|
50380
50733
|
this.confine = confine;
|
|
50381
50734
|
}
|
|
50382
|
-
|
|
50735
|
+
release() {
|
|
50383
50736
|
const tooltipInstances = this._tooltipInstances;
|
|
50384
50737
|
for (const k in tooltipInstances) {
|
|
50385
|
-
tooltipInstances[k]?.
|
|
50738
|
+
tooltipInstances[k]?.release?.();
|
|
50386
50739
|
}
|
|
50387
50740
|
delete this._tooltipInstances;
|
|
50388
50741
|
this._attachInfo = null;
|
|
@@ -50438,7 +50791,7 @@
|
|
|
50438
50791
|
return cellInRange(info.range, col, row);
|
|
50439
50792
|
}
|
|
50440
50793
|
_bindTableEvent(table) {
|
|
50441
|
-
table.
|
|
50794
|
+
table.on(TABLE_EVENT_TYPE.MOUSEENTER_CELL, e => {
|
|
50442
50795
|
if (isMobile()) {
|
|
50443
50796
|
return;
|
|
50444
50797
|
}
|
|
@@ -50491,7 +50844,7 @@
|
|
|
50491
50844
|
}
|
|
50492
50845
|
}
|
|
50493
50846
|
});
|
|
50494
|
-
table.
|
|
50847
|
+
table.on(TABLE_EVENT_TYPE.MOUSEMOVE_CELL, e => {
|
|
50495
50848
|
if (isMobile()) {
|
|
50496
50849
|
return;
|
|
50497
50850
|
}
|
|
@@ -50512,7 +50865,7 @@
|
|
|
50512
50865
|
this._bindToCell(e.col, e.row);
|
|
50513
50866
|
}
|
|
50514
50867
|
});
|
|
50515
|
-
table.
|
|
50868
|
+
table.on(TABLE_EVENT_TYPE.MOUSELEAVE_CELL, e => {
|
|
50516
50869
|
if (e.related) {
|
|
50517
50870
|
if (this._isBindCell(e.related.col, e.related.row)) {
|
|
50518
50871
|
return;
|
|
@@ -50520,12 +50873,12 @@
|
|
|
50520
50873
|
}
|
|
50521
50874
|
this._unbindFromCell();
|
|
50522
50875
|
});
|
|
50523
|
-
table.
|
|
50876
|
+
table.on(TABLE_EVENT_TYPE.SELECTED_CELL, e => {
|
|
50524
50877
|
if (this._isBindCell(e.col, e.row)) {
|
|
50525
50878
|
this._unbindFromCell();
|
|
50526
50879
|
}
|
|
50527
50880
|
});
|
|
50528
|
-
table.
|
|
50881
|
+
table.on(TABLE_EVENT_TYPE.SCROLL, e => {
|
|
50529
50882
|
const info = this._attachInfo;
|
|
50530
50883
|
if (info?.tooltipOptions && info?.range?.start) {
|
|
50531
50884
|
const { col, row } = info.range.start;
|
|
@@ -50557,10 +50910,10 @@
|
|
|
50557
50910
|
constructor(table) {
|
|
50558
50911
|
this._table = table;
|
|
50559
50912
|
}
|
|
50560
|
-
|
|
50913
|
+
release() {
|
|
50561
50914
|
this.unbindMenuElement();
|
|
50562
50915
|
if (this._menuElement) {
|
|
50563
|
-
this._menuElement.
|
|
50916
|
+
this._menuElement.release();
|
|
50564
50917
|
}
|
|
50565
50918
|
this._menuElement = undefined;
|
|
50566
50919
|
}
|
|
@@ -50644,13 +50997,13 @@
|
|
|
50644
50997
|
get rootElement() {
|
|
50645
50998
|
return this._rootElement;
|
|
50646
50999
|
}
|
|
50647
|
-
|
|
51000
|
+
release() {
|
|
50648
51001
|
this.unbindFromCell();
|
|
50649
51002
|
const rootElement = this._rootElement;
|
|
50650
51003
|
if (rootElement?.parentElement) {
|
|
50651
51004
|
rootElement.parentElement.removeChild(rootElement);
|
|
50652
51005
|
}
|
|
50653
|
-
this._handler.
|
|
51006
|
+
this._handler.release();
|
|
50654
51007
|
delete this._rootElement;
|
|
50655
51008
|
}
|
|
50656
51009
|
bindToCell(table, col, row, menuInstanceInfo) {
|
|
@@ -50843,10 +51196,10 @@
|
|
|
50843
51196
|
this._menuInstances = {};
|
|
50844
51197
|
this._bindTableEvent(table);
|
|
50845
51198
|
}
|
|
50846
|
-
|
|
51199
|
+
release() {
|
|
50847
51200
|
const menuInstances = this._menuInstances;
|
|
50848
51201
|
for (const k in menuInstances) {
|
|
50849
|
-
menuInstances[k].
|
|
51202
|
+
menuInstances[k].release();
|
|
50850
51203
|
}
|
|
50851
51204
|
delete this._menuInstances;
|
|
50852
51205
|
this._attachInfo = null;
|
|
@@ -50893,7 +51246,7 @@
|
|
|
50893
51246
|
return instance.pointInMenuElement(x, y);
|
|
50894
51247
|
}
|
|
50895
51248
|
_bindTableEvent(table) {
|
|
50896
|
-
table.
|
|
51249
|
+
table.on(TABLE_EVENT_TYPE.DROPDOWN_ICON_CLICK, e => {
|
|
50897
51250
|
if (this._attachInfo) {
|
|
50898
51251
|
if (this._isBindToCell(e.col, e.row)) {
|
|
50899
51252
|
this._unbindFromCell();
|
|
@@ -50906,10 +51259,10 @@
|
|
|
50906
51259
|
this._bindToCell(e.col, e.row, 'dropdown-menu');
|
|
50907
51260
|
}
|
|
50908
51261
|
});
|
|
50909
|
-
table.
|
|
51262
|
+
table.on(TABLE_EVENT_TYPE.DROPDOWN_MENU_CLEAR, e => {
|
|
50910
51263
|
this._unbindFromCell();
|
|
50911
51264
|
});
|
|
50912
|
-
table.
|
|
51265
|
+
table.on(TABLE_EVENT_TYPE.CONTEXTMENU_CELL, e => {
|
|
50913
51266
|
if (table.internalProps.menu?.renderMode === 'html') {
|
|
50914
51267
|
const abstractPos = table._getMouseAbstractPoint(e.event, false);
|
|
50915
51268
|
let menu = null;
|
|
@@ -50981,7 +51334,7 @@
|
|
|
50981
51334
|
get input() {
|
|
50982
51335
|
return this._input;
|
|
50983
51336
|
}
|
|
50984
|
-
|
|
51337
|
+
release() {
|
|
50985
51338
|
}
|
|
50986
51339
|
}
|
|
50987
51340
|
|
|
@@ -51235,7 +51588,7 @@
|
|
|
51235
51588
|
height: height
|
|
51236
51589
|
};
|
|
51237
51590
|
}
|
|
51238
|
-
|
|
51591
|
+
release() {
|
|
51239
51592
|
this.table.scenegraph.stage.defaultLayer.removeChild(this.legendComponent);
|
|
51240
51593
|
this.legendComponent = null;
|
|
51241
51594
|
}
|
|
@@ -51308,7 +51661,7 @@
|
|
|
51308
51661
|
}
|
|
51309
51662
|
return this._titleComponent;
|
|
51310
51663
|
}
|
|
51311
|
-
|
|
51664
|
+
release() {
|
|
51312
51665
|
this.table.scenegraph.stage.defaultLayer.removeChild(this._titleComponent);
|
|
51313
51666
|
this._titleComponent = null;
|
|
51314
51667
|
}
|
|
@@ -51377,7 +51730,7 @@
|
|
|
51377
51730
|
return TABLE_EVENT_TYPE;
|
|
51378
51731
|
}
|
|
51379
51732
|
options;
|
|
51380
|
-
version = "0.9.3-alpha.
|
|
51733
|
+
version = "0.9.3-alpha.5";
|
|
51381
51734
|
pagerConf;
|
|
51382
51735
|
id = `VTable${Date.now()}`;
|
|
51383
51736
|
headerStyleCache;
|
|
@@ -51496,7 +51849,7 @@
|
|
|
51496
51849
|
this.headerStyleCache = new Map();
|
|
51497
51850
|
this.bodyStyleCache = new Map();
|
|
51498
51851
|
}
|
|
51499
|
-
throttleInvalidate = throttle2(this.
|
|
51852
|
+
throttleInvalidate = throttle2(this.render.bind(this), 200);
|
|
51500
51853
|
getParentElement() {
|
|
51501
51854
|
return this.options.parentElement;
|
|
51502
51855
|
}
|
|
@@ -51664,78 +52017,11 @@
|
|
|
51664
52017
|
}
|
|
51665
52018
|
}
|
|
51666
52019
|
_colWidthDefineToPxWidth(width) {
|
|
51667
|
-
if (
|
|
51668
|
-
return
|
|
52020
|
+
if (width === 'auto') {
|
|
52021
|
+
return 0;
|
|
51669
52022
|
}
|
|
51670
52023
|
return _toPxWidth(this, width);
|
|
51671
52024
|
}
|
|
51672
|
-
_calculateAutoColWidthExpr() {
|
|
51673
|
-
const fullWidth = this.internalProps.calcWidthContext.full;
|
|
51674
|
-
let sumMin = 0;
|
|
51675
|
-
const others = [];
|
|
51676
|
-
let autoCount = 0;
|
|
51677
|
-
const hasLimitsOnAuto = [];
|
|
51678
|
-
for (let col = 0; col < this.internalProps.colCount; col++) {
|
|
51679
|
-
const def = this.getColWidthDefine(col);
|
|
51680
|
-
const limits = this._getColWidthLimits(col);
|
|
51681
|
-
if (isAutoDefine(def)) {
|
|
51682
|
-
if (limits) {
|
|
51683
|
-
hasLimitsOnAuto.push(limits);
|
|
51684
|
-
if (limits.min) {
|
|
51685
|
-
sumMin += limits.min;
|
|
51686
|
-
}
|
|
51687
|
-
}
|
|
51688
|
-
autoCount++;
|
|
51689
|
-
}
|
|
51690
|
-
else {
|
|
51691
|
-
let expr = def;
|
|
51692
|
-
if (limits) {
|
|
51693
|
-
const orgWidth = _toPxWidth(this, expr);
|
|
51694
|
-
const newWidth = _applyColWidthLimits(limits, orgWidth);
|
|
51695
|
-
if (orgWidth !== newWidth) {
|
|
51696
|
-
expr = `${newWidth}px`;
|
|
51697
|
-
}
|
|
51698
|
-
sumMin += newWidth;
|
|
51699
|
-
}
|
|
51700
|
-
others.push(expr);
|
|
51701
|
-
}
|
|
51702
|
-
if (sumMin > fullWidth) {
|
|
51703
|
-
return '0px';
|
|
51704
|
-
}
|
|
51705
|
-
}
|
|
51706
|
-
if (hasLimitsOnAuto.length && others.length) {
|
|
51707
|
-
const autoPx = (fullWidth - _toPxWidth(this, `calc(${others.map(c => (typeof c === 'number' ? `${c}px` : c)).join(' + ')})`)) /
|
|
51708
|
-
autoCount;
|
|
51709
|
-
hasLimitsOnAuto.forEach(limits => {
|
|
51710
|
-
if (limits.min && autoPx < limits.min) {
|
|
51711
|
-
others.push(limits.minDef);
|
|
51712
|
-
autoCount--;
|
|
51713
|
-
}
|
|
51714
|
-
else if (limits.max && limits.max < autoPx) {
|
|
51715
|
-
others.push(limits.maxDef);
|
|
51716
|
-
autoCount--;
|
|
51717
|
-
}
|
|
51718
|
-
});
|
|
51719
|
-
if (autoCount <= 0) {
|
|
51720
|
-
return `${autoPx}px`;
|
|
51721
|
-
}
|
|
51722
|
-
}
|
|
51723
|
-
if (others.length) {
|
|
51724
|
-
const strDefs = [];
|
|
51725
|
-
let num = 0;
|
|
51726
|
-
others.forEach(c => {
|
|
51727
|
-
if (typeof c === 'number') {
|
|
51728
|
-
num += c;
|
|
51729
|
-
}
|
|
51730
|
-
else {
|
|
51731
|
-
strDefs.push(c);
|
|
51732
|
-
}
|
|
51733
|
-
});
|
|
51734
|
-
strDefs.push(`${num}px`);
|
|
51735
|
-
return `calc((100% - (${strDefs.join(' + ')})) / ${autoCount})`;
|
|
51736
|
-
}
|
|
51737
|
-
return `${100 / autoCount}%`;
|
|
51738
|
-
}
|
|
51739
52025
|
_getColWidthLimits(col) {
|
|
51740
52026
|
const limit = this.colWidthsLimit[col];
|
|
51741
52027
|
if (!limit) {
|
|
@@ -51825,12 +52111,7 @@
|
|
|
51825
52111
|
: this._adjustColWidth(endCol, this._colWidthDefineToPxWidth(width));
|
|
51826
52112
|
}
|
|
51827
52113
|
else {
|
|
51828
|
-
adjustW =
|
|
51829
|
-
this.isRowHeader(endCol, 0) || this.isCornerHeader(endCol, 0)
|
|
51830
|
-
? Array.isArray(this.defaultHeaderColWidth)
|
|
51831
|
-
? this.defaultHeaderColWidth[endCol] ?? this.internalProps.defaultColWidth
|
|
51832
|
-
: this.defaultHeaderColWidth
|
|
51833
|
-
: this.internalProps.defaultColWidth;
|
|
52114
|
+
adjustW = this.getColWidth(endCol);
|
|
51834
52115
|
}
|
|
51835
52116
|
const addWidth = cachedLowerColWidth + adjustW;
|
|
51836
52117
|
if (startCol >= 0 && endCol >= 0 && !Number.isNaN(addWidth)) {
|
|
@@ -51840,23 +52121,13 @@
|
|
|
51840
52121
|
}
|
|
51841
52122
|
let w = 0;
|
|
51842
52123
|
for (let col = startCol; col <= endCol; col++) {
|
|
51843
|
-
w +=
|
|
51844
|
-
this.isRowHeader(col, 0) || this.isCornerHeader(col, 0)
|
|
51845
|
-
? Array.isArray(this.defaultHeaderColWidth)
|
|
51846
|
-
? this.defaultHeaderColWidth[col] ?? this.internalProps.defaultColWidth
|
|
51847
|
-
: this.defaultHeaderColWidth
|
|
51848
|
-
: this.internalProps.defaultColWidth;
|
|
52124
|
+
w += this.getColWidth(col);
|
|
51849
52125
|
}
|
|
51850
52126
|
this.colWidthsMap.each(startCol, endCol, (width, col) => {
|
|
51851
52127
|
w +=
|
|
51852
52128
|
(this.widthMode === 'adaptive' || this.transpose
|
|
51853
52129
|
? Number(width)
|
|
51854
|
-
: this._adjustColWidth(col, this._colWidthDefineToPxWidth(width))) -
|
|
51855
|
-
(this.isRowHeader(col, 0) || this.isCornerHeader(col, 0)
|
|
51856
|
-
? Array.isArray(this.defaultHeaderColWidth)
|
|
51857
|
-
? this.defaultHeaderColWidth[col] ?? this.internalProps.defaultColWidth
|
|
51858
|
-
: this.defaultHeaderColWidth
|
|
51859
|
-
: this.internalProps.defaultColWidth);
|
|
52130
|
+
: this._adjustColWidth(col, this._colWidthDefineToPxWidth(width))) - this.getColWidth(col);
|
|
51860
52131
|
});
|
|
51861
52132
|
for (let col = startCol; col <= endCol; col++) {
|
|
51862
52133
|
if (this.colWidthsMap.has(col)) {
|
|
@@ -52268,7 +52539,7 @@
|
|
|
52268
52539
|
}
|
|
52269
52540
|
}
|
|
52270
52541
|
}
|
|
52271
|
-
|
|
52542
|
+
render() {
|
|
52272
52543
|
this.scenegraph.renderSceneGraph();
|
|
52273
52544
|
}
|
|
52274
52545
|
_toRelativeRect(absoluteRect) {
|
|
@@ -52357,24 +52628,27 @@
|
|
|
52357
52628
|
getCellOverflowText(col, row) {
|
|
52358
52629
|
return this.scenegraph.getCellOverflowText(col, row);
|
|
52359
52630
|
}
|
|
52360
|
-
|
|
52361
|
-
if (!
|
|
52362
|
-
throw new Error('not
|
|
52631
|
+
addReleaseObj(releaseObj) {
|
|
52632
|
+
if (!releaseObj || !releaseObj.release || typeof releaseObj.release !== 'function') {
|
|
52633
|
+
throw new Error('not releaseObj!');
|
|
52363
52634
|
}
|
|
52364
|
-
const
|
|
52365
|
-
|
|
52635
|
+
const releaseList = (this.internalProps.releaseList = this.internalProps.releaseList || []);
|
|
52636
|
+
releaseList.push(releaseObj);
|
|
52366
52637
|
}
|
|
52367
52638
|
dispose() {
|
|
52639
|
+
this.release();
|
|
52640
|
+
}
|
|
52641
|
+
release() {
|
|
52368
52642
|
const internalProps = this.internalProps;
|
|
52369
|
-
internalProps.tooltipHandler?.
|
|
52370
|
-
internalProps.menuHandler?.
|
|
52643
|
+
internalProps.tooltipHandler?.release?.();
|
|
52644
|
+
internalProps.menuHandler?.release?.();
|
|
52371
52645
|
IconCache.clearAll();
|
|
52372
|
-
super.
|
|
52373
|
-
internalProps.handler?.
|
|
52374
|
-
internalProps.focusControl?.
|
|
52375
|
-
if (internalProps.
|
|
52376
|
-
internalProps.
|
|
52377
|
-
internalProps.
|
|
52646
|
+
super.release?.();
|
|
52647
|
+
internalProps.handler?.release?.();
|
|
52648
|
+
internalProps.focusControl?.release?.();
|
|
52649
|
+
if (internalProps.releaseList) {
|
|
52650
|
+
internalProps.releaseList.forEach(releaseObj => releaseObj?.release?.());
|
|
52651
|
+
internalProps.releaseList = null;
|
|
52378
52652
|
}
|
|
52379
52653
|
this.scenegraph.stage.release();
|
|
52380
52654
|
const { parentElement } = internalProps.element;
|
|
@@ -52437,11 +52711,12 @@
|
|
|
52437
52711
|
internalProps.allowFrozenColCount = options.allowFrozenColCount ?? internalProps.colCount;
|
|
52438
52712
|
internalProps.limitMaxAutoWidth = options.limitMaxAutoWidth ?? 450;
|
|
52439
52713
|
this.dataSet = new DataSet();
|
|
52714
|
+
internalProps.legends?.release();
|
|
52715
|
+
internalProps.title?.release();
|
|
52716
|
+
internalProps.layoutMap.release();
|
|
52440
52717
|
this.scenegraph.clearCells();
|
|
52441
52718
|
this.stateManeger.initState();
|
|
52442
52719
|
this._updateSize();
|
|
52443
|
-
this.internalProps.legends?.dispose();
|
|
52444
|
-
this.internalProps.title?.dispose();
|
|
52445
52720
|
if (options.legends) {
|
|
52446
52721
|
internalProps.legends = new TableLegend(options.legends, this);
|
|
52447
52722
|
this.scenegraph.tableGroup.setAttributes({
|
|
@@ -52682,7 +52957,7 @@
|
|
|
52682
52957
|
this.dataSource.updatePager(this.pagerConf);
|
|
52683
52958
|
this.refreshRowColCount();
|
|
52684
52959
|
this.scenegraph.createSceneGraph();
|
|
52685
|
-
this.
|
|
52960
|
+
this.render();
|
|
52686
52961
|
}
|
|
52687
52962
|
}
|
|
52688
52963
|
get allowFrozenColCount() {
|
|
@@ -52705,7 +52980,7 @@
|
|
|
52705
52980
|
_setDataSource(this, dataSource);
|
|
52706
52981
|
this.refreshRowColCount();
|
|
52707
52982
|
this.scenegraph.createSceneGraph();
|
|
52708
|
-
this.
|
|
52983
|
+
this.render();
|
|
52709
52984
|
}
|
|
52710
52985
|
get autoWrapText() {
|
|
52711
52986
|
return this.internalProps.autoWrapText;
|
|
@@ -52718,7 +52993,7 @@
|
|
|
52718
52993
|
this.options.autoWrapText = autoWrapText;
|
|
52719
52994
|
if (this.internalProps.layoutMap) {
|
|
52720
52995
|
this.refreshHeader();
|
|
52721
|
-
this.
|
|
52996
|
+
this.render();
|
|
52722
52997
|
}
|
|
52723
52998
|
}
|
|
52724
52999
|
get theme() {
|
|
@@ -52868,7 +53143,7 @@
|
|
|
52868
53143
|
_setRecords(this, records);
|
|
52869
53144
|
}
|
|
52870
53145
|
this.scenegraph.createSceneGraph();
|
|
52871
|
-
this.
|
|
53146
|
+
this.render();
|
|
52872
53147
|
console.log('setRecords cost time:', (typeof window !== 'undefined' ? window.performance.now() : 0) - time);
|
|
52873
53148
|
}
|
|
52874
53149
|
setRecord(record, col, row) {
|
|
@@ -53182,7 +53457,7 @@
|
|
|
53182
53457
|
const top = this.getRowsHeight(0, cellAddr.row - 1);
|
|
53183
53458
|
this.scrollTop = Math.min(top - frozenHeight, this.getAllRowsHeight() - drawRange.height);
|
|
53184
53459
|
}
|
|
53185
|
-
this.
|
|
53460
|
+
this.render();
|
|
53186
53461
|
}
|
|
53187
53462
|
getCopyValue() {
|
|
53188
53463
|
const ranges = this.stateManeger.select.ranges;
|
|
@@ -53388,6 +53663,12 @@
|
|
|
53388
53663
|
return false;
|
|
53389
53664
|
});
|
|
53390
53665
|
}
|
|
53666
|
+
_getActiveChartInstance() {
|
|
53667
|
+
const cellGroup = this.scenegraph.getCell(this.stateManeger.hover?.cellPos?.col, this.stateManeger.hover?.cellPos?.row);
|
|
53668
|
+
return cellGroup?.getChildren()?.[0]?.type === 'chart'
|
|
53669
|
+
? cellGroup.getChildren()[0].activeChartInstance
|
|
53670
|
+
: null;
|
|
53671
|
+
}
|
|
53391
53672
|
}
|
|
53392
53673
|
|
|
53393
53674
|
var core = /*#__PURE__*/Object.freeze({
|
|
@@ -53522,219 +53803,6 @@
|
|
|
53522
53803
|
numberFormat: numberFormat
|
|
53523
53804
|
});
|
|
53524
53805
|
|
|
53525
|
-
function getAxisConfigInPivotChart(col, row, layout) {
|
|
53526
|
-
if (!layout._table.isPivotChart()) {
|
|
53527
|
-
return undefined;
|
|
53528
|
-
}
|
|
53529
|
-
if (layout.indicatorsAsCol) {
|
|
53530
|
-
if (layout.hasTwoIndicatorAxes &&
|
|
53531
|
-
row === layout.columnHeaderLevelCount - 1 &&
|
|
53532
|
-
col >= layout.rowHeaderLevelCount &&
|
|
53533
|
-
col < layout.colCount - layout.rightFrozenColCount) {
|
|
53534
|
-
const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, layout.columnHeaderLevelCount - 1);
|
|
53535
|
-
let defaultKey = indicatorKeys[1];
|
|
53536
|
-
if (isArray$3(defaultKey)) {
|
|
53537
|
-
defaultKey = defaultKey[0];
|
|
53538
|
-
}
|
|
53539
|
-
if (!defaultKey) {
|
|
53540
|
-
return undefined;
|
|
53541
|
-
}
|
|
53542
|
-
const data = layout.dataset.collectedValues[defaultKey + '_align']
|
|
53543
|
-
? layout.dataset.collectedValues[defaultKey + '_align']
|
|
53544
|
-
: layout.dataset.collectedValues[defaultKey];
|
|
53545
|
-
const index = layout.getRecordIndexByCol(col);
|
|
53546
|
-
const range = data[layout.getColKeysPath()[index][Math.max(0, layout.columnHeaderLevelCount - 1 - layout.topAxesCount)]];
|
|
53547
|
-
const axisOption = getAxisOption(col, row, 'top', layout);
|
|
53548
|
-
if (axisOption?.visible === false) {
|
|
53549
|
-
return;
|
|
53550
|
-
}
|
|
53551
|
-
return merge$2({}, axisOption, {
|
|
53552
|
-
orient: 'top',
|
|
53553
|
-
type: 'linear',
|
|
53554
|
-
range: range,
|
|
53555
|
-
label: {
|
|
53556
|
-
flush: true
|
|
53557
|
-
},
|
|
53558
|
-
title: {
|
|
53559
|
-
visible: false
|
|
53560
|
-
}
|
|
53561
|
-
});
|
|
53562
|
-
}
|
|
53563
|
-
else if (row === layout.rowCount - layout.bottomFrozenRowCount &&
|
|
53564
|
-
col >= layout.rowHeaderLevelCount &&
|
|
53565
|
-
col < layout.colCount - layout.rightFrozenColCount) {
|
|
53566
|
-
const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, row);
|
|
53567
|
-
let defaultKey = indicatorKeys[0];
|
|
53568
|
-
if (isArray$3(defaultKey)) {
|
|
53569
|
-
defaultKey = defaultKey[0];
|
|
53570
|
-
}
|
|
53571
|
-
const data = layout.dataset.collectedValues[defaultKey + '_align']
|
|
53572
|
-
? layout.dataset.collectedValues[defaultKey + '_align']
|
|
53573
|
-
: layout.dataset.collectedValues[defaultKey];
|
|
53574
|
-
const index = layout.getRecordIndexByCol(col);
|
|
53575
|
-
const range = data[layout.getColKeysPath()[index][Math.max(0, layout.columnHeaderLevelCount - 1 - layout.topAxesCount)]];
|
|
53576
|
-
let indicatorInfo = null;
|
|
53577
|
-
indicatorKeys.forEach(key => {
|
|
53578
|
-
const info = layout.getIndicatorInfo(key);
|
|
53579
|
-
if (info) {
|
|
53580
|
-
indicatorInfo = info;
|
|
53581
|
-
}
|
|
53582
|
-
});
|
|
53583
|
-
const axisOption = getAxisOption(col, row, 'bottom', layout);
|
|
53584
|
-
if (axisOption?.visible === false) {
|
|
53585
|
-
return;
|
|
53586
|
-
}
|
|
53587
|
-
return merge$2({}, axisOption, {
|
|
53588
|
-
orient: 'bottom',
|
|
53589
|
-
type: 'linear',
|
|
53590
|
-
range: range,
|
|
53591
|
-
label: {
|
|
53592
|
-
flush: true
|
|
53593
|
-
},
|
|
53594
|
-
title: {
|
|
53595
|
-
text: indicatorInfo?.caption,
|
|
53596
|
-
autoRotate: true
|
|
53597
|
-
}
|
|
53598
|
-
});
|
|
53599
|
-
}
|
|
53600
|
-
else if (col === layout.rowHeaderLevelCount - 1 &&
|
|
53601
|
-
row >= layout.columnHeaderLevelCount &&
|
|
53602
|
-
row < layout.rowCount - layout.bottomFrozenRowCount) {
|
|
53603
|
-
let rowDimensionKey = layout.getDimensionKeyInChartSpec(layout.rowHeaderLevelCount, row)[0];
|
|
53604
|
-
if (isArray$3(rowDimensionKey)) {
|
|
53605
|
-
rowDimensionKey = rowDimensionKey[0];
|
|
53606
|
-
}
|
|
53607
|
-
const data = layout.dataset.collectedValues[rowDimensionKey];
|
|
53608
|
-
const recordRow = layout.getRecordIndexByRow(row);
|
|
53609
|
-
const rowPath = layout.getRowKeysPath()[recordRow];
|
|
53610
|
-
const domain = data[rowPath[rowPath.length - 1]];
|
|
53611
|
-
const axisOption = getAxisOption(col, row, 'left', layout);
|
|
53612
|
-
if (axisOption?.visible === false) {
|
|
53613
|
-
return;
|
|
53614
|
-
}
|
|
53615
|
-
return merge$2({}, axisOption, {
|
|
53616
|
-
orient: 'left',
|
|
53617
|
-
type: 'band',
|
|
53618
|
-
data: Array.from(domain).reverse(),
|
|
53619
|
-
title: {
|
|
53620
|
-
visible: false
|
|
53621
|
-
}
|
|
53622
|
-
});
|
|
53623
|
-
}
|
|
53624
|
-
}
|
|
53625
|
-
else {
|
|
53626
|
-
if (col === layout.rowHeaderLevelCount - 1 &&
|
|
53627
|
-
row >= layout.columnHeaderLevelCount &&
|
|
53628
|
-
row < layout.rowCount - layout.bottomFrozenRowCount) {
|
|
53629
|
-
const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, row);
|
|
53630
|
-
let defaultKey = indicatorKeys[0];
|
|
53631
|
-
if (isArray$3(defaultKey)) {
|
|
53632
|
-
defaultKey = defaultKey[0];
|
|
53633
|
-
}
|
|
53634
|
-
const data = layout.dataset.collectedValues[defaultKey + '_align']
|
|
53635
|
-
? layout.dataset.collectedValues[defaultKey + '_align']
|
|
53636
|
-
: layout.dataset.collectedValues[defaultKey];
|
|
53637
|
-
const index = layout.getRecordIndexByRow(row);
|
|
53638
|
-
const range = data[layout.getRowKeysPath()[index][Math.max(0, layout.rowHeaderLevelCount - 1 - layout.leftAxesCount)]];
|
|
53639
|
-
let indicatorInfo = null;
|
|
53640
|
-
indicatorKeys.forEach(key => {
|
|
53641
|
-
const info = layout.getIndicatorInfo(key);
|
|
53642
|
-
if (info) {
|
|
53643
|
-
indicatorInfo = info;
|
|
53644
|
-
}
|
|
53645
|
-
});
|
|
53646
|
-
const axisOption = getAxisOption(col, row, 'left', layout);
|
|
53647
|
-
if (axisOption?.visible === false) {
|
|
53648
|
-
return;
|
|
53649
|
-
}
|
|
53650
|
-
return merge$2({}, axisOption, {
|
|
53651
|
-
orient: 'left',
|
|
53652
|
-
type: 'linear',
|
|
53653
|
-
range: range,
|
|
53654
|
-
label: {
|
|
53655
|
-
flush: true
|
|
53656
|
-
},
|
|
53657
|
-
title: {
|
|
53658
|
-
text: indicatorInfo?.caption,
|
|
53659
|
-
autoRotate: true
|
|
53660
|
-
}
|
|
53661
|
-
});
|
|
53662
|
-
}
|
|
53663
|
-
else if (col === layout.colCount - layout.rightFrozenColCount &&
|
|
53664
|
-
row >= layout.columnHeaderLevelCount &&
|
|
53665
|
-
row < layout.rowCount - layout.bottomFrozenRowCount) {
|
|
53666
|
-
const indicatorKeys = layout.getIndicatorKeyInChartSpec(layout.rowHeaderLevelCount - 1, row);
|
|
53667
|
-
let defaultKey = indicatorKeys[1];
|
|
53668
|
-
if (isArray$3(defaultKey)) {
|
|
53669
|
-
defaultKey = defaultKey[0];
|
|
53670
|
-
}
|
|
53671
|
-
if (!defaultKey) {
|
|
53672
|
-
return undefined;
|
|
53673
|
-
}
|
|
53674
|
-
const data = layout.dataset.collectedValues[defaultKey + '_align']
|
|
53675
|
-
? layout.dataset.collectedValues[defaultKey + '_align']
|
|
53676
|
-
: layout.dataset.collectedValues[defaultKey];
|
|
53677
|
-
const index = layout.getRecordIndexByRow(row);
|
|
53678
|
-
const range = data[layout.getRowKeysPath()[index][Math.max(0, layout.rowHeaderLevelCount - 1 - layout.leftAxesCount)]];
|
|
53679
|
-
const axisOption = getAxisOption(col, row, 'right', layout);
|
|
53680
|
-
if (axisOption?.visible === false) {
|
|
53681
|
-
return;
|
|
53682
|
-
}
|
|
53683
|
-
return merge$2({}, axisOption, {
|
|
53684
|
-
orient: 'right',
|
|
53685
|
-
type: 'linear',
|
|
53686
|
-
range: range,
|
|
53687
|
-
label: {
|
|
53688
|
-
flush: true
|
|
53689
|
-
},
|
|
53690
|
-
title: {
|
|
53691
|
-
visible: false
|
|
53692
|
-
}
|
|
53693
|
-
});
|
|
53694
|
-
}
|
|
53695
|
-
else if (row === layout.rowCount - layout.bottomFrozenRowCount &&
|
|
53696
|
-
col >= layout.rowHeaderLevelCount &&
|
|
53697
|
-
col < layout.colCount - layout.rightFrozenColCount) {
|
|
53698
|
-
let columnDimensionKey = layout.getDimensionKeyInChartSpec(col, layout.columnHeaderLevelCount)[0];
|
|
53699
|
-
if (isArray$3(columnDimensionKey)) {
|
|
53700
|
-
columnDimensionKey = columnDimensionKey[0];
|
|
53701
|
-
}
|
|
53702
|
-
const data = layout.dataset.collectedValues[columnDimensionKey];
|
|
53703
|
-
const recordCol = layout.getRecordIndexByCol(col);
|
|
53704
|
-
const colPath = layout.getColKeysPath()[recordCol];
|
|
53705
|
-
const domain = data[colPath[colPath.length - 1]];
|
|
53706
|
-
const axisOption = getAxisOption(col, row, 'bottom', layout);
|
|
53707
|
-
if (axisOption?.visible === false) {
|
|
53708
|
-
return;
|
|
53709
|
-
}
|
|
53710
|
-
return merge$2({}, axisOption, {
|
|
53711
|
-
orient: 'bottom',
|
|
53712
|
-
type: 'band',
|
|
53713
|
-
data: Array.from(domain),
|
|
53714
|
-
title: {
|
|
53715
|
-
visible: false
|
|
53716
|
-
}
|
|
53717
|
-
});
|
|
53718
|
-
}
|
|
53719
|
-
}
|
|
53720
|
-
return undefined;
|
|
53721
|
-
}
|
|
53722
|
-
function getAxisOption(col, row, orient, layout) {
|
|
53723
|
-
const spec = layout.getRawChartSpec(col, row);
|
|
53724
|
-
if (spec && isArray$3(spec.axes)) {
|
|
53725
|
-
const axisOption = spec.axes.find((axis) => {
|
|
53726
|
-
return axis.orient === orient;
|
|
53727
|
-
});
|
|
53728
|
-
if (axisOption) {
|
|
53729
|
-
return axisOption;
|
|
53730
|
-
}
|
|
53731
|
-
}
|
|
53732
|
-
const axisOption = layout._table.pivotChartAxes.find(axisOption => {
|
|
53733
|
-
return axisOption.orient === orient;
|
|
53734
|
-
});
|
|
53735
|
-
return axisOption;
|
|
53736
|
-
}
|
|
53737
|
-
|
|
53738
53806
|
function getRawChartSpec(col, row, layout) {
|
|
53739
53807
|
const paths = layout.getCellHeaderPaths(col, row);
|
|
53740
53808
|
let indicatorObj;
|
|
@@ -53768,17 +53836,23 @@
|
|
|
53768
53836
|
if (isArray$3(key)) {
|
|
53769
53837
|
key = key[0];
|
|
53770
53838
|
}
|
|
53771
|
-
const
|
|
53772
|
-
|
|
53839
|
+
const isZeroAlign = checkZeroAlign(col, row, index === 0 ? 'bottom' : 'top', layout);
|
|
53840
|
+
const data = layout.dataset.collectedValues[key + (isZeroAlign ? '_align' : '')]
|
|
53841
|
+
? layout.dataset.collectedValues[key + (isZeroAlign ? '_align' : '')]
|
|
53773
53842
|
: layout.dataset.collectedValues[key];
|
|
53774
53843
|
const range = data[layout.getColKeysPath()[colIndex][Math.max(0, layout.columnHeaderLevelCount - 1 - layout.topAxesCount)]];
|
|
53775
53844
|
const axisOption = getAxisOption(col, row, index === 0 ? 'bottom' : 'top', layout);
|
|
53776
|
-
|
|
53845
|
+
if (axisOption?.zero) {
|
|
53846
|
+
range.min = Math.min(range.min, 0);
|
|
53847
|
+
range.max = Math.max(range.max, 0);
|
|
53848
|
+
}
|
|
53849
|
+
axes.push(merge$2({
|
|
53850
|
+
range
|
|
53851
|
+
}, axisOption, {
|
|
53777
53852
|
type: 'linear',
|
|
53778
53853
|
orient: index === 0 ? 'bottom' : 'top',
|
|
53779
53854
|
label: { visible: false },
|
|
53780
53855
|
title: { visible: false },
|
|
53781
|
-
range,
|
|
53782
53856
|
seriesIndex: index,
|
|
53783
53857
|
height: -1
|
|
53784
53858
|
}));
|
|
@@ -53792,7 +53866,9 @@
|
|
|
53792
53866
|
const rowPath = layout.getRowKeysPath()[recordRow];
|
|
53793
53867
|
const domain = data[rowPath[rowPath.length - 1]];
|
|
53794
53868
|
const axisOption = getAxisOption(col, row, 'left', layout);
|
|
53795
|
-
axes.push(merge$2({
|
|
53869
|
+
axes.push(merge$2({
|
|
53870
|
+
domain: Array.from(domain)
|
|
53871
|
+
}, axisOption, {
|
|
53796
53872
|
type: 'band',
|
|
53797
53873
|
orient: 'left',
|
|
53798
53874
|
label: { visible: false, space: 0 },
|
|
@@ -53800,8 +53876,7 @@
|
|
|
53800
53876
|
tick: { visible: false },
|
|
53801
53877
|
subTick: { visible: false },
|
|
53802
53878
|
title: { visible: false },
|
|
53803
|
-
width: -1
|
|
53804
|
-
domain: Array.from(domain)
|
|
53879
|
+
width: -1
|
|
53805
53880
|
}));
|
|
53806
53881
|
}
|
|
53807
53882
|
else {
|
|
@@ -53811,17 +53886,23 @@
|
|
|
53811
53886
|
if (isArray$3(key)) {
|
|
53812
53887
|
key = key[0];
|
|
53813
53888
|
}
|
|
53814
|
-
const
|
|
53815
|
-
|
|
53889
|
+
const isZeroAlign = checkZeroAlign(col, row, index === 0 ? 'left' : 'right', layout);
|
|
53890
|
+
const data = layout.dataset.collectedValues[key + (isZeroAlign ? '_align' : '')]
|
|
53891
|
+
? layout.dataset.collectedValues[key + (isZeroAlign ? '_align' : '')]
|
|
53816
53892
|
: layout.dataset.collectedValues[key];
|
|
53817
53893
|
const range = data[layout.getRowKeysPath()[rowIndex][Math.max(0, layout.rowHeaderLevelCount - 1 - layout.leftAxesCount)]];
|
|
53818
53894
|
const axisOption = getAxisOption(col, row, index === 0 ? 'left' : 'right', layout);
|
|
53819
|
-
|
|
53895
|
+
if (axisOption?.zero) {
|
|
53896
|
+
range.min = Math.min(range.min, 0);
|
|
53897
|
+
range.max = Math.max(range.max, 0);
|
|
53898
|
+
}
|
|
53899
|
+
axes.push(merge$2({
|
|
53900
|
+
range
|
|
53901
|
+
}, axisOption, {
|
|
53820
53902
|
type: 'linear',
|
|
53821
53903
|
orient: index === 0 ? 'left' : 'right',
|
|
53822
53904
|
label: { visible: false },
|
|
53823
53905
|
title: { visible: false },
|
|
53824
|
-
range,
|
|
53825
53906
|
seriesIndex: index,
|
|
53826
53907
|
width: -1
|
|
53827
53908
|
}));
|
|
@@ -53835,7 +53916,9 @@
|
|
|
53835
53916
|
const colPath = layout.getColKeysPath()[recordCol];
|
|
53836
53917
|
const domain = data[colPath[colPath.length - 1]];
|
|
53837
53918
|
const axisOption = getAxisOption(col, row, 'bottom', layout);
|
|
53838
|
-
axes.push(merge$2({
|
|
53919
|
+
axes.push(merge$2({
|
|
53920
|
+
domain: Array.from(domain)
|
|
53921
|
+
}, axisOption, {
|
|
53839
53922
|
type: 'band',
|
|
53840
53923
|
orient: 'bottom',
|
|
53841
53924
|
visible: true,
|
|
@@ -53844,8 +53927,7 @@
|
|
|
53844
53927
|
tick: { visible: false },
|
|
53845
53928
|
subTick: { visible: false },
|
|
53846
53929
|
title: { visible: false },
|
|
53847
|
-
height: -1
|
|
53848
|
-
domain: Array.from(domain)
|
|
53930
|
+
height: -1
|
|
53849
53931
|
}));
|
|
53850
53932
|
}
|
|
53851
53933
|
return axes;
|
|
@@ -53953,6 +54035,24 @@
|
|
|
53953
54035
|
}
|
|
53954
54036
|
return false;
|
|
53955
54037
|
}
|
|
54038
|
+
isLeftBottomCorner(col, row) {
|
|
54039
|
+
if (col < this.rowHeaderLevelCount && row >= this.rowCount - this.bottomFrozenRowCount) {
|
|
54040
|
+
return true;
|
|
54041
|
+
}
|
|
54042
|
+
return false;
|
|
54043
|
+
}
|
|
54044
|
+
isRightTopCorner(col, row) {
|
|
54045
|
+
if (col >= this.colCount - this.rightFrozenColCount && row < this.columnHeaderLevelCount) {
|
|
54046
|
+
return true;
|
|
54047
|
+
}
|
|
54048
|
+
return false;
|
|
54049
|
+
}
|
|
54050
|
+
isRightBottomCorner(col, row) {
|
|
54051
|
+
if (col >= this.colCount - this.rightFrozenColCount && row >= this.rowCount - this.bottomFrozenRowCount) {
|
|
54052
|
+
return true;
|
|
54053
|
+
}
|
|
54054
|
+
return false;
|
|
54055
|
+
}
|
|
53956
54056
|
isCornerHeader(col, row) {
|
|
53957
54057
|
return false;
|
|
53958
54058
|
}
|
|
@@ -54504,6 +54604,13 @@
|
|
|
54504
54604
|
getChartDataId(col, row) {
|
|
54505
54605
|
return getChartDataId(col, row, this);
|
|
54506
54606
|
}
|
|
54607
|
+
release() {
|
|
54608
|
+
const activeChartInstance = this._table._getActiveChartInstance();
|
|
54609
|
+
activeChartInstance?.release();
|
|
54610
|
+
this.columnObjects.forEach(indicatorObject => {
|
|
54611
|
+
indicatorObject.chartInstance?.release();
|
|
54612
|
+
});
|
|
54613
|
+
}
|
|
54507
54614
|
}
|
|
54508
54615
|
|
|
54509
54616
|
class ListTable extends BaseTable {
|
|
@@ -54554,7 +54661,7 @@
|
|
|
54554
54661
|
this.options.columns = columns;
|
|
54555
54662
|
this.refreshHeader();
|
|
54556
54663
|
setTimeout(() => {
|
|
54557
|
-
this.
|
|
54664
|
+
this.render();
|
|
54558
54665
|
}, 0);
|
|
54559
54666
|
}
|
|
54560
54667
|
get header() {
|
|
@@ -54565,7 +54672,7 @@
|
|
|
54565
54672
|
this.options.header = header;
|
|
54566
54673
|
this.refreshHeader();
|
|
54567
54674
|
setTimeout(() => {
|
|
54568
|
-
this.
|
|
54675
|
+
this.render();
|
|
54569
54676
|
}, 0);
|
|
54570
54677
|
}
|
|
54571
54678
|
get transpose() {
|
|
@@ -54581,7 +54688,7 @@
|
|
|
54581
54688
|
this.internalProps.layoutMap.transpose = transpose;
|
|
54582
54689
|
this.refreshRowColCount();
|
|
54583
54690
|
this._resetFrozenColCount();
|
|
54584
|
-
this.
|
|
54691
|
+
this.render();
|
|
54585
54692
|
}
|
|
54586
54693
|
}
|
|
54587
54694
|
getCellValue(col, row) {
|
|
@@ -54638,9 +54745,9 @@
|
|
|
54638
54745
|
: [];
|
|
54639
54746
|
this.transpose = options.transpose ?? false;
|
|
54640
54747
|
this.refreshHeader();
|
|
54641
|
-
if (internalProps.
|
|
54642
|
-
internalProps.
|
|
54643
|
-
internalProps.
|
|
54748
|
+
if (internalProps.releaseList) {
|
|
54749
|
+
internalProps.releaseList.forEach(releaseObj => releaseObj?.release?.());
|
|
54750
|
+
internalProps.releaseList = null;
|
|
54644
54751
|
}
|
|
54645
54752
|
if (options.dataSource) {
|
|
54646
54753
|
_setDataSource(this, options.dataSource);
|
|
@@ -54651,7 +54758,7 @@
|
|
|
54651
54758
|
else {
|
|
54652
54759
|
this._resetFrozenColCount();
|
|
54653
54760
|
this.scenegraph.createSceneGraph();
|
|
54654
|
-
this.
|
|
54761
|
+
this.render();
|
|
54655
54762
|
}
|
|
54656
54763
|
return new Promise(resolve => {
|
|
54657
54764
|
setTimeout(resolve, 0);
|
|
@@ -54663,7 +54770,7 @@
|
|
|
54663
54770
|
const transpose = table.transpose;
|
|
54664
54771
|
const showHeader = table.showHeader;
|
|
54665
54772
|
if (internalProps.headerEvents) {
|
|
54666
|
-
internalProps.headerEvents.forEach((id) => table.
|
|
54773
|
+
internalProps.headerEvents.forEach((id) => table.off(id));
|
|
54667
54774
|
}
|
|
54668
54775
|
const layoutMap = (internalProps.layoutMap = new SimpleHeaderLayoutMap(this, internalProps.columns ?? [], showHeader, table.options.hierarchyIndent));
|
|
54669
54776
|
layoutMap.transpose = transpose;
|
|
@@ -55623,6 +55730,24 @@
|
|
|
55623
55730
|
}
|
|
55624
55731
|
return false;
|
|
55625
55732
|
}
|
|
55733
|
+
isLeftBottomCorner(col, row) {
|
|
55734
|
+
if (col < this.rowHeaderLevelCount && row >= this.rowCount - this.bottomFrozenRowCount) {
|
|
55735
|
+
return true;
|
|
55736
|
+
}
|
|
55737
|
+
return false;
|
|
55738
|
+
}
|
|
55739
|
+
isRightTopCorner(col, row) {
|
|
55740
|
+
if (col >= this.colCount - this.rightFrozenColCount && row < this.columnHeaderLevelCount) {
|
|
55741
|
+
return true;
|
|
55742
|
+
}
|
|
55743
|
+
return false;
|
|
55744
|
+
}
|
|
55745
|
+
isRightBottomCorner(col, row) {
|
|
55746
|
+
if (col >= this.colCount - this.rightFrozenColCount && row >= this.rowCount - this.bottomFrozenRowCount) {
|
|
55747
|
+
return true;
|
|
55748
|
+
}
|
|
55749
|
+
return false;
|
|
55750
|
+
}
|
|
55626
55751
|
getColumnHeaderRange() {
|
|
55627
55752
|
return {
|
|
55628
55753
|
start: { col: this.rowHeaderLevelCount, row: 0 },
|
|
@@ -56420,6 +56545,13 @@
|
|
|
56420
56545
|
getChartDataId(col, row) {
|
|
56421
56546
|
return getChartDataId(col, row, this);
|
|
56422
56547
|
}
|
|
56548
|
+
release() {
|
|
56549
|
+
const activeChartInstance = this._table._getActiveChartInstance();
|
|
56550
|
+
activeChartInstance?.release();
|
|
56551
|
+
this._indicators.forEach(indicatorObject => {
|
|
56552
|
+
indicatorObject.chartInstance?.release();
|
|
56553
|
+
});
|
|
56554
|
+
}
|
|
56423
56555
|
}
|
|
56424
56556
|
|
|
56425
56557
|
const EMPTY_HEADER = {
|
|
@@ -56934,6 +57066,24 @@
|
|
|
56934
57066
|
}
|
|
56935
57067
|
return false;
|
|
56936
57068
|
}
|
|
57069
|
+
isLeftBottomCorner(col, row) {
|
|
57070
|
+
if (col < this.rowHeaderLevelCount && row >= this.rowCount - this.bottomFrozenRowCount) {
|
|
57071
|
+
return true;
|
|
57072
|
+
}
|
|
57073
|
+
return false;
|
|
57074
|
+
}
|
|
57075
|
+
isRightTopCorner(col, row) {
|
|
57076
|
+
if (col >= this.colCount - this.rightFrozenColCount && row < this.columnHeaderLevelCount) {
|
|
57077
|
+
return true;
|
|
57078
|
+
}
|
|
57079
|
+
return false;
|
|
57080
|
+
}
|
|
57081
|
+
isRightBottomCorner(col, row) {
|
|
57082
|
+
if (col >= this.colCount - this.rightFrozenColCount && row >= this.rowCount - this.bottomFrozenRowCount) {
|
|
57083
|
+
return true;
|
|
57084
|
+
}
|
|
57085
|
+
return false;
|
|
57086
|
+
}
|
|
56937
57087
|
isRowHeader(col, row) {
|
|
56938
57088
|
if (col < this.rowHeaderLevelCount && row >= this.columnHeaderLevelCount) {
|
|
56939
57089
|
return true;
|
|
@@ -57634,6 +57784,13 @@
|
|
|
57634
57784
|
}
|
|
57635
57785
|
return false;
|
|
57636
57786
|
}
|
|
57787
|
+
release() {
|
|
57788
|
+
const activeChartInstance = this._table._getActiveChartInstance();
|
|
57789
|
+
activeChartInstance?.release();
|
|
57790
|
+
this._indicatorObjects.forEach(indicatorObject => {
|
|
57791
|
+
indicatorObject.chartInstance?.release();
|
|
57792
|
+
});
|
|
57793
|
+
}
|
|
57637
57794
|
}
|
|
57638
57795
|
|
|
57639
57796
|
class FlatDataToObjects {
|
|
@@ -59143,9 +59300,9 @@
|
|
|
59143
59300
|
this.dataset = new Dataset(internalProps.dataConfig, rowKeys, columnKeys, indicatorKeys, options.records);
|
|
59144
59301
|
}
|
|
59145
59302
|
this.refreshHeader();
|
|
59146
|
-
if (internalProps.
|
|
59147
|
-
internalProps.
|
|
59148
|
-
internalProps.
|
|
59303
|
+
if (internalProps.releaseList) {
|
|
59304
|
+
internalProps.releaseList.forEach(releaseObj => releaseObj?.release?.());
|
|
59305
|
+
internalProps.releaseList = null;
|
|
59149
59306
|
}
|
|
59150
59307
|
if (options.dataSource) {
|
|
59151
59308
|
_setDataSource(this, options.dataSource);
|
|
@@ -59156,7 +59313,7 @@
|
|
|
59156
59313
|
else {
|
|
59157
59314
|
this._resetFrozenColCount();
|
|
59158
59315
|
this.scenegraph.createSceneGraph();
|
|
59159
|
-
this.
|
|
59316
|
+
this.render();
|
|
59160
59317
|
}
|
|
59161
59318
|
this.pivotSortState = [];
|
|
59162
59319
|
if (options.pivotSortState) {
|
|
@@ -59169,7 +59326,7 @@
|
|
|
59169
59326
|
refreshHeader() {
|
|
59170
59327
|
const internalProps = this.internalProps;
|
|
59171
59328
|
if (internalProps.headerEvents) {
|
|
59172
|
-
internalProps.headerEvents.forEach((id) => this.
|
|
59329
|
+
internalProps.headerEvents.forEach((id) => this.off(id));
|
|
59173
59330
|
}
|
|
59174
59331
|
const records = this.options.records ?? this.internalProps.records;
|
|
59175
59332
|
if (this.options.enableDataAnalysis) {
|
|
@@ -59336,7 +59493,7 @@
|
|
|
59336
59493
|
this.internalProps.dataConfig.sortRules = sortRules;
|
|
59337
59494
|
this.dataset.updateSortRules(sortRules);
|
|
59338
59495
|
this.internalProps.layoutMap.updateDataset(this.dataset);
|
|
59339
|
-
this.
|
|
59496
|
+
this.render();
|
|
59340
59497
|
}
|
|
59341
59498
|
updatePivotSortState(pivotSortStateConfig) {
|
|
59342
59499
|
for (let i = 0; i < pivotSortStateConfig.length; i++) {
|
|
@@ -59581,9 +59738,9 @@
|
|
|
59581
59738
|
this.dataset = new Dataset(this.internalProps.dataConfig, rowKeys, columnKeys, indicatorKeys, options.records ?? this.internalProps.records, options.columnTree, options.rowTree);
|
|
59582
59739
|
}
|
|
59583
59740
|
this.refreshHeader();
|
|
59584
|
-
if (internalProps.
|
|
59585
|
-
internalProps.
|
|
59586
|
-
internalProps.
|
|
59741
|
+
if (internalProps.releaseList) {
|
|
59742
|
+
internalProps.releaseList.forEach(releaseObj => releaseObj?.release?.());
|
|
59743
|
+
internalProps.releaseList = null;
|
|
59587
59744
|
}
|
|
59588
59745
|
if (options.dataSource) {
|
|
59589
59746
|
_setDataSource(this, options.dataSource);
|
|
@@ -59594,7 +59751,7 @@
|
|
|
59594
59751
|
else {
|
|
59595
59752
|
this._resetFrozenColCount();
|
|
59596
59753
|
this.scenegraph.createSceneGraph();
|
|
59597
|
-
this.
|
|
59754
|
+
this.render();
|
|
59598
59755
|
}
|
|
59599
59756
|
return new Promise(resolve => {
|
|
59600
59757
|
setTimeout(resolve, 0);
|
|
@@ -59603,7 +59760,7 @@
|
|
|
59603
59760
|
refreshHeader() {
|
|
59604
59761
|
const internalProps = this.internalProps;
|
|
59605
59762
|
if (internalProps.headerEvents) {
|
|
59606
|
-
internalProps.headerEvents.forEach((id) => this.
|
|
59763
|
+
internalProps.headerEvents.forEach((id) => this.off(id));
|
|
59607
59764
|
}
|
|
59608
59765
|
internalProps.layoutMap = new PivotLayoutMap(this, this.dataset);
|
|
59609
59766
|
for (let col = 0; col < internalProps.layoutMap.columnWidths.length; col++) {
|
|
@@ -59718,7 +59875,7 @@
|
|
|
59718
59875
|
this.internalProps.dataConfig.sortRules = sortRules;
|
|
59719
59876
|
this.dataset.updateSortRules(sortRules);
|
|
59720
59877
|
this.internalProps.layoutMap.updateDataset(this.dataset);
|
|
59721
|
-
this.
|
|
59878
|
+
this.render();
|
|
59722
59879
|
}
|
|
59723
59880
|
updatePivotSortState(pivotSortStateConfig) {
|
|
59724
59881
|
for (let i = 0; i < pivotSortStateConfig.length; i++) {
|
|
@@ -60036,22 +60193,26 @@
|
|
|
60036
60193
|
}
|
|
60037
60194
|
});
|
|
60038
60195
|
}
|
|
60039
|
-
|
|
60040
|
-
|
|
60041
|
-
|
|
60042
|
-
|
|
60043
|
-
|
|
60044
|
-
|
|
60045
|
-
|
|
60046
|
-
this._chartEventMap[type] = listener;
|
|
60196
|
+
onVChartEvent(type, query, callback) {
|
|
60197
|
+
if (query) {
|
|
60198
|
+
this._chartEventMap[type] = { callback, query };
|
|
60199
|
+
}
|
|
60200
|
+
else {
|
|
60201
|
+
this._chartEventMap[type] = { callback };
|
|
60202
|
+
}
|
|
60047
60203
|
}
|
|
60048
|
-
|
|
60204
|
+
offVChartEvent(type) {
|
|
60049
60205
|
delete this._chartEventMap[type];
|
|
60050
60206
|
}
|
|
60051
60207
|
_bindChartEvent(activeChartInstance) {
|
|
60052
60208
|
if (activeChartInstance) {
|
|
60053
60209
|
for (const key in this._chartEventMap) {
|
|
60054
|
-
|
|
60210
|
+
if (this._chartEventMap[key].query) {
|
|
60211
|
+
activeChartInstance.on(key, this._chartEventMap[key].query, this._chartEventMap[key].callback);
|
|
60212
|
+
}
|
|
60213
|
+
else {
|
|
60214
|
+
activeChartInstance.on(key, this._chartEventMap[key].callback);
|
|
60215
|
+
}
|
|
60055
60216
|
}
|
|
60056
60217
|
}
|
|
60057
60218
|
}
|
|
@@ -60060,7 +60221,7 @@
|
|
|
60060
60221
|
this.dataset.updateFilterRules(filterRules);
|
|
60061
60222
|
clearChartCacheImage(this.scenegraph);
|
|
60062
60223
|
updateChartData(this.scenegraph);
|
|
60063
|
-
this.
|
|
60224
|
+
this.render();
|
|
60064
60225
|
}
|
|
60065
60226
|
setLegendSelected(selectedData) {
|
|
60066
60227
|
this.internalProps.legends.legendComponent.setSelected(selectedData);
|
|
@@ -60098,7 +60259,7 @@
|
|
|
60098
60259
|
});
|
|
60099
60260
|
chartInstance.updateDataSync(dataId, data);
|
|
60100
60261
|
position = chartInstance.convertDatumToPosition(datum);
|
|
60101
|
-
this.
|
|
60262
|
+
this.render();
|
|
60102
60263
|
}
|
|
60103
60264
|
return position
|
|
60104
60265
|
? { x: Math.round(position.x + cellPosition.bounds.x1), y: Math.round(position.y + cellPosition.bounds.y1) }
|
|
@@ -60732,7 +60893,7 @@
|
|
|
60732
60893
|
percentCalc: percentCalc
|
|
60733
60894
|
});
|
|
60734
60895
|
|
|
60735
|
-
const version = "0.9.3-alpha.
|
|
60896
|
+
const version = "0.9.3-alpha.5";
|
|
60736
60897
|
function getIcons() {
|
|
60737
60898
|
return get$1();
|
|
60738
60899
|
}
|