intelica-library-ui 0.1.61 → 0.1.62
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.
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, Injectable, signal, Pipe, Component, TemplateRef, ContentChild, Input, Directive, EventEmitter, forwardRef, Output, HostListener, ContentChildren, ViewChild } from '@angular/core';
|
|
2
|
+
import { inject, Injectable, signal, Pipe, Component, TemplateRef, ContentChild, Input, Directive, EventEmitter, forwardRef, Output, HostListener, ContentChildren, ViewChild, PLATFORM_ID, Inject } from '@angular/core';
|
|
3
3
|
import { getCookie, Cookies, setCookie } from 'typescript-cookie';
|
|
4
4
|
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
5
5
|
import { BehaviorSubject, catchError, throwError, from, switchMap, Subject, Subscription } from 'rxjs';
|
|
6
6
|
import Swal from 'sweetalert2';
|
|
7
7
|
import * as i1$1 from '@angular/common';
|
|
8
|
-
import { CommonModule } from '@angular/common';
|
|
8
|
+
import { CommonModule, isPlatformBrowser } from '@angular/common';
|
|
9
9
|
import * as i2$1 from 'primeng/table';
|
|
10
10
|
import { TableModule } from 'primeng/table';
|
|
11
11
|
import { BadgeModule } from 'primeng/badge';
|
|
@@ -27,6 +27,7 @@ import { InputGroupAddonModule } from 'primeng/inputgroupaddon';
|
|
|
27
27
|
import * as i3$2 from 'primeng/ripple';
|
|
28
28
|
import { RippleModule } from 'primeng/ripple';
|
|
29
29
|
import { Dialog } from 'primeng/dialog';
|
|
30
|
+
import * as echarts from 'echarts';
|
|
30
31
|
import * as XLSX from 'xlsx';
|
|
31
32
|
import { Workbook } from 'exceljs';
|
|
32
33
|
import { saveAs } from 'file-saver';
|
|
@@ -2442,6 +2443,60 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
2442
2443
|
type: Input
|
|
2443
2444
|
}] } });
|
|
2444
2445
|
|
|
2446
|
+
class EchartComponent {
|
|
2447
|
+
el;
|
|
2448
|
+
platformId;
|
|
2449
|
+
config;
|
|
2450
|
+
id;
|
|
2451
|
+
event = new EventEmitter();
|
|
2452
|
+
chart;
|
|
2453
|
+
constructor(el, platformId) {
|
|
2454
|
+
this.el = el;
|
|
2455
|
+
this.platformId = platformId;
|
|
2456
|
+
}
|
|
2457
|
+
ngAfterViewInit() {
|
|
2458
|
+
const chartElement = this.el.nativeElement.querySelector(`#${this.id}_plot`);
|
|
2459
|
+
if (!this.config) {
|
|
2460
|
+
console.log('Set chart configuration');
|
|
2461
|
+
return;
|
|
2462
|
+
}
|
|
2463
|
+
if (!isPlatformBrowser(this.platformId)) {
|
|
2464
|
+
console.log('Not Browser platform');
|
|
2465
|
+
return;
|
|
2466
|
+
}
|
|
2467
|
+
if (!chartElement) {
|
|
2468
|
+
console.log('Plot area not found');
|
|
2469
|
+
return;
|
|
2470
|
+
}
|
|
2471
|
+
this.initChart(chartElement);
|
|
2472
|
+
}
|
|
2473
|
+
refreshChart() {
|
|
2474
|
+
this.chart.setOption(this.config);
|
|
2475
|
+
}
|
|
2476
|
+
initChart(chartElement) {
|
|
2477
|
+
this.chart = echarts.init(chartElement);
|
|
2478
|
+
this.chart.setOption(this.config);
|
|
2479
|
+
this.chart.on('click', (params) => {
|
|
2480
|
+
this.event.emit(params);
|
|
2481
|
+
});
|
|
2482
|
+
}
|
|
2483
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: EchartComponent, deps: [{ token: i0.ElementRef }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component });
|
|
2484
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: EchartComponent, isStandalone: true, selector: "intelica-echart", inputs: { config: "config", id: "id" }, outputs: { event: "event" }, ngImport: i0, template: "<div [id]=\"id + '_plot'\" class=\"chart\" style=\"width: 100%; height: 400px\"></div>\r\n" });
|
|
2485
|
+
}
|
|
2486
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: EchartComponent, decorators: [{
|
|
2487
|
+
type: Component,
|
|
2488
|
+
args: [{ selector: 'intelica-echart', imports: [], template: "<div [id]=\"id + '_plot'\" class=\"chart\" style=\"width: 100%; height: 400px\"></div>\r\n" }]
|
|
2489
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: Object, decorators: [{
|
|
2490
|
+
type: Inject,
|
|
2491
|
+
args: [PLATFORM_ID]
|
|
2492
|
+
}] }], propDecorators: { config: [{
|
|
2493
|
+
type: Input
|
|
2494
|
+
}], id: [{
|
|
2495
|
+
type: Input
|
|
2496
|
+
}], event: [{
|
|
2497
|
+
type: Output
|
|
2498
|
+
}] } });
|
|
2499
|
+
|
|
2445
2500
|
class HtmlToExcelService {
|
|
2446
2501
|
ExportTOExcel(idTabla, html, filename, tabname, extension) {
|
|
2447
2502
|
let Table = document.getElementById(idTabla);
|
|
@@ -2766,6 +2821,78 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
2766
2821
|
}]
|
|
2767
2822
|
}] });
|
|
2768
2823
|
|
|
2824
|
+
class EchartService {
|
|
2825
|
+
getDefaultSeriesColors() {
|
|
2826
|
+
return ['#FF5733', 'red', '#FFBD33', '#FF33A1', '#33FF57', '#3357FF'];
|
|
2827
|
+
}
|
|
2828
|
+
getTooltipCssText() {
|
|
2829
|
+
return 'border-color: red; font-family: Consolas, monospace;';
|
|
2830
|
+
}
|
|
2831
|
+
getTooltipFormatter(htmlContent) {
|
|
2832
|
+
return `
|
|
2833
|
+
<div>
|
|
2834
|
+
${htmlContent}
|
|
2835
|
+
</div>
|
|
2836
|
+
`;
|
|
2837
|
+
}
|
|
2838
|
+
getDefultAxisConfiguration(type, show = true, data) {
|
|
2839
|
+
let axis = {
|
|
2840
|
+
show: show,
|
|
2841
|
+
type: type,
|
|
2842
|
+
data: data,
|
|
2843
|
+
axisTick: {
|
|
2844
|
+
show: false,
|
|
2845
|
+
},
|
|
2846
|
+
axisLine: {
|
|
2847
|
+
show: false,
|
|
2848
|
+
},
|
|
2849
|
+
splitLine: {
|
|
2850
|
+
show: false,
|
|
2851
|
+
},
|
|
2852
|
+
};
|
|
2853
|
+
return axis;
|
|
2854
|
+
}
|
|
2855
|
+
getRateDoughnutPie(data) {
|
|
2856
|
+
const rateData = data.find((d) => d.name.toLowerCase() !== 'placeholder');
|
|
2857
|
+
return {
|
|
2858
|
+
tooltip: {
|
|
2859
|
+
trigger: 'none',
|
|
2860
|
+
},
|
|
2861
|
+
series: [
|
|
2862
|
+
{
|
|
2863
|
+
name: 'RateDoughnutPie',
|
|
2864
|
+
type: 'pie',
|
|
2865
|
+
tooltip: {
|
|
2866
|
+
trigger: 'none',
|
|
2867
|
+
},
|
|
2868
|
+
radius: ['70%', '60%'],
|
|
2869
|
+
data: data,
|
|
2870
|
+
startAngle: 0,
|
|
2871
|
+
selectedMode: false,
|
|
2872
|
+
silent: true,
|
|
2873
|
+
label: {
|
|
2874
|
+
show: true,
|
|
2875
|
+
formatter: function (_) {
|
|
2876
|
+
return `${rateData.name}`;
|
|
2877
|
+
},
|
|
2878
|
+
color: rateData.itemStyle.color,
|
|
2879
|
+
fontSize: '40',
|
|
2880
|
+
position: 'center',
|
|
2881
|
+
},
|
|
2882
|
+
},
|
|
2883
|
+
],
|
|
2884
|
+
};
|
|
2885
|
+
}
|
|
2886
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: EchartService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2887
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: EchartService, providedIn: 'root' });
|
|
2888
|
+
}
|
|
2889
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: EchartService, decorators: [{
|
|
2890
|
+
type: Injectable,
|
|
2891
|
+
args: [{
|
|
2892
|
+
providedIn: 'root',
|
|
2893
|
+
}]
|
|
2894
|
+
}] });
|
|
2895
|
+
|
|
2769
2896
|
/**
|
|
2770
2897
|
* Función de comparación genérica para ordenar objetos por un campo específico.
|
|
2771
2898
|
*
|
|
@@ -5133,5 +5260,5 @@ const IntelicaTheme = definePreset(Aura, {
|
|
|
5133
5260
|
* Generated bundle index. Do not edit.
|
|
5134
5261
|
*/
|
|
5135
5262
|
|
|
5136
|
-
export { ActionDirective, ActionsMenuComponent, ButtonSplitComponent, ColumnComponent, ColumnGroupComponent, CompareByField, ConfigService, CookieAttributesGeneral, DynamicInputValidation, EmailInputValidation, ErrorInterceptor, FeatureFlagService, GlobalFeatureFlagService, GlobalTermService, HtmlToExcelService, InitializeConfigService, InputValidation, IntelicaTheme, ItemSplitDirective, LanguageService, ModalDialogComponent, OrderConstants, PaginatorComponent, Patterns, PopoverComponent, RecordPerPageComponent, RefreshTokenInterceptor, RowResumenComponent, SearchComponent, SharedService, SortingComponent, SpinnerComponent, SpinnerService, SweetAlertService, TableComponent, TermGuard, TermPipe, TermService, encryptData };
|
|
5263
|
+
export { ActionDirective, ActionsMenuComponent, ButtonSplitComponent, ColumnComponent, ColumnGroupComponent, CompareByField, ConfigService, CookieAttributesGeneral, DynamicInputValidation, EchartComponent, EchartService, EmailInputValidation, ErrorInterceptor, FeatureFlagService, GlobalFeatureFlagService, GlobalTermService, HtmlToExcelService, InitializeConfigService, InputValidation, IntelicaTheme, ItemSplitDirective, LanguageService, ModalDialogComponent, OrderConstants, PaginatorComponent, Patterns, PopoverComponent, RecordPerPageComponent, RefreshTokenInterceptor, RowResumenComponent, SearchComponent, SharedService, SortingComponent, SpinnerComponent, SpinnerService, SweetAlertService, TableComponent, TermGuard, TermPipe, TermService, encryptData };
|
|
5137
5264
|
//# sourceMappingURL=intelica-library-ui.mjs.map
|