@bizy/core 20.6.2 → 20.6.3
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 +34 -26
- package/fesm2022/bizy-core.mjs.map +1 -1
- package/package.json +1 -1
package/fesm2022/bizy-core.mjs
CHANGED
|
@@ -4,7 +4,6 @@ import * as i1 from '@angular/common';
|
|
|
4
4
|
import { CommonModule, DOCUMENT, registerLocaleData, DatePipe } from '@angular/common';
|
|
5
5
|
import { BehaviorSubject, Subject, Subscription, filter, take as take$1, skip, auditTime, throttleTime, debounceTime as debounceTime$1, interval, fromEvent, merge } from 'rxjs';
|
|
6
6
|
import { skipWhile, take, debounceTime, distinctUntilChanged, takeUntil, map, filter as filter$1 } from 'rxjs/operators';
|
|
7
|
-
import html2canvas from 'html2canvas';
|
|
8
7
|
import * as i2 from 'angular-calendar';
|
|
9
8
|
import { CalendarNativeDateFormatter, CalendarModule, CalendarUtils, CalendarA11y, CalendarEventTitleFormatter, DateAdapter, CalendarDateFormatter } from 'angular-calendar';
|
|
10
9
|
import { isSameMonth, isSameDay } from 'date-fns';
|
|
@@ -976,15 +975,18 @@ class BizyBarLineChartComponent {
|
|
|
976
975
|
};
|
|
977
976
|
showAllLegends(this.#echarts);
|
|
978
977
|
setTimeout(() => {
|
|
979
|
-
html2canvas
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
978
|
+
import('html2canvas').then(module => {
|
|
979
|
+
const html2canvas = module.default;
|
|
980
|
+
html2canvas(this.#chartContainer).then(canvas => {
|
|
981
|
+
var link = this.#renderer.createElement('a');
|
|
982
|
+
link.href = canvas.toDataURL('image/png');
|
|
983
|
+
link.download = downloadName;
|
|
984
|
+
this.#renderer.appendChild(this.#document.body, link);
|
|
985
|
+
link.click();
|
|
986
|
+
this.#renderer.removeChild(this.#document.body, link);
|
|
987
|
+
restoreLegendType(this.#echarts);
|
|
988
|
+
this.onDownload.emit();
|
|
989
|
+
});
|
|
988
990
|
});
|
|
989
991
|
}, 500);
|
|
990
992
|
}
|
|
@@ -3679,14 +3681,17 @@ class BizyHeatMapChartComponent {
|
|
|
3679
3681
|
title: downloadTitle,
|
|
3680
3682
|
onclick: () => {
|
|
3681
3683
|
setTimeout(() => {
|
|
3682
|
-
html2canvas
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3684
|
+
import('html2canvas').then(module => {
|
|
3685
|
+
const html2canvas = module.default;
|
|
3686
|
+
html2canvas(this.#chartContainer).then(canvas => {
|
|
3687
|
+
var link = this.#renderer.createElement('a');
|
|
3688
|
+
link.href = canvas.toDataURL('image/png');
|
|
3689
|
+
link.download = downloadName;
|
|
3690
|
+
this.#renderer.appendChild(this.#document.body, link);
|
|
3691
|
+
link.click();
|
|
3692
|
+
this.#renderer.removeChild(this.#document.body, link);
|
|
3693
|
+
this.onDownload.emit();
|
|
3694
|
+
});
|
|
3690
3695
|
});
|
|
3691
3696
|
}, 500);
|
|
3692
3697
|
}
|
|
@@ -4287,14 +4292,17 @@ class BizyPieChartComponent {
|
|
|
4287
4292
|
title: downloadTitle,
|
|
4288
4293
|
onclick: () => {
|
|
4289
4294
|
setTimeout(() => {
|
|
4290
|
-
html2canvas
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4295
|
+
import('html2canvas').then(module => {
|
|
4296
|
+
const html2canvas = module.default;
|
|
4297
|
+
html2canvas(this.#chartContainer).then(canvas => {
|
|
4298
|
+
var link = this.#renderer.createElement('a');
|
|
4299
|
+
link.href = canvas.toDataURL('image/png');
|
|
4300
|
+
link.download = downloadName;
|
|
4301
|
+
this.#renderer.appendChild(this.#document.body, link);
|
|
4302
|
+
link.click();
|
|
4303
|
+
this.#renderer.removeChild(this.#document.body, link);
|
|
4304
|
+
this.onDownload.emit();
|
|
4305
|
+
});
|
|
4298
4306
|
});
|
|
4299
4307
|
}, 500);
|
|
4300
4308
|
}
|