@bizy/core 20.5.2 → 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.
@@ -740,7 +740,8 @@ class BizyBarLineChartComponent {
740
740
  onSelect = new EventEmitter();
741
741
  #echarts = null;
742
742
  #resizeObserver = null;
743
- #subscription = new Subscription();
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.#subscription.add(this.#afterViewInit.pipe(filter(value => value === true), take$1(1)).subscribe(() => {
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.#subscription.add(this.#resize$.pipe(skip(1), auditTime(300), throttleTime(500)).subscribe(() => {
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.#subscription.unsubscribe();
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
- #subscription = new Subscription();
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.#subscription.add(this.#afterViewInit.pipe(filter(value => value === true), take$1(1)).subscribe(() => {
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.#subscription.add(this.#resize$.pipe(skip(1), auditTime(300), throttleTime(500)).subscribe(() => {
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.#subscription.unsubscribe();
3776
+ this.#afterViewInitSubscription.unsubscribe();
3777
+ this.#resizeSubscription.unsubscribe();
3770
3778
  if (this.#resizeObserver) {
3771
3779
  this.#resizeObserver.disconnect();
3772
3780
  }
@@ -4045,8 +4053,8 @@ class BizyPieChartComponent {
4045
4053
  #ref = inject(ChangeDetectorRef);
4046
4054
  #renderer = inject(Renderer2);
4047
4055
  resizeRef = null;
4048
- centerLabel = null;
4049
4056
  type = 'pie';
4057
+ centerLabel = null;
4050
4058
  legend = null;
4051
4059
  download = null;
4052
4060
  label = null;
@@ -4055,7 +4063,8 @@ class BizyPieChartComponent {
4055
4063
  onDownload = new EventEmitter();
4056
4064
  #echarts = null;
4057
4065
  #resizeObserver = null;
4058
- #subscription = new Subscription();
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.#subscription.add(this.#afterViewInit.pipe(filter(value => value === true), take$1(1)).subscribe(() => {
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.#subscription.add(this.#resize$.pipe(skip(1), auditTime(300), throttleTime(500)).subscribe(() => {
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.#subscription.unsubscribe();
4292
+ this.#afterViewInitSubscription.unsubscribe();
4293
+ this.#resizeSubscription.unsubscribe();
4282
4294
  if (this.#resizeObserver) {
4283
4295
  this.#resizeObserver.disconnect();
4284
4296
  }
@@ -4287,7 +4299,7 @@ class BizyPieChartComponent {
4287
4299
  }
4288
4300
  }
4289
4301
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: BizyPieChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4290
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.5", type: BizyPieChartComponent, isStandalone: true, selector: "bizy-pie-chart", inputs: { resizeRef: "resizeRef", centerLabel: "centerLabel", type: "type", legend: "legend", download: "download", label: "label", tooltip: "tooltip", data: "data" }, outputs: { onSelect: "onSelect", onDownload: "onDownload" }, ngImport: i0, template: '', isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4302
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.5", type: BizyPieChartComponent, isStandalone: true, selector: "bizy-pie-chart", inputs: { resizeRef: "resizeRef", type: "type", centerLabel: "centerLabel", legend: "legend", download: "download", label: "label", tooltip: "tooltip", data: "data" }, outputs: { onSelect: "onSelect", onDownload: "onDownload" }, ngImport: i0, template: '', isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4291
4303
  }
4292
4304
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: BizyPieChartComponent, decorators: [{
4293
4305
  type: Component,
@@ -4299,10 +4311,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.5", ngImpor
4299
4311
  }]
4300
4312
  }], propDecorators: { resizeRef: [{
4301
4313
  type: Input
4302
- }], centerLabel: [{
4303
- type: Input
4304
4314
  }], type: [{
4305
4315
  type: Input
4316
+ }], centerLabel: [{
4317
+ type: Input
4306
4318
  }], legend: [{
4307
4319
  type: Input
4308
4320
  }], download: [{