@bizy/core 20.5.3 → 20.5.4
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/fesm2022/bizy-core.mjs +24 -12
- package/fesm2022/bizy-core.mjs.map +1 -1
- package/package.json +1 -1
package/fesm2022/bizy-core.mjs
CHANGED
|
@@ -740,7 +740,8 @@ class BizyBarLineChartComponent {
|
|
|
740
740
|
onSelect = new EventEmitter();
|
|
741
741
|
#echarts = null;
|
|
742
742
|
#resizeObserver = null;
|
|
743
|
-
#
|
|
743
|
+
#afterViewInitSubscription = new Subscription();
|
|
744
|
+
#resizeSubscription = new Subscription();
|
|
744
745
|
#chartContainer = null;
|
|
745
746
|
#afterViewInit = new BehaviorSubject(false);
|
|
746
747
|
#resize$ = new Subject();
|
|
@@ -770,7 +771,7 @@ class BizyBarLineChartComponent {
|
|
|
770
771
|
this.#leftYAxis = 0;
|
|
771
772
|
this.#chartStacks = [];
|
|
772
773
|
this.#chartNames = [];
|
|
773
|
-
this.#
|
|
774
|
+
this.#afterViewInitSubscription.add(this.#afterViewInit.pipe(filter(value => value === true), take$1(1)).subscribe(() => {
|
|
774
775
|
this.#createChartContainer();
|
|
775
776
|
if (!this.#chartContainer) {
|
|
776
777
|
return;
|
|
@@ -1014,10 +1015,12 @@ class BizyBarLineChartComponent {
|
|
|
1014
1015
|
this.#echarts.on('click', params => {
|
|
1015
1016
|
this.onSelect.emit(params.name);
|
|
1016
1017
|
});
|
|
1018
|
+
this.#resizeSubscription.unsubscribe();
|
|
1017
1019
|
this.#resizeObserver = new ResizeObserver(() => this.#resize$.next());
|
|
1018
1020
|
const resizeRef = this.resizeRef ? this.resizeRef : this.#renderer.parentNode(this.#elementRef.nativeElement) ? this.#renderer.parentNode(this.#elementRef.nativeElement) : this.#elementRef.nativeElement;
|
|
1019
1021
|
this.#resizeObserver.observe(resizeRef);
|
|
1020
|
-
this.#
|
|
1022
|
+
this.#resizeSubscription = new Subscription();
|
|
1023
|
+
this.#resizeSubscription.add(this.#resize$.pipe(skip(1), auditTime(300), throttleTime(500)).subscribe(() => {
|
|
1021
1024
|
this.#deleteChartContainer();
|
|
1022
1025
|
this.#createChartContainer();
|
|
1023
1026
|
if (!this.#chartContainer) {
|
|
@@ -1069,7 +1072,8 @@ class BizyBarLineChartComponent {
|
|
|
1069
1072
|
return rootValue;
|
|
1070
1073
|
};
|
|
1071
1074
|
ngOnDestroy() {
|
|
1072
|
-
this.#
|
|
1075
|
+
this.#afterViewInitSubscription.unsubscribe();
|
|
1076
|
+
this.#resizeSubscription.unsubscribe();
|
|
1073
1077
|
if (this.#resizeObserver) {
|
|
1074
1078
|
this.#resizeObserver.disconnect();
|
|
1075
1079
|
}
|
|
@@ -3588,7 +3592,8 @@ class BizyHeatMapChartComponent {
|
|
|
3588
3592
|
onSelect = new EventEmitter();
|
|
3589
3593
|
#echarts = null;
|
|
3590
3594
|
#resizeObserver = null;
|
|
3591
|
-
#
|
|
3595
|
+
#afterViewInitSubscription = new Subscription();
|
|
3596
|
+
#resizeSubscription = new Subscription();
|
|
3592
3597
|
#chartContainer = null;
|
|
3593
3598
|
#afterViewInit = new BehaviorSubject(false);
|
|
3594
3599
|
#resize$ = new Subject();
|
|
@@ -3610,7 +3615,7 @@ class BizyHeatMapChartComponent {
|
|
|
3610
3615
|
}
|
|
3611
3616
|
async #setChartData(data) {
|
|
3612
3617
|
this.#data = data;
|
|
3613
|
-
this.#
|
|
3618
|
+
this.#afterViewInitSubscription.add(this.#afterViewInit.pipe(filter(value => value === true), take$1(1)).subscribe(() => {
|
|
3614
3619
|
this.#createChartContainer();
|
|
3615
3620
|
if (!this.#chartContainer) {
|
|
3616
3621
|
return;
|
|
@@ -3711,10 +3716,12 @@ class BizyHeatMapChartComponent {
|
|
|
3711
3716
|
this.#echarts.on('click', params => {
|
|
3712
3717
|
this.onSelect.emit(params.name);
|
|
3713
3718
|
});
|
|
3719
|
+
this.#resizeSubscription.unsubscribe();
|
|
3714
3720
|
this.#resizeObserver = new ResizeObserver(() => this.#resize$.next());
|
|
3715
3721
|
const resizeRef = this.resizeRef ? this.resizeRef : this.#renderer.parentNode(this.#elementRef.nativeElement) ? this.#renderer.parentNode(this.#elementRef.nativeElement) : this.#elementRef.nativeElement;
|
|
3716
3722
|
this.#resizeObserver.observe(resizeRef);
|
|
3717
|
-
this.#
|
|
3723
|
+
this.#resizeSubscription = new Subscription();
|
|
3724
|
+
this.#resizeSubscription.add(this.#resize$.pipe(skip(1), auditTime(300), throttleTime(500)).subscribe(() => {
|
|
3718
3725
|
this.#deleteChartContainer();
|
|
3719
3726
|
this.#createChartContainer();
|
|
3720
3727
|
if (!this.#chartContainer) {
|
|
@@ -3766,7 +3773,8 @@ class BizyHeatMapChartComponent {
|
|
|
3766
3773
|
return rootValue;
|
|
3767
3774
|
};
|
|
3768
3775
|
ngOnDestroy() {
|
|
3769
|
-
this.#
|
|
3776
|
+
this.#afterViewInitSubscription.unsubscribe();
|
|
3777
|
+
this.#resizeSubscription.unsubscribe();
|
|
3770
3778
|
if (this.#resizeObserver) {
|
|
3771
3779
|
this.#resizeObserver.disconnect();
|
|
3772
3780
|
}
|
|
@@ -4055,7 +4063,8 @@ class BizyPieChartComponent {
|
|
|
4055
4063
|
onDownload = new EventEmitter();
|
|
4056
4064
|
#echarts = null;
|
|
4057
4065
|
#resizeObserver = null;
|
|
4058
|
-
#
|
|
4066
|
+
#afterViewInitSubscription = new Subscription();
|
|
4067
|
+
#resizeSubscription = new Subscription();
|
|
4059
4068
|
#chartContainer = null;
|
|
4060
4069
|
#afterViewInit = new BehaviorSubject(false);
|
|
4061
4070
|
#resize$ = new Subject();
|
|
@@ -4077,7 +4086,7 @@ class BizyPieChartComponent {
|
|
|
4077
4086
|
}
|
|
4078
4087
|
}
|
|
4079
4088
|
async #setChartData(data) {
|
|
4080
|
-
this.#
|
|
4089
|
+
this.#afterViewInitSubscription.add(this.#afterViewInit.pipe(filter(value => value === true), take$1(1)).subscribe(() => {
|
|
4081
4090
|
this.#createChartContainer();
|
|
4082
4091
|
if (!this.#chartContainer) {
|
|
4083
4092
|
return;
|
|
@@ -4223,10 +4232,12 @@ class BizyPieChartComponent {
|
|
|
4223
4232
|
this.#echarts.on('click', params => {
|
|
4224
4233
|
this.onSelect.emit(params.name);
|
|
4225
4234
|
});
|
|
4235
|
+
this.#resizeSubscription.unsubscribe();
|
|
4226
4236
|
this.#resizeObserver = new ResizeObserver(() => this.#resize$.next());
|
|
4227
4237
|
const resizeRef = this.resizeRef ? this.resizeRef : this.#renderer.parentNode(this.#elementRef.nativeElement) ? this.#renderer.parentNode(this.#elementRef.nativeElement) : this.#elementRef.nativeElement;
|
|
4228
4238
|
this.#resizeObserver.observe(resizeRef);
|
|
4229
|
-
this.#
|
|
4239
|
+
this.#resizeSubscription = new Subscription();
|
|
4240
|
+
this.#resizeSubscription.add(this.#resize$.pipe(skip(1), auditTime(300), throttleTime(500)).subscribe(() => {
|
|
4230
4241
|
this.#deleteChartContainer();
|
|
4231
4242
|
this.#createChartContainer();
|
|
4232
4243
|
if (!this.#chartContainer) {
|
|
@@ -4278,7 +4289,8 @@ class BizyPieChartComponent {
|
|
|
4278
4289
|
return rootValue || null;
|
|
4279
4290
|
};
|
|
4280
4291
|
ngOnDestroy() {
|
|
4281
|
-
this.#
|
|
4292
|
+
this.#afterViewInitSubscription.unsubscribe();
|
|
4293
|
+
this.#resizeSubscription.unsubscribe();
|
|
4282
4294
|
if (this.#resizeObserver) {
|
|
4283
4295
|
this.#resizeObserver.disconnect();
|
|
4284
4296
|
}
|