@visactor/vtable 1.18.1 → 1.18.2-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/ListTable.d.ts +3 -1
- package/cjs/ListTable.js +18 -13
- package/cjs/ListTable.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +1 -0
- package/cjs/core/BaseTable.js +6 -1
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/tableHelper.js +3 -3
- package/cjs/core/tableHelper.js.map +1 -1
- package/cjs/data/DataSource.js +2 -1
- package/cjs/data/DataSource.js.map +1 -1
- package/cjs/event/event.d.ts +1 -1
- package/cjs/event/event.js +1 -1
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/container-dom.js +28 -8
- package/cjs/event/listener/container-dom.js.map +1 -1
- package/cjs/event/listener/table-group.js +1 -35
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/event/listener/touch.js +21 -18
- package/cjs/event/listener/touch.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/layout/pivot-header-layout.js +2 -2
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +6 -1
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/column-helper.js +2 -1
- package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/layout/frozen.js +31 -12
- package/cjs/scenegraph/layout/frozen.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js +6 -4
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +1 -0
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +289 -144
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.d.ts +3 -1
- package/es/ListTable.js +19 -12
- package/es/ListTable.js.map +1 -1
- package/es/core/BaseTable.d.ts +1 -0
- package/es/core/BaseTable.js +6 -1
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/tableHelper.js +3 -3
- package/es/core/tableHelper.js.map +1 -1
- package/es/data/DataSource.js +2 -1
- package/es/data/DataSource.js.map +1 -1
- package/es/event/event.d.ts +1 -1
- package/es/event/event.js +2 -2
- package/es/event/event.js.map +1 -1
- package/es/event/listener/container-dom.js +30 -8
- package/es/event/listener/container-dom.js.map +1 -1
- package/es/event/listener/table-group.js +2 -36
- package/es/event/listener/table-group.js.map +1 -1
- package/es/event/listener/touch.js +22 -17
- package/es/event/listener/touch.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/layout/pivot-header-layout.js +2 -2
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +6 -1
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/column-helper.js +2 -1
- package/es/scenegraph/group-creater/column-helper.js.map +1 -1
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/layout/frozen.js +31 -12
- package/es/scenegraph/layout/frozen.js.map +1 -1
- package/es/scenegraph/scenegraph.js +6 -4
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/ts-types/base-table.d.ts +1 -0
- package/es/ts-types/base-table.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +6 -6
package/dist/vtable.js
CHANGED
|
@@ -492,11 +492,14 @@
|
|
|
492
492
|
const ContributionProvider = Symbol("ContributionProvider");
|
|
493
493
|
class ContributionProviderCache {
|
|
494
494
|
constructor(serviceIdentifier, container) {
|
|
495
|
-
this.serviceIdentifier = serviceIdentifier, this.container = container;
|
|
495
|
+
this.serviceIdentifier = serviceIdentifier, this.container = container, ContributionStore.setStore(this.serviceIdentifier, this);
|
|
496
496
|
}
|
|
497
497
|
getContributions() {
|
|
498
498
|
return this.caches || (this.caches = [], this.container && this.container.isBound(this.serviceIdentifier) && this.caches.push(...this.container.getAll(this.serviceIdentifier))), this.caches;
|
|
499
499
|
}
|
|
500
|
+
refresh() {
|
|
501
|
+
this.caches && (this.caches.length = 0, this.container && this.container.isBound(this.serviceIdentifier) && this.caches.push(...this.container.getAll(this.serviceIdentifier)));
|
|
502
|
+
}
|
|
500
503
|
}
|
|
501
504
|
function bindContributionProvider(bind, id) {
|
|
502
505
|
bind(ContributionProvider).toDynamicValue(_ref => {
|
|
@@ -514,6 +517,20 @@
|
|
|
514
517
|
return new ContributionProviderCache(id, container);
|
|
515
518
|
}).whenTargetNamed(id);
|
|
516
519
|
}
|
|
520
|
+
class ContributionStore {
|
|
521
|
+
static getStore(id) {
|
|
522
|
+
return this.store.get(id);
|
|
523
|
+
}
|
|
524
|
+
static setStore(id, cache) {
|
|
525
|
+
this.store.set(id, cache);
|
|
526
|
+
}
|
|
527
|
+
static refreshAllContributions() {
|
|
528
|
+
this.store.forEach(cache => {
|
|
529
|
+
cache.refresh();
|
|
530
|
+
});
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
ContributionStore.store = new Map();
|
|
517
534
|
|
|
518
535
|
class Hook {
|
|
519
536
|
constructor(args, name) {
|
|
@@ -580,6 +597,48 @@
|
|
|
580
597
|
const VGlobal = Symbol.for("VGlobal");
|
|
581
598
|
const DEFAULT_TEXT_FONT_FAMILY$2 = "PingFang SC,Helvetica Neue,Microsoft Yahei,system-ui,-apple-system,segoe ui,Roboto,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol";
|
|
582
599
|
|
|
600
|
+
class EventListenerManager {
|
|
601
|
+
constructor() {
|
|
602
|
+
this._listenerMap = new Map(), this._eventListenerTransformer = event => event;
|
|
603
|
+
}
|
|
604
|
+
setEventListenerTransformer(transformer) {
|
|
605
|
+
this._eventListenerTransformer = transformer || (event => event);
|
|
606
|
+
}
|
|
607
|
+
addEventListener(type, listener, options) {
|
|
608
|
+
if (!listener) return;
|
|
609
|
+
const wrappedListener = event => {
|
|
610
|
+
const transformedEvent = this._eventListenerTransformer(event);
|
|
611
|
+
"function" == typeof listener ? listener(transformedEvent) : listener.handleEvent && listener.handleEvent(transformedEvent);
|
|
612
|
+
};
|
|
613
|
+
this._listenerMap.has(type) || this._listenerMap.set(type, new Map()), this._listenerMap.get(type).set(listener, wrappedListener), this._nativeAddEventListener(type, wrappedListener, options);
|
|
614
|
+
}
|
|
615
|
+
removeEventListener(type, listener, options) {
|
|
616
|
+
var _a;
|
|
617
|
+
if (!listener) return;
|
|
618
|
+
const wrappedListener = null === (_a = this._listenerMap.get(type)) || void 0 === _a ? void 0 : _a.get(listener);
|
|
619
|
+
wrappedListener && (this._nativeRemoveEventListener(type, wrappedListener, options), this._listenerMap.get(type).delete(listener), 0 === this._listenerMap.get(type).size && this._listenerMap.delete(type));
|
|
620
|
+
}
|
|
621
|
+
dispatchEvent(event) {
|
|
622
|
+
return this._nativeDispatchEvent(event);
|
|
623
|
+
}
|
|
624
|
+
clearAllEventListeners() {
|
|
625
|
+
this._listenerMap.forEach((listenersMap, type) => {
|
|
626
|
+
listenersMap.forEach((wrappedListener, originalListener) => {
|
|
627
|
+
this._nativeRemoveEventListener(type, wrappedListener, void 0);
|
|
628
|
+
});
|
|
629
|
+
}), this._listenerMap.clear();
|
|
630
|
+
}
|
|
631
|
+
_nativeAddEventListener(type, listener, options) {
|
|
632
|
+
throw new Error("_nativeAddEventListener must be implemented by derived classes");
|
|
633
|
+
}
|
|
634
|
+
_nativeRemoveEventListener(type, listener, options) {
|
|
635
|
+
throw new Error("_nativeRemoveEventListener must be implemented by derived classes");
|
|
636
|
+
}
|
|
637
|
+
_nativeDispatchEvent(event) {
|
|
638
|
+
throw new Error("_nativeDispatchEvent must be implemented by derived classes");
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
|
|
583
642
|
var __decorate$10 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
584
643
|
var d,
|
|
585
644
|
c = arguments.length,
|
|
@@ -620,7 +679,7 @@
|
|
|
620
679
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
621
680
|
});
|
|
622
681
|
};
|
|
623
|
-
let DefaultGlobal = class {
|
|
682
|
+
let DefaultGlobal = class extends EventListenerManager {
|
|
624
683
|
get env() {
|
|
625
684
|
return this._env;
|
|
626
685
|
}
|
|
@@ -664,10 +723,19 @@
|
|
|
664
723
|
this._env || this.setEnv("browser"), this.envContribution.applyStyles = support;
|
|
665
724
|
}
|
|
666
725
|
constructor(contributions) {
|
|
667
|
-
this.contributions = contributions, this._isImageAnonymous = !0, this.id = Generator.GenAutoIncrementId(), this.hooks = {
|
|
726
|
+
super(), this.contributions = contributions, this._isImageAnonymous = !0, this.eventListenerTransformer = event => event, this.id = Generator.GenAutoIncrementId(), this.hooks = {
|
|
668
727
|
onSetEnv: new SyncHook(["lastEnv", "env", "global"])
|
|
669
728
|
}, this.measureTextMethod = "native", this.optimizeVisible = !1;
|
|
670
729
|
}
|
|
730
|
+
_nativeAddEventListener(type, listener, options) {
|
|
731
|
+
return this._env || this.setEnv("browser"), this.envContribution.addEventListener(type, listener, options);
|
|
732
|
+
}
|
|
733
|
+
_nativeRemoveEventListener(type, listener, options) {
|
|
734
|
+
return this._env || this.setEnv("browser"), this.envContribution.removeEventListener(type, listener, options);
|
|
735
|
+
}
|
|
736
|
+
_nativeDispatchEvent(event) {
|
|
737
|
+
return this._env || this.setEnv("browser"), this.envContribution.dispatchEvent(event);
|
|
738
|
+
}
|
|
671
739
|
bindContribution(params) {
|
|
672
740
|
const promiseArr = [];
|
|
673
741
|
if (this.contributions.getContributions().forEach(contribution => {
|
|
@@ -708,15 +776,6 @@
|
|
|
708
776
|
releaseCanvas(canvas) {
|
|
709
777
|
return this._env || this.setEnv("browser"), this.envContribution.releaseCanvas(canvas);
|
|
710
778
|
}
|
|
711
|
-
addEventListener(type, listener, options) {
|
|
712
|
-
return this._env || this.setEnv("browser"), this.envContribution.addEventListener(type, listener, options);
|
|
713
|
-
}
|
|
714
|
-
removeEventListener(type, listener, options) {
|
|
715
|
-
return this._env || this.setEnv("browser"), this.envContribution.removeEventListener(type, listener, options);
|
|
716
|
-
}
|
|
717
|
-
dispatchEvent(event) {
|
|
718
|
-
return this._env || this.setEnv("browser"), this.envContribution.dispatchEvent(event);
|
|
719
|
-
}
|
|
720
779
|
getRequestAnimationFrame() {
|
|
721
780
|
return this._env || this.setEnv("browser"), this.envContribution.getRequestAnimationFrame();
|
|
722
781
|
}
|
|
@@ -5587,7 +5646,7 @@
|
|
|
5587
5646
|
};
|
|
5588
5647
|
const VWindow = Symbol.for("VWindow");
|
|
5589
5648
|
const WindowHandlerContribution = Symbol.for("WindowHandlerContribution");
|
|
5590
|
-
let DefaultWindow = class {
|
|
5649
|
+
let DefaultWindow = class extends EventListenerManager {
|
|
5591
5650
|
get width() {
|
|
5592
5651
|
if (this._handler) {
|
|
5593
5652
|
const wh = this._handler.getWH();
|
|
@@ -5606,7 +5665,7 @@
|
|
|
5606
5665
|
return this._handler.getDpr();
|
|
5607
5666
|
}
|
|
5608
5667
|
constructor() {
|
|
5609
|
-
this.hooks = {
|
|
5668
|
+
super(), this.hooks = {
|
|
5610
5669
|
onChange: new SyncHook(["x", "y", "width", "height"])
|
|
5611
5670
|
}, this.active = () => {
|
|
5612
5671
|
const global = this.global;
|
|
@@ -5614,6 +5673,15 @@
|
|
|
5614
5673
|
container.getNamed(WindowHandlerContribution, global.env).configure(this, global), this.actived = !0;
|
|
5615
5674
|
}, this._uid = Generator.GenAutoIncrementId(), this.global = application.global, this.postInit();
|
|
5616
5675
|
}
|
|
5676
|
+
_nativeAddEventListener(type, listener, options) {
|
|
5677
|
+
return this._handler.addEventListener(type, listener, options);
|
|
5678
|
+
}
|
|
5679
|
+
_nativeRemoveEventListener(type, listener, options) {
|
|
5680
|
+
return this._handler.removeEventListener(type, listener, options);
|
|
5681
|
+
}
|
|
5682
|
+
_nativeDispatchEvent(event) {
|
|
5683
|
+
return this._handler.dispatchEvent(event);
|
|
5684
|
+
}
|
|
5617
5685
|
postInit() {
|
|
5618
5686
|
this.global.hooks.onSetEnv.tap("window", this.active), this.active();
|
|
5619
5687
|
}
|
|
@@ -5653,7 +5721,7 @@
|
|
|
5653
5721
|
throw new Error("暂不支持");
|
|
5654
5722
|
}
|
|
5655
5723
|
release() {
|
|
5656
|
-
return this.global.hooks.onSetEnv.unTap("window", this.active), this._handler.releaseWindow();
|
|
5724
|
+
return this.global.hooks.onSetEnv.unTap("window", this.active), this.clearAllEventListeners(), this._handler.releaseWindow();
|
|
5657
5725
|
}
|
|
5658
5726
|
getContext() {
|
|
5659
5727
|
return this._handler.getContext();
|
|
@@ -5664,15 +5732,6 @@
|
|
|
5664
5732
|
getImageBuffer(type) {
|
|
5665
5733
|
return this._handler.getImageBuffer ? this._handler.getImageBuffer(type) : null;
|
|
5666
5734
|
}
|
|
5667
|
-
addEventListener(type, listener, options) {
|
|
5668
|
-
return this._handler.addEventListener(type, listener, options);
|
|
5669
|
-
}
|
|
5670
|
-
removeEventListener(type, listener, options) {
|
|
5671
|
-
return this._handler.removeEventListener(type, listener, options);
|
|
5672
|
-
}
|
|
5673
|
-
dispatchEvent(event) {
|
|
5674
|
-
return this._handler.dispatchEvent(event);
|
|
5675
|
-
}
|
|
5676
5735
|
getBoundingClientRect() {
|
|
5677
5736
|
return this._handler.getBoundingClientRect();
|
|
5678
5737
|
}
|
|
@@ -6881,19 +6940,17 @@
|
|
|
6881
6940
|
globalObj: globalObj,
|
|
6882
6941
|
domElement: domElement
|
|
6883
6942
|
} = this;
|
|
6884
|
-
this.supportsPointerEvents ? (globalObj.getDocument() ? (globalObj.
|
|
6943
|
+
this.supportsPointerEvents ? (globalObj.getDocument() ? (globalObj.addEventListener("pointermove", this.onPointerMove, !0), globalObj.addEventListener("pointerup", this.onPointerUp, !0)) : (domElement.addEventListener("pointermove", this.onPointerMove, !0), domElement.addEventListener("pointerup", this.onPointerUp, !0)), domElement.addEventListener("pointerdown", this.onPointerDown, !0), domElement.addEventListener("pointerleave", this.onPointerOverOut, !0), domElement.addEventListener("pointerover", this.onPointerOverOut, !0)) : (globalObj.getDocument() ? (globalObj.addEventListener("mousemove", this.onPointerMove, !0), globalObj.addEventListener("mouseup", this.onPointerUp, !0)) : (domElement.addEventListener("mousemove", this.onPointerMove, !0), domElement.addEventListener("mouseup", this.onPointerUp, !0)), domElement.addEventListener("mousedown", this.onPointerDown, !0), domElement.addEventListener("mouseout", this.onPointerOverOut, !0), domElement.addEventListener("mouseover", this.onPointerOverOut, !0)), this.supportsTouchEvents && (domElement.addEventListener("touchstart", this.onPointerDown, !0), domElement.addEventListener("touchend", this.onPointerUp, !0), domElement.addEventListener("touchmove", this.onPointerMove, !0)), domElement.addEventListener("wheel", this.onWheel, {
|
|
6885
6944
|
capture: !0
|
|
6886
6945
|
}), this.eventsAdded = !0;
|
|
6887
6946
|
}
|
|
6888
6947
|
removeEvents() {
|
|
6889
|
-
var _a;
|
|
6890
6948
|
if (!this.eventsAdded || !this.domElement) return;
|
|
6891
6949
|
const {
|
|
6892
|
-
|
|
6893
|
-
|
|
6894
|
-
|
|
6895
|
-
|
|
6896
|
-
this.supportsPointerEvents ? (globalDocument.removeEventListener("pointermove", this.onPointerMove, !0), globalDocument.removeEventListener("pointerup", this.onPointerUp, !0), domElement.removeEventListener("pointerdown", this.onPointerDown, !0), domElement.removeEventListener("pointerleave", this.onPointerOverOut, !0), domElement.removeEventListener("pointerover", this.onPointerOverOut, !0)) : (globalDocument.removeEventListener("mousemove", this.onPointerMove, !0), globalDocument.removeEventListener("mouseup", this.onPointerUp, !0), domElement.removeEventListener("mousedown", this.onPointerDown, !0), domElement.removeEventListener("mouseout", this.onPointerOverOut, !0), domElement.removeEventListener("mouseover", this.onPointerOverOut, !0)), this.supportsTouchEvents && (domElement.removeEventListener("touchstart", this.onPointerDown, !0), domElement.removeEventListener("touchend", this.onPointerUp, !0), domElement.removeEventListener("touchmove", this.onPointerMove, !0)), domElement.removeEventListener("wheel", this.onWheel, !0), this.domElement = null, this.eventsAdded = !1;
|
|
6950
|
+
globalObj: globalObj,
|
|
6951
|
+
domElement: domElement
|
|
6952
|
+
} = this;
|
|
6953
|
+
this.supportsPointerEvents ? (globalObj.getDocument() ? (globalObj.removeEventListener("pointermove", this.onPointerMove, !0), globalObj.removeEventListener("pointerup", this.onPointerUp, !0)) : (domElement.removeEventListener("pointermove", this.onPointerMove, !0), domElement.removeEventListener("pointerup", this.onPointerUp, !0)), domElement.removeEventListener("pointerdown", this.onPointerDown, !0), domElement.removeEventListener("pointerleave", this.onPointerOverOut, !0), domElement.removeEventListener("pointerover", this.onPointerOverOut, !0)) : (globalObj.getDocument() ? (globalObj.removeEventListener("mousemove", this.onPointerMove, !0), globalObj.removeEventListener("mouseup", this.onPointerUp, !0)) : (domElement.removeEventListener("mousemove", this.onPointerMove, !0), domElement.removeEventListener("mouseup", this.onPointerUp, !0)), domElement.removeEventListener("mousedown", this.onPointerDown, !0), domElement.removeEventListener("mouseout", this.onPointerOverOut, !0), domElement.removeEventListener("mouseover", this.onPointerOverOut, !0)), this.supportsTouchEvents && (domElement.removeEventListener("touchstart", this.onPointerDown, !0), domElement.removeEventListener("touchend", this.onPointerUp, !0), domElement.removeEventListener("touchmove", this.onPointerMove, !0)), domElement.removeEventListener("wheel", this.onWheel, !0), this.domElement = null, this.eventsAdded = !1;
|
|
6897
6954
|
}
|
|
6898
6955
|
mapToViewportPoint(event) {
|
|
6899
6956
|
return this.domElement.pointTransform ? this.domElement.pointTransform(event.x, event.y) : event;
|
|
@@ -13807,6 +13864,9 @@
|
|
|
13807
13864
|
init(contributions) {
|
|
13808
13865
|
contributions && (this._renderContribitions = contributions.getContributions()), this._renderContribitions || (this._renderContribitions = []), this.builtinContributions || (this.builtinContributions = []), this.builtinContributions.push(defaultBaseClipRenderBeforeContribution), this.builtinContributions.push(defaultBaseClipRenderAfterContribution), this.builtinContributions.forEach(item => this._renderContribitions.push(item)), this._renderContribitions.length && (this._renderContribitions.sort((a, b) => b.order - a.order), this._beforeRenderContribitions = this._renderContribitions.filter(c => c.time === BaseRenderContributionTime.beforeFillStroke), this._afterRenderContribitions = this._renderContribitions.filter(c => c.time === BaseRenderContributionTime.afterFillStroke));
|
|
13809
13866
|
}
|
|
13867
|
+
reInit() {
|
|
13868
|
+
this.init(this.graphicRenderContributions);
|
|
13869
|
+
}
|
|
13810
13870
|
beforeRenderStep(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb, params) {
|
|
13811
13871
|
this._beforeRenderContribitions && this._beforeRenderContribitions.forEach(c => {
|
|
13812
13872
|
if (c.supportedAppName && graphic.stage && graphic.stage.params && graphic.stage.params.context && graphic.stage.params.context.appName) {
|
|
@@ -13976,8 +14036,8 @@
|
|
|
13976
14036
|
};
|
|
13977
14037
|
};
|
|
13978
14038
|
let DefaultCanvasArcRender = class extends BaseRender {
|
|
13979
|
-
constructor(
|
|
13980
|
-
super(), this.
|
|
14039
|
+
constructor(graphicRenderContributions) {
|
|
14040
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = ARC_NUMBER_TYPE, this.builtinContributions = [defaultArcRenderContribution, defaultArcBackgroundRenderContribution, defaultArcTextureRenderContribution], this.init(graphicRenderContributions);
|
|
13981
14041
|
}
|
|
13982
14042
|
drawArcTailCapPath(arc, context, cx, cy, outerRadius, innerRadius, _sa, _ea) {
|
|
13983
14043
|
const capAngle = _ea - _sa,
|
|
@@ -14152,8 +14212,8 @@
|
|
|
14152
14212
|
};
|
|
14153
14213
|
};
|
|
14154
14214
|
let DefaultCanvasCircleRender = class extends BaseRender {
|
|
14155
|
-
constructor(
|
|
14156
|
-
super(), this.
|
|
14215
|
+
constructor(graphicRenderContributions) {
|
|
14216
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = CIRCLE_NUMBER_TYPE, this.builtinContributions = [defaultCircleRenderContribution, defaultCircleBackgroundRenderContribution, defaultCircleTextureRenderContribution], this.init(graphicRenderContributions);
|
|
14157
14217
|
}
|
|
14158
14218
|
drawShape(circle, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
14159
14219
|
const circleAttribute = getTheme(circle, null == params ? void 0 : params.theme).circle,
|
|
@@ -14539,8 +14599,8 @@
|
|
|
14539
14599
|
};
|
|
14540
14600
|
};
|
|
14541
14601
|
let DefaultCanvasAreaRender = class extends BaseRender {
|
|
14542
|
-
constructor(
|
|
14543
|
-
super(), this.
|
|
14602
|
+
constructor(graphicRenderContributions) {
|
|
14603
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = AREA_NUMBER_TYPE, this.builtinContributions = [defaultAreaTextureRenderContribution, defaultAreaBackgroundRenderContribution], this.init(graphicRenderContributions);
|
|
14544
14604
|
}
|
|
14545
14605
|
drawLinearAreaHighPerformance(area, context, fill, stroke, fillOpacity, strokeOpacity, offsetX, offsetY, areaAttribute, drawContext, params, fillCb, strokeCb) {
|
|
14546
14606
|
var _a, _b, _c;
|
|
@@ -14783,8 +14843,8 @@
|
|
|
14783
14843
|
};
|
|
14784
14844
|
};
|
|
14785
14845
|
let DefaultCanvasPathRender = class extends BaseRender {
|
|
14786
|
-
constructor(
|
|
14787
|
-
super(), this.
|
|
14846
|
+
constructor(graphicRenderContributions) {
|
|
14847
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = PATH_NUMBER_TYPE, this.builtinContributions = [defaultPathBackgroundRenderContribution, defaultPathTextureRenderContribution], this.init(graphicRenderContributions);
|
|
14788
14848
|
}
|
|
14789
14849
|
drawShape(path, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
14790
14850
|
var _a, _b, _c;
|
|
@@ -14839,8 +14899,8 @@
|
|
|
14839
14899
|
};
|
|
14840
14900
|
};
|
|
14841
14901
|
let DefaultCanvasRectRender = class extends BaseRender {
|
|
14842
|
-
constructor(
|
|
14843
|
-
super(), this.
|
|
14902
|
+
constructor(graphicRenderContributions) {
|
|
14903
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.type = "rect", this.numberType = RECT_NUMBER_TYPE, this.builtinContributions = [defaultRectRenderContribution, defaultRectBackgroundRenderContribution, defaultRectTextureRenderContribution], this.init(graphicRenderContributions);
|
|
14844
14904
|
}
|
|
14845
14905
|
drawShape(rect, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
14846
14906
|
var _a;
|
|
@@ -14911,8 +14971,8 @@
|
|
|
14911
14971
|
};
|
|
14912
14972
|
};
|
|
14913
14973
|
let DefaultCanvasSymbolRender = class extends BaseRender {
|
|
14914
|
-
constructor(
|
|
14915
|
-
super(), this.
|
|
14974
|
+
constructor(graphicRenderContributions) {
|
|
14975
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = SYMBOL_NUMBER_TYPE, this.builtinContributions = [defaultSymbolRenderContribution, defaultSymbolBackgroundRenderContribution, defaultSymbolTextureRenderContribution, defaultSymbolClipRangeStrokeRenderContribution], this.init(graphicRenderContributions);
|
|
14916
14976
|
}
|
|
14917
14977
|
drawShape(symbol, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
14918
14978
|
var _a;
|
|
@@ -15083,8 +15143,8 @@
|
|
|
15083
15143
|
};
|
|
15084
15144
|
};
|
|
15085
15145
|
let DefaultCanvasTextRender = class extends BaseRender {
|
|
15086
|
-
constructor(
|
|
15087
|
-
super(), this.
|
|
15146
|
+
constructor(graphicRenderContributions) {
|
|
15147
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = TEXT_NUMBER_TYPE, this.builtinContributions = [defaultTextBackgroundRenderContribution], this.init(graphicRenderContributions);
|
|
15088
15148
|
}
|
|
15089
15149
|
drawShape(text, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
15090
15150
|
var _a, _b, _c;
|
|
@@ -15288,8 +15348,8 @@
|
|
|
15288
15348
|
};
|
|
15289
15349
|
};
|
|
15290
15350
|
let DefaultCanvasPolygonRender = class extends BaseRender {
|
|
15291
|
-
constructor(
|
|
15292
|
-
super(), this.
|
|
15351
|
+
constructor(graphicRenderContributions) {
|
|
15352
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = POLYGON_NUMBER_TYPE, this.builtinContributions = [defaultPolygonBackgroundRenderContribution, defaultPolygonTextureRenderContribution], this.init(graphicRenderContributions);
|
|
15293
15353
|
}
|
|
15294
15354
|
drawShape(polygon, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
15295
15355
|
const polygonAttribute = getTheme(polygon, null == params ? void 0 : params.theme).polygon,
|
|
@@ -15344,6 +15404,9 @@
|
|
|
15344
15404
|
constructor(groupRenderContribitions) {
|
|
15345
15405
|
this.groupRenderContribitions = groupRenderContribitions, this.numberType = GROUP_NUMBER_TYPE;
|
|
15346
15406
|
}
|
|
15407
|
+
reInit() {
|
|
15408
|
+
this._groupRenderContribitions = this.groupRenderContribitions.getContributions() || [], this._groupRenderContribitions.push(defaultGroupBackgroundRenderContribution);
|
|
15409
|
+
}
|
|
15347
15410
|
drawShape(group, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
15348
15411
|
const groupAttribute = getTheme(group, null == params ? void 0 : params.theme).group,
|
|
15349
15412
|
{
|
|
@@ -15474,8 +15537,8 @@
|
|
|
15474
15537
|
};
|
|
15475
15538
|
const repeatStr = ["", "repeat-x", "repeat-y", "repeat"];
|
|
15476
15539
|
let DefaultCanvasImageRender = class extends BaseRender {
|
|
15477
|
-
constructor(
|
|
15478
|
-
super(), this.
|
|
15540
|
+
constructor(graphicRenderContributions) {
|
|
15541
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = IMAGE_NUMBER_TYPE, this.builtinContributions = [defaultImageRenderContribution, defaultImageBackgroundRenderContribution], this.init(graphicRenderContributions);
|
|
15479
15542
|
}
|
|
15480
15543
|
drawShape(image, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
15481
15544
|
const imageAttribute = getTheme(image).image,
|
|
@@ -15797,6 +15860,9 @@
|
|
|
15797
15860
|
afterDraw(params) {
|
|
15798
15861
|
this.drawContribution.afterDraw && this.drawContribution.afterDraw(this, Object.assign({}, this.drawParams));
|
|
15799
15862
|
}
|
|
15863
|
+
reInit() {
|
|
15864
|
+
this.drawContribution.reInit();
|
|
15865
|
+
}
|
|
15800
15866
|
render(groups, params) {
|
|
15801
15867
|
this.renderTreeRoots = groups, this.drawParams = params;
|
|
15802
15868
|
const updateBounds = params.updateBounds;
|
|
@@ -16198,6 +16264,11 @@
|
|
|
16198
16264
|
constructor(contributions, drawItemInterceptorContributions) {
|
|
16199
16265
|
this.contributions = contributions, this.drawItemInterceptorContributions = drawItemInterceptorContributions, this.currentRenderMap = new Map(), this.defaultRenderMap = new Map(), this.styleRenderMap = new Map(), this.dirtyBounds = new Bounds$1(), this.backupDirtyBounds = new Bounds$1(), this.global = application.global, this.layerService = application.layerService, isArray$9(this.contributions) || (this.contributions = [this.contributions]), this.init();
|
|
16200
16266
|
}
|
|
16267
|
+
reInit() {
|
|
16268
|
+
this.init(), this.contributions.forEach(item => {
|
|
16269
|
+
item.reInit();
|
|
16270
|
+
});
|
|
16271
|
+
}
|
|
16201
16272
|
init() {
|
|
16202
16273
|
this.contributions.forEach(item => {
|
|
16203
16274
|
if (item.style) {
|
|
@@ -17322,6 +17393,9 @@
|
|
|
17322
17393
|
getPickerService() {
|
|
17323
17394
|
return this.pickerService || (this.pickerService = container.get(PickerService)), this.pickerService;
|
|
17324
17395
|
}
|
|
17396
|
+
reInit() {
|
|
17397
|
+
this.renderService.reInit(), this.pickerService.reInit();
|
|
17398
|
+
}
|
|
17325
17399
|
}
|
|
17326
17400
|
|
|
17327
17401
|
function createStage(params) {
|
|
@@ -17611,6 +17685,9 @@
|
|
|
17611
17685
|
constructor(pickItemInterceptorContributions, pickServiceInterceptorContributions) {
|
|
17612
17686
|
this.pickItemInterceptorContributions = pickItemInterceptorContributions, this.pickServiceInterceptorContributions = pickServiceInterceptorContributions, this.type = "default", this.global = application.global;
|
|
17613
17687
|
}
|
|
17688
|
+
reInit() {
|
|
17689
|
+
this._init();
|
|
17690
|
+
}
|
|
17614
17691
|
_init() {
|
|
17615
17692
|
this.InterceptorContributions = this.pickItemInterceptorContributions.getContributions().sort((a, b) => a.order - b.order), this.pickerServiceInterceptorContributions = this.pickServiceInterceptorContributions.getContributions().sort((a, b) => a.order - b.order);
|
|
17616
17693
|
}
|
|
@@ -33490,6 +33567,9 @@
|
|
|
33490
33567
|
release() {
|
|
33491
33568
|
super.release?.();
|
|
33492
33569
|
this.lastFilterRules = null;
|
|
33570
|
+
this.clearSortedMap();
|
|
33571
|
+
this.clearCurrentIndexedData();
|
|
33572
|
+
this.currentPagerIndexedData.length = 0;
|
|
33493
33573
|
}
|
|
33494
33574
|
clearSortedMap() {
|
|
33495
33575
|
this.currentIndexedData && (this.currentIndexedData.length = 0);
|
|
@@ -35878,7 +35958,14 @@
|
|
|
35878
35958
|
}
|
|
35879
35959
|
function _setDataSource(table, dataSource) {
|
|
35880
35960
|
_dealWithUpdateDataSource(table, () => {
|
|
35881
|
-
|
|
35961
|
+
if (table.internalProps.dataSource) {
|
|
35962
|
+
table.internalProps.releaseList.forEach(releaseObj => {
|
|
35963
|
+
if (releaseObj instanceof DataSource) {
|
|
35964
|
+
releaseObj.release();
|
|
35965
|
+
table.internalProps.releaseList.splice(table.internalProps.releaseList.indexOf(releaseObj), 1);
|
|
35966
|
+
}
|
|
35967
|
+
});
|
|
35968
|
+
}
|
|
35882
35969
|
if (dataSource) {
|
|
35883
35970
|
if (dataSource instanceof DataSource) {
|
|
35884
35971
|
table.internalProps.dataSource = dataSource;
|
|
@@ -39137,8 +39224,16 @@
|
|
|
39137
39224
|
cellGroup = createSparkLineCellGroup(null, columnGroup, 0, y, col, row, cellWidth, cellHeight, padding, table, cellTheme, isAsync);
|
|
39138
39225
|
}
|
|
39139
39226
|
else if (type === 'checkbox') {
|
|
39140
|
-
const
|
|
39141
|
-
|
|
39227
|
+
const isAggregation = 'isAggregation' in table.internalProps.layoutMap && table.internalProps.layoutMap.isAggregation(col, row);
|
|
39228
|
+
const isSeriesNumber = table.internalProps.layoutMap.isSeriesNumber(col, row);
|
|
39229
|
+
if (isAggregation && isSeriesNumber) {
|
|
39230
|
+
const createTextCellGroup = Factory.getFunction('createTextCellGroup');
|
|
39231
|
+
cellGroup = createTextCellGroup(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, false, undefined, true, cellTheme, range, isAsync);
|
|
39232
|
+
}
|
|
39233
|
+
else {
|
|
39234
|
+
const createCheckboxCellGroup = Factory.getFunction('createCheckboxCellGroup');
|
|
39235
|
+
cellGroup = createCheckboxCellGroup(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync);
|
|
39236
|
+
}
|
|
39142
39237
|
}
|
|
39143
39238
|
else if (type === 'radio') {
|
|
39144
39239
|
const createRadioCellGroup = Factory.getFunction('createRadioCellGroup');
|
|
@@ -45266,9 +45361,12 @@
|
|
|
45266
45361
|
? table.getHeaderDefine(colForDefine, rowForDefine)
|
|
45267
45362
|
: table.getBodyColumnDefine(colForDefine, rowForDefine);
|
|
45268
45363
|
}
|
|
45364
|
+
const isAggregation = 'isAggregation' in table.internalProps.layoutMap && table.internalProps.layoutMap.isAggregation(col, row);
|
|
45365
|
+
const isSeriesNumber = table.internalProps.layoutMap.isSeriesNumber(col, row);
|
|
45269
45366
|
let mayHaveIcon = cellLocation !== 'body'
|
|
45270
45367
|
? true
|
|
45271
|
-
: define?.dragOrder || !!define?.icon || !!define?.tree
|
|
45368
|
+
: (define?.dragOrder || !!define?.icon || !!define?.tree) &&
|
|
45369
|
+
!(isAggregation && isSeriesNumber);
|
|
45272
45370
|
if (!range &&
|
|
45273
45371
|
(table.internalProps.enableTreeNodeMerge || cellLocation !== 'body' || define?.mergeCell)) {
|
|
45274
45372
|
range = table.getCellRange(col, row);
|
|
@@ -48909,8 +49007,11 @@
|
|
|
48909
49007
|
function moveRowFromBodyToColHeader(scene) {
|
|
48910
49008
|
let hasSetedHeight = false;
|
|
48911
49009
|
for (let i = 0; i < scene.bodyGroup.childrenCount; i++) {
|
|
48912
|
-
const
|
|
48913
|
-
|
|
49010
|
+
const child = scene.bodyGroup.children[i];
|
|
49011
|
+
if (!checkBeforeMove(child)) {
|
|
49012
|
+
continue;
|
|
49013
|
+
}
|
|
49014
|
+
const rowCell = child.firstChild;
|
|
48914
49015
|
scene.colHeaderGroup.children[i]?.appendChild(rowCell);
|
|
48915
49016
|
if (!hasSetedHeight) {
|
|
48916
49017
|
scene.colHeaderGroup.setAttribute('height', scene.colHeaderGroup.attribute.height + rowCell.attribute.height);
|
|
@@ -48922,8 +49023,11 @@
|
|
|
48922
49023
|
function moveRowFromRowHeaderToCornerHeader(scene) {
|
|
48923
49024
|
let hasSetedHeight = false;
|
|
48924
49025
|
for (let i = 0; i < scene.rowHeaderGroup.childrenCount; i++) {
|
|
48925
|
-
const
|
|
48926
|
-
|
|
49026
|
+
const child = scene.rowHeaderGroup.children[i];
|
|
49027
|
+
if (!checkBeforeMove(child)) {
|
|
49028
|
+
continue;
|
|
49029
|
+
}
|
|
49030
|
+
const rowCell = child.firstChild;
|
|
48927
49031
|
scene.cornerHeaderGroup.children[i]?.appendChild(rowCell);
|
|
48928
49032
|
if (!hasSetedHeight) {
|
|
48929
49033
|
scene.cornerHeaderGroup.setAttribute('height', scene.cornerHeaderGroup.attribute.height + rowCell.attribute.height);
|
|
@@ -48935,8 +49039,11 @@
|
|
|
48935
49039
|
function moveRowFromRightToTopRightCorner(scene) {
|
|
48936
49040
|
let hasSetedHeight = false;
|
|
48937
49041
|
for (let i = 0; i < scene.rightFrozenGroup.childrenCount; i++) {
|
|
48938
|
-
const
|
|
48939
|
-
|
|
49042
|
+
const child = scene.rightFrozenGroup.children[i];
|
|
49043
|
+
if (!checkBeforeMove(child)) {
|
|
49044
|
+
continue;
|
|
49045
|
+
}
|
|
49046
|
+
const rowCell = child.firstChild;
|
|
48940
49047
|
scene.rightTopCornerGroup.children[i]?.appendChild(rowCell);
|
|
48941
49048
|
if (!hasSetedHeight) {
|
|
48942
49049
|
scene.rightTopCornerGroup.setAttribute('height', scene.rightTopCornerGroup.attribute.height + rowCell.attribute.height);
|
|
@@ -48948,9 +49055,16 @@
|
|
|
48948
49055
|
function moveRowFromColHeaderToBody(scene) {
|
|
48949
49056
|
let hasSetedHeight = false;
|
|
48950
49057
|
for (let i = 0; i < scene.colHeaderGroup.childrenCount; i++) {
|
|
48951
|
-
const
|
|
48952
|
-
|
|
48953
|
-
|
|
49058
|
+
const child = scene.colHeaderGroup.children[i];
|
|
49059
|
+
if (!checkBeforeMove(child)) {
|
|
49060
|
+
continue;
|
|
49061
|
+
}
|
|
49062
|
+
const target = scene.bodyGroup.children[i];
|
|
49063
|
+
if (!target) {
|
|
49064
|
+
continue;
|
|
49065
|
+
}
|
|
49066
|
+
const rowCell = child.lastChild;
|
|
49067
|
+
insertBefore(target, rowCell, target.firstChild);
|
|
48954
49068
|
if (!hasSetedHeight) {
|
|
48955
49069
|
scene.colHeaderGroup.setAttribute('height', scene.colHeaderGroup.attribute.height - rowCell.attribute.height);
|
|
48956
49070
|
scene.bodyGroup.setAttribute('height', scene.bodyGroup.attribute.height + rowCell.attribute.height);
|
|
@@ -48961,9 +49075,16 @@
|
|
|
48961
49075
|
function moveRowFromCornerHeaderToRowHeader(scene) {
|
|
48962
49076
|
let hasSetedHeight = false;
|
|
48963
49077
|
for (let i = 0; i < scene.cornerHeaderGroup.childrenCount; i++) {
|
|
48964
|
-
const
|
|
48965
|
-
|
|
48966
|
-
|
|
49078
|
+
const child = scene.cornerHeaderGroup.children[i];
|
|
49079
|
+
if (!checkBeforeMove(child)) {
|
|
49080
|
+
continue;
|
|
49081
|
+
}
|
|
49082
|
+
const target = scene.rowHeaderGroup.children[i];
|
|
49083
|
+
if (!target) {
|
|
49084
|
+
continue;
|
|
49085
|
+
}
|
|
49086
|
+
const rowCell = child.lastChild;
|
|
49087
|
+
insertBefore(target, rowCell, target.firstChild);
|
|
48967
49088
|
if (!hasSetedHeight) {
|
|
48968
49089
|
scene.cornerHeaderGroup.setAttribute('height', scene.cornerHeaderGroup.attribute.height - rowCell.attribute.height);
|
|
48969
49090
|
scene.rowHeaderGroup.setAttribute('height', scene.rowHeaderGroup.attribute.height + rowCell.attribute.height);
|
|
@@ -48974,9 +49095,16 @@
|
|
|
48974
49095
|
function moveRowFromTopRightCornerToRight(scene) {
|
|
48975
49096
|
let hasSetedHeight = false;
|
|
48976
49097
|
for (let i = 0; i < scene.rightTopCornerGroup.childrenCount; i++) {
|
|
48977
|
-
const
|
|
48978
|
-
|
|
48979
|
-
|
|
49098
|
+
const child = scene.rightTopCornerGroup.children[i];
|
|
49099
|
+
if (!checkBeforeMove(child)) {
|
|
49100
|
+
continue;
|
|
49101
|
+
}
|
|
49102
|
+
const target = scene.rightFrozenGroup.children[i];
|
|
49103
|
+
if (!target) {
|
|
49104
|
+
continue;
|
|
49105
|
+
}
|
|
49106
|
+
const rowCell = child.lastChild;
|
|
49107
|
+
insertBefore(target, rowCell, target.firstChild);
|
|
48980
49108
|
if (!hasSetedHeight) {
|
|
48981
49109
|
scene.rightTopCornerGroup.setAttribute('height', scene.rightTopCornerGroup.attribute.height - rowCell.attribute.height);
|
|
48982
49110
|
scene.rightFrozenGroup.setAttribute('height', scene.rightFrozenGroup.attribute.height + rowCell.attribute.height);
|
|
@@ -48984,6 +49112,9 @@
|
|
|
48984
49112
|
}
|
|
48985
49113
|
}
|
|
48986
49114
|
}
|
|
49115
|
+
function checkBeforeMove(child) {
|
|
49116
|
+
return child instanceof Group$1 && child?.name !== 'table-border-rect';
|
|
49117
|
+
}
|
|
48987
49118
|
|
|
48988
49119
|
function updateChartSizeForResizeColWidth(scenegraph, col) {
|
|
48989
49120
|
const { table } = scenegraph;
|
|
@@ -50964,15 +51095,19 @@
|
|
|
50964
51095
|
table._clearColRangeWidthsMap();
|
|
50965
51096
|
const canvasWidth = table.tableNoFrameWidth;
|
|
50966
51097
|
let actualHeaderWidth = 0;
|
|
50967
|
-
|
|
50968
|
-
|
|
50969
|
-
|
|
50970
|
-
|
|
50971
|
-
|
|
51098
|
+
let startCol = 0;
|
|
51099
|
+
let endCol = table.colCount;
|
|
51100
|
+
if (table.widthAdaptiveMode === 'only-body') {
|
|
51101
|
+
for (let col = 0; col < table.colCount; col++) {
|
|
51102
|
+
if (col < table.rowHeaderLevelCount ||
|
|
51103
|
+
(table.isPivotChart() && col >= table.colCount - table.rightFrozenColCount)) {
|
|
51104
|
+
const colWidth = table.getColWidth(col);
|
|
51105
|
+
actualHeaderWidth += colWidth;
|
|
51106
|
+
}
|
|
50972
51107
|
}
|
|
51108
|
+
startCol = table.rowHeaderLevelCount;
|
|
51109
|
+
endCol = table.isPivotChart() ? table.colCount - table.rightFrozenColCount : table.colCount;
|
|
50973
51110
|
}
|
|
50974
|
-
const startCol = table.rowHeaderLevelCount;
|
|
50975
|
-
const endCol = table.isPivotChart() ? table.colCount - table.rightFrozenColCount : table.colCount;
|
|
50976
51111
|
getAdaptiveWidth(canvasWidth - actualHeaderWidth, startCol, endCol, false, [], table, true);
|
|
50977
51112
|
}
|
|
50978
51113
|
else if (table.autoFillWidth) {
|
|
@@ -55327,47 +55462,6 @@
|
|
|
55327
55462
|
});
|
|
55328
55463
|
}
|
|
55329
55464
|
});
|
|
55330
|
-
const globalPointerupCallback = (e) => {
|
|
55331
|
-
const target = e.target;
|
|
55332
|
-
if (!table.getElement().contains(target)) {
|
|
55333
|
-
const isCompleteEdit = table.editorManager?.completeEdit(e);
|
|
55334
|
-
getPromiseValue(isCompleteEdit, isCompleteEdit => {
|
|
55335
|
-
if (isCompleteEdit === false) {
|
|
55336
|
-
return;
|
|
55337
|
-
}
|
|
55338
|
-
stateManager.updateInteractionState(InteractionState.default);
|
|
55339
|
-
eventManager.dealTableHover();
|
|
55340
|
-
});
|
|
55341
|
-
}
|
|
55342
|
-
};
|
|
55343
|
-
const globalPointerdownCallback = (e) => {
|
|
55344
|
-
const target = e.target;
|
|
55345
|
-
if (!table.getElement().contains(target) && !table.internalProps.menuHandler.containElement(target)) {
|
|
55346
|
-
const isCompleteEdit = table.editorManager?.completeEdit(e);
|
|
55347
|
-
getPromiseValue(isCompleteEdit, isCompleteEdit => {
|
|
55348
|
-
if (isCompleteEdit === false) {
|
|
55349
|
-
return;
|
|
55350
|
-
}
|
|
55351
|
-
if (table.options.select?.outsideClickDeselect) {
|
|
55352
|
-
const isHasSelected = !!stateManager.select.ranges?.length;
|
|
55353
|
-
eventManager.dealTableSelect();
|
|
55354
|
-
stateManager.endSelectCells(true, isHasSelected);
|
|
55355
|
-
}
|
|
55356
|
-
});
|
|
55357
|
-
}
|
|
55358
|
-
};
|
|
55359
|
-
eventManager.globalEventListeners.push({
|
|
55360
|
-
name: 'pointerup',
|
|
55361
|
-
env: 'document',
|
|
55362
|
-
callback: globalPointerupCallback
|
|
55363
|
-
});
|
|
55364
|
-
eventManager.globalEventListeners.push({
|
|
55365
|
-
name: 'pointerdown',
|
|
55366
|
-
env: 'document',
|
|
55367
|
-
callback: globalPointerdownCallback
|
|
55368
|
-
});
|
|
55369
|
-
vglobal.addEventListener('pointerup', globalPointerupCallback);
|
|
55370
|
-
vglobal.addEventListener('pointerdown', globalPointerdownCallback);
|
|
55371
55465
|
table.scenegraph.tableGroup.addEventListener('pointerdown', (e) => {
|
|
55372
55466
|
if (table.hasListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE)) {
|
|
55373
55467
|
table.fireListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE, {
|
|
@@ -56580,13 +56674,27 @@
|
|
|
56580
56674
|
const globalPointerdownCallback = (e) => {
|
|
56581
56675
|
table.eventManager.LastBodyPointerXY = { x: e.x, y: e.y };
|
|
56582
56676
|
table.eventManager.isDown = true;
|
|
56677
|
+
const target = e.target;
|
|
56678
|
+
if (!table.getElement().contains(target) && !table.internalProps.menuHandler.containElement(target)) {
|
|
56679
|
+
const isCompleteEdit = table.editorManager?.completeEdit(e);
|
|
56680
|
+
getPromiseValue(isCompleteEdit, isCompleteEdit => {
|
|
56681
|
+
if (isCompleteEdit === false) {
|
|
56682
|
+
return;
|
|
56683
|
+
}
|
|
56684
|
+
if (table.options.select?.outsideClickDeselect) {
|
|
56685
|
+
const isHasSelected = !!stateManager.select.ranges?.length;
|
|
56686
|
+
eventManager.dealTableSelect();
|
|
56687
|
+
stateManager.endSelectCells(true, isHasSelected);
|
|
56688
|
+
}
|
|
56689
|
+
});
|
|
56690
|
+
}
|
|
56583
56691
|
};
|
|
56584
56692
|
eventManager.globalEventListeners.push({
|
|
56585
56693
|
name: 'pointerdown',
|
|
56586
|
-
env: '
|
|
56694
|
+
env: 'vglobal',
|
|
56587
56695
|
callback: globalPointerdownCallback
|
|
56588
56696
|
});
|
|
56589
|
-
|
|
56697
|
+
vglobal.addEventListener('pointerdown', globalPointerdownCallback);
|
|
56590
56698
|
const globalPointerupOutsideCallback = (e) => {
|
|
56591
56699
|
if (stateManager.menu.isShow) {
|
|
56592
56700
|
setTimeout(() => {
|
|
@@ -56644,13 +56752,25 @@
|
|
|
56644
56752
|
const endMoveColSuccess = table.stateManager.endMoveCol();
|
|
56645
56753
|
fireMoveColEventListeners(table, endMoveColSuccess, e);
|
|
56646
56754
|
}
|
|
56755
|
+
else if (table.editorManager.editingEditor) {
|
|
56756
|
+
if (!table.getElement().contains(target)) {
|
|
56757
|
+
const isCompleteEdit = table.editorManager?.completeEdit(e);
|
|
56758
|
+
getPromiseValue(isCompleteEdit, (isCompleteEdit) => {
|
|
56759
|
+
if (isCompleteEdit === false) {
|
|
56760
|
+
return;
|
|
56761
|
+
}
|
|
56762
|
+
stateManager.updateInteractionState(InteractionState.default);
|
|
56763
|
+
eventManager.dealTableHover();
|
|
56764
|
+
});
|
|
56765
|
+
}
|
|
56766
|
+
}
|
|
56647
56767
|
};
|
|
56648
56768
|
eventManager.globalEventListeners.push({
|
|
56649
56769
|
name: 'pointerup',
|
|
56650
|
-
env: '
|
|
56770
|
+
env: 'vglobal',
|
|
56651
56771
|
callback: globalPointerupCallback
|
|
56652
56772
|
});
|
|
56653
|
-
|
|
56773
|
+
vglobal.addEventListener('pointerup', globalPointerupCallback);
|
|
56654
56774
|
const globalPointermoveCallback = (e) => {
|
|
56655
56775
|
if (table.eventManager.isDown && table.eventManager.LastBodyPointerXY) {
|
|
56656
56776
|
const lastX = table.eventManager.LastBodyPointerXY?.x ?? e.x;
|
|
@@ -56784,10 +56904,10 @@
|
|
|
56784
56904
|
};
|
|
56785
56905
|
eventManager.globalEventListeners.push({
|
|
56786
56906
|
name: 'pointermove',
|
|
56787
|
-
env: '
|
|
56907
|
+
env: 'vglobal',
|
|
56788
56908
|
callback: globalPointermoveCallback
|
|
56789
56909
|
});
|
|
56790
|
-
|
|
56910
|
+
vglobal.addEventListener('pointermove', globalPointermoveCallback);
|
|
56791
56911
|
}
|
|
56792
56912
|
|
|
56793
56913
|
function bindTouchListener(eventManager) {
|
|
@@ -56800,9 +56920,10 @@
|
|
|
56800
56920
|
return;
|
|
56801
56921
|
}
|
|
56802
56922
|
eventManager.isTouchdown = true;
|
|
56923
|
+
const touchEvent = e.nativeEvent;
|
|
56803
56924
|
eventManager.touchMovePoints.push({
|
|
56804
|
-
x: e.page.x,
|
|
56805
|
-
y: e.page.y,
|
|
56925
|
+
x: touchEvent.changedTouches?.[0]?._canvasX ?? e.canvas?.x ?? e.page.x,
|
|
56926
|
+
y: touchEvent.changedTouches?.[0]?._canvasY ?? e.canvas?.y ?? e.page.y,
|
|
56806
56927
|
timestamp: Date.now()
|
|
56807
56928
|
});
|
|
56808
56929
|
});
|
|
@@ -56821,8 +56942,8 @@
|
|
|
56821
56942
|
eventManager.touchMovePoints.shift();
|
|
56822
56943
|
}
|
|
56823
56944
|
eventManager.touchMovePoints.push({
|
|
56824
|
-
x: e.changedTouches[0].pageX,
|
|
56825
|
-
y: e.changedTouches[0].pageY,
|
|
56945
|
+
x: e.changedTouches[0]._canvasX ?? e.changedTouches[0].pageX,
|
|
56946
|
+
y: e.changedTouches[0]._canvasY ?? e.changedTouches[0].pageY,
|
|
56826
56947
|
timestamp: Date.now()
|
|
56827
56948
|
});
|
|
56828
56949
|
if (eventManager._enableTableScroll) {
|
|
@@ -56840,10 +56961,10 @@
|
|
|
56840
56961
|
}
|
|
56841
56962
|
}
|
|
56842
56963
|
};
|
|
56843
|
-
|
|
56964
|
+
vglobal.addEventListener('touchmove', globalTouchMoveCallback, { passive: false });
|
|
56844
56965
|
eventManager.globalEventListeners.push({
|
|
56845
56966
|
name: 'touchmove',
|
|
56846
|
-
env: '
|
|
56967
|
+
env: 'vglobal',
|
|
56847
56968
|
callback: globalTouchMoveCallback
|
|
56848
56969
|
});
|
|
56849
56970
|
const globalTouchEndCallback = (e) => {
|
|
@@ -56861,8 +56982,8 @@
|
|
|
56861
56982
|
eventManager.touchMovePoints.shift();
|
|
56862
56983
|
}
|
|
56863
56984
|
eventManager.touchMovePoints.push({
|
|
56864
|
-
x: e.changedTouches[0].pageX,
|
|
56865
|
-
y: e.changedTouches[0].pageY,
|
|
56985
|
+
x: e.changedTouches[0]._canvasX ?? e.changedTouches[0].pageX,
|
|
56986
|
+
y: e.changedTouches[0]._canvasY ?? e.changedTouches[0].pageY,
|
|
56866
56987
|
timestamp: Date.now()
|
|
56867
56988
|
});
|
|
56868
56989
|
if (eventManager._enableTableScroll) {
|
|
@@ -56880,10 +57001,10 @@
|
|
|
56880
57001
|
eventManager.isTouchdown = false;
|
|
56881
57002
|
eventManager.touchMovePoints = [];
|
|
56882
57003
|
};
|
|
56883
|
-
|
|
57004
|
+
vglobal.addEventListener('touchend', globalTouchEndCallback);
|
|
56884
57005
|
eventManager.globalEventListeners.push({
|
|
56885
57006
|
name: 'touchend',
|
|
56886
|
-
env: '
|
|
57007
|
+
env: 'vglobal',
|
|
56887
57008
|
callback: globalTouchEndCallback
|
|
56888
57009
|
});
|
|
56889
57010
|
const globalTouchCancelCallback = (e) => {
|
|
@@ -56895,10 +57016,10 @@
|
|
|
56895
57016
|
eventManager.isTouchdown = false;
|
|
56896
57017
|
eventManager.touchMovePoints = [];
|
|
56897
57018
|
};
|
|
56898
|
-
|
|
57019
|
+
vglobal.addEventListener('touchcancel', globalTouchCancelCallback);
|
|
56899
57020
|
eventManager.globalEventListeners.push({
|
|
56900
57021
|
name: 'touchcancel',
|
|
56901
|
-
env: '
|
|
57022
|
+
env: 'vglobal',
|
|
56902
57023
|
callback: globalTouchCancelCallback
|
|
56903
57024
|
});
|
|
56904
57025
|
}
|
|
@@ -57690,6 +57811,9 @@
|
|
|
57690
57811
|
else if (item.env === 'window') {
|
|
57691
57812
|
window.removeEventListener(item.name, item.callback);
|
|
57692
57813
|
}
|
|
57814
|
+
else if (item.env === 'vglobal') {
|
|
57815
|
+
vglobal.removeEventListener(item.name, item.callback);
|
|
57816
|
+
}
|
|
57693
57817
|
});
|
|
57694
57818
|
this.globalEventListeners = [];
|
|
57695
57819
|
}
|
|
@@ -62307,7 +62431,7 @@
|
|
|
62307
62431
|
return TABLE_EVENT_TYPE;
|
|
62308
62432
|
}
|
|
62309
62433
|
options;
|
|
62310
|
-
version = "1.18.
|
|
62434
|
+
version = "1.18.2-alpha.2";
|
|
62311
62435
|
pagination;
|
|
62312
62436
|
id = `VTable${Date.now()}`;
|
|
62313
62437
|
headerStyleCache;
|
|
@@ -63257,6 +63381,14 @@
|
|
|
63257
63381
|
const w = this.getColsWidth(0, this.internalProps.colCount - 1);
|
|
63258
63382
|
return w;
|
|
63259
63383
|
}
|
|
63384
|
+
getColsWidths() {
|
|
63385
|
+
const maxCount = this.colCount;
|
|
63386
|
+
const widths = [];
|
|
63387
|
+
for (let col = 0; col < maxCount; col++) {
|
|
63388
|
+
widths.push(this.getColWidth(col));
|
|
63389
|
+
}
|
|
63390
|
+
return widths;
|
|
63391
|
+
}
|
|
63260
63392
|
getMaxColWidth(col) {
|
|
63261
63393
|
const obj = this.colWidthsLimit[col];
|
|
63262
63394
|
let max = (obj && obj.max) ?? Infinity;
|
|
@@ -69432,6 +69564,7 @@
|
|
|
69432
69564
|
return this.dataSource.records.length;
|
|
69433
69565
|
}
|
|
69434
69566
|
updateColumns(columns) {
|
|
69567
|
+
this.scenegraph.clearCells();
|
|
69435
69568
|
const oldHoverState = { col: this.stateManager.hover.cellPos.col, row: this.stateManager.hover.cellPos.row };
|
|
69436
69569
|
this.internalProps.columns = cloneDeepSpec(columns, ['children']);
|
|
69437
69570
|
generateAggregationForColumn(this);
|
|
@@ -69444,7 +69577,6 @@
|
|
|
69444
69577
|
this.dataSource.processRecords(this.dataSource.dataSourceObj?.records ?? this.dataSource.dataSourceObj);
|
|
69445
69578
|
}
|
|
69446
69579
|
this.internalProps.useOneRowHeightFillAll = false;
|
|
69447
|
-
this.scenegraph.clearCells();
|
|
69448
69580
|
this.headerStyleCache = new Map();
|
|
69449
69581
|
this.bodyStyleCache = new Map();
|
|
69450
69582
|
this.bodyBottomStyleCache = new Map();
|
|
@@ -69509,7 +69641,9 @@
|
|
|
69509
69641
|
if (record?.vtableMerge) {
|
|
69510
69642
|
return '';
|
|
69511
69643
|
}
|
|
69512
|
-
|
|
69644
|
+
if (!table.internalProps.layoutMap.isAggregation(col, row)) {
|
|
69645
|
+
value = this.dataSource.getGroupSeriesNumber(row - this.columnHeaderLevelCount);
|
|
69646
|
+
}
|
|
69513
69647
|
}
|
|
69514
69648
|
else {
|
|
69515
69649
|
value = row - this.columnHeaderLevelCount + 1;
|
|
@@ -69640,7 +69774,9 @@
|
|
|
69640
69774
|
}
|
|
69641
69775
|
return ifCan;
|
|
69642
69776
|
}
|
|
69643
|
-
updateOption(options
|
|
69777
|
+
updateOption(options, updateConfig = {
|
|
69778
|
+
keepData: false
|
|
69779
|
+
}) {
|
|
69644
69780
|
const internalProps = this.internalProps;
|
|
69645
69781
|
super.updateOption(options);
|
|
69646
69782
|
internalProps.frozenColDragHeaderMode =
|
|
@@ -69662,10 +69798,18 @@
|
|
|
69662
69798
|
this.internalProps.useOneRowHeightFillAll = false;
|
|
69663
69799
|
this.internalProps.columnWidthConfig = options.columnWidthConfig;
|
|
69664
69800
|
if (internalProps.releaseList) {
|
|
69665
|
-
internalProps.releaseList.
|
|
69666
|
-
|
|
69801
|
+
for (let i = internalProps.releaseList.length - 1; i >= 0; i--) {
|
|
69802
|
+
const releaseObj = internalProps.releaseList[i];
|
|
69803
|
+
if (updateConfig.keepData && releaseObj instanceof DataSource) {
|
|
69804
|
+
releaseObj.updateColumns(this.internalProps.columns);
|
|
69805
|
+
}
|
|
69806
|
+
else {
|
|
69807
|
+
releaseObj?.release?.();
|
|
69808
|
+
internalProps.releaseList.splice(i, 1);
|
|
69809
|
+
}
|
|
69810
|
+
}
|
|
69667
69811
|
}
|
|
69668
|
-
if (options.dataSource) {
|
|
69812
|
+
if (options.dataSource && this.dataSource !== options.dataSource) {
|
|
69669
69813
|
this.dataSource = options.dataSource;
|
|
69670
69814
|
}
|
|
69671
69815
|
else if (options.records) {
|
|
@@ -69674,6 +69818,7 @@
|
|
|
69674
69818
|
});
|
|
69675
69819
|
}
|
|
69676
69820
|
else {
|
|
69821
|
+
this.refreshRowColCount();
|
|
69677
69822
|
this._resetFrozenColCount();
|
|
69678
69823
|
this.scenegraph.createSceneGraph();
|
|
69679
69824
|
this.render();
|
|
@@ -79061,10 +79206,10 @@
|
|
|
79061
79206
|
needLowestLevel_colPaths = true;
|
|
79062
79207
|
needLowestLevel_rowPaths = true;
|
|
79063
79208
|
}
|
|
79064
|
-
if (colHeaderPaths.length >= this.
|
|
79209
|
+
if (colHeaderPaths.length >= this._getColumnHeaderTreeExpandedMaxLevelCount()) {
|
|
79065
79210
|
needLowestLevel_colPaths = true;
|
|
79066
79211
|
}
|
|
79067
|
-
if (rowHeaderPaths.length >= this.
|
|
79212
|
+
if (rowHeaderPaths.length >= this._getRowHeaderTreeExpandedMaxLevelCount()) {
|
|
79068
79213
|
needLowestLevel_rowPaths = true;
|
|
79069
79214
|
}
|
|
79070
79215
|
let col;
|
|
@@ -85167,7 +85312,7 @@
|
|
|
85167
85312
|
}
|
|
85168
85313
|
|
|
85169
85314
|
registerForVrender();
|
|
85170
|
-
const version = "1.18.
|
|
85315
|
+
const version = "1.18.2-alpha.2";
|
|
85171
85316
|
function getIcons() {
|
|
85172
85317
|
return get$2();
|
|
85173
85318
|
}
|