yw-charts-library 0.0.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/index.d.ts ADDED
@@ -0,0 +1,741 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, EnvironmentProviders, OnInit, AfterViewInit, ElementRef, EnvironmentInjector, ApplicationRef, SimpleChanges, OnChanges, DoCheck, OnDestroy, ChangeDetectorRef, EventEmitter } from '@angular/core';
3
+ import { GridStackWidget } from 'gridstack';
4
+ import { LegendSettingsModel, TooltipSettingsModel, AccumulationDataLabelSettingsModel } from '@syncfusion/ej2-angular-charts';
5
+ import { CircularGaugeComponent } from '@syncfusion/ej2-angular-circulargauge';
6
+ import { FormGroup, FormBuilder, FormArray } from '@angular/forms';
7
+ import { NzMessageService } from 'ng-zorro-antd/message';
8
+
9
+ declare class YwChartsLibraryService {
10
+ constructor();
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<YwChartsLibraryService, never>;
12
+ static ɵprov: i0.ɵɵInjectableDeclaration<YwChartsLibraryService>;
13
+ }
14
+
15
+ declare class YwChartsLibraryComponent {
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<YwChartsLibraryComponent, never>;
17
+ static ɵcmp: i0.ɵɵComponentDeclaration<YwChartsLibraryComponent, "lib-yw-charts-library", never, {}, {}, never, never, true, never>;
18
+ }
19
+
20
+ interface SyncfusionConfig {
21
+ licenseKey: string;
22
+ }
23
+ declare const SYNCFUSION_CONFIG: InjectionToken<SyncfusionConfig>;
24
+
25
+ /**
26
+ * Provee la inicialización de la licencia de Syncfusion.
27
+ * El consumidor SOLO debe llamar a esta función desde su app.config.ts.
28
+ */
29
+ declare function provideSyncfusionLicense(config: SyncfusionConfig): EnvironmentProviders;
30
+
31
+ interface YwWidgetConfigInterface {
32
+ widgetId: string;
33
+ title: string;
34
+ typeComponent: string;
35
+ showConfigButtons?: boolean;
36
+ layoutConfig: YwWidgetLayoutInterface;
37
+ widgetStyle?: YwWidgetStyleInterface;
38
+ controlConfig: any;
39
+ controlTables: string[];
40
+ }
41
+ interface YwWidgetLayoutInterface extends GridStackWidget {
42
+ id: string;
43
+ autoPosition?: boolean;
44
+ x?: number;
45
+ y?: number;
46
+ w: number;
47
+ h: number;
48
+ content: any;
49
+ }
50
+ interface YwWidgetStyleInterface {
51
+ widgetBackgroundColor?: string;
52
+ widgetBorderColor?: string;
53
+ }
54
+ declare const DEFAULT_WIDGET_STYLE: YwWidgetStyleInterface;
55
+
56
+ interface YwDashboardLayoutInterface {
57
+ margin: number;
58
+ cellHeight: number;
59
+ columns: number;
60
+ float?: boolean;
61
+ noOverlap?: boolean;
62
+ resizable?: any;
63
+ columnOpts?: {
64
+ breakpointForWindow: boolean;
65
+ breakpoints: YwGridStackbreakpoints[];
66
+ layout: any;
67
+ };
68
+ }
69
+ interface YwGridStackbreakpoints {
70
+ w: number;
71
+ c: number;
72
+ }
73
+ interface YwDashboardConfigInterface {
74
+ showConfigButtons: boolean;
75
+ lockPositionWidgets: boolean;
76
+ layoutConfig: YwDashboardLayoutInterface;
77
+ controlListConfig: YwWidgetConfigInterface[];
78
+ }
79
+ interface YwDashboardDataInterface {
80
+ tableName: string;
81
+ tableData: any[];
82
+ }
83
+ interface YwDashboardStyleInterface {
84
+ canvasBackgroundColor: string;
85
+ widgetBackgroundColor: string;
86
+ widgetBorderColor: string;
87
+ }
88
+ declare const YwDashboardWidgetTypes: any[];
89
+
90
+ declare const YwDashboardWidgetFilterTypes: any[];
91
+ interface YwDashboardFilterConfigInterface {
92
+ showConfigButtons: boolean;
93
+ lockPositionWidgets: boolean;
94
+ controlListConfig: YwDashboardWidgetFilterConfigInterface[];
95
+ }
96
+ interface YwDashboardWidgetFilterConfigInterface {
97
+ widgetId: string;
98
+ typeComponent: string;
99
+ label: string;
100
+ clearTitleLabel?: string;
101
+ showConfigButtons?: boolean;
102
+ controlTable?: string;
103
+ controlFilterData?: any;
104
+ configComponent: YwBaseSlicerFilterConfig | YwButtonSlicerFilterConfig | YwListSlicerFilterConfig;
105
+ }
106
+ interface YwWidgetFilterConfigInterface {
107
+ widgetId: string;
108
+ typeComponent: string;
109
+ label: string;
110
+ clearTitleLabel?: string;
111
+ showConfigButtons?: boolean;
112
+ controlTable: string;
113
+ }
114
+ interface YwBaseSlicerFilterConfig {
115
+ dataType: string;
116
+ step?: any;
117
+ min?: any;
118
+ max?: any;
119
+ minCurrent?: any;
120
+ maxCurrent?: any;
121
+ filterField: string;
122
+ }
123
+ interface YwButtonSlicerFilterConfig {
124
+ dataType?: string;
125
+ allowMultiple?: boolean;
126
+ options: any[];
127
+ currentIds?: string[] | number[];
128
+ filterField: string;
129
+ filterFieldId: string;
130
+ }
131
+ interface YwListSlicerFilterConfig {
132
+ dataType: string;
133
+ minDate?: any;
134
+ maxDate?: any;
135
+ dateHierarchyType?: 'YEAR_TRIMESTER_MONTH' | 'YEAR_SEMESTER_MONTH' | 'SEMESTER_MONTH_WEEK';
136
+ rawData?: any;
137
+ currentSelectedId?: any;
138
+ filterField: string;
139
+ filterFieldN2?: string;
140
+ filterFieldN3?: string;
141
+ }
142
+
143
+ declare class YwDashboardComponent implements OnInit, AfterViewInit {
144
+ private environmentInjector;
145
+ private appRef;
146
+ gridContainer: ElementRef;
147
+ private grid;
148
+ private widgetsActivos;
149
+ showControls: i0.InputSignal<boolean>;
150
+ showFilter: i0.InputSignal<boolean>;
151
+ allIsLocked: i0.WritableSignal<boolean>;
152
+ drawerfiltervisible: boolean;
153
+ drawerconfigvisible: boolean;
154
+ drawerCurrentWidgetObject: any;
155
+ isLocked: boolean;
156
+ private countWidget;
157
+ layoutConfig: YwDashboardLayoutInterface;
158
+ dashboardStyle: YwDashboardStyleInterface;
159
+ dashboardConfig: YwDashboardConfigInterface;
160
+ dashboardData: YwDashboardDataInterface[];
161
+ dashboardItems: YwWidgetLayoutInterface[];
162
+ dashboardFilterConfig: YwDashboardFilterConfigInterface;
163
+ constructor(environmentInjector: EnvironmentInjector, appRef: ApplicationRef);
164
+ ngOnInit(): void;
165
+ ngOnChanges(changes: SimpleChanges): void;
166
+ ngAfterViewInit(): void;
167
+ private initCanvasGrid;
168
+ fn_getDataForWidgetComponent(listTables: string[], prmDashboardData: YwDashboardDataInterface[]): any;
169
+ fn_getDataForWidgetComponent_back(listTables: string[]): any[];
170
+ loadLayoutFromJSON(prmDashboardConfig: YwDashboardConfigInterface, prmDashboardStyle: YwDashboardStyleInterface): void;
171
+ saveLayoutToJSON(): YwWidgetLayoutInterface[];
172
+ fn_btn_addWidget(): void;
173
+ fn_btn_deleteWidget(): void;
174
+ fn_btn_lockPositionWidgets(): void;
175
+ fn_lockPositionWidgets(prmAllIsLocked: boolean): void;
176
+ fn_btn_updateWidgetControlConfig(idWidget: string): void;
177
+ fn_btn_updateWidgetControlData(idWidget: string): void;
178
+ /****************************************************** */
179
+ eventAddWidget(widgetConfig: YwWidgetConfigInterface, controlConfig: any, controlData: any, item: GridStackWidget): void;
180
+ eventUpdateWidgetControlConfig(idWidget: string, newControlConfig: any): void;
181
+ eventUpdateWidgetControlData(idWidget: string, newControlData: any): void;
182
+ /****************************************************** */
183
+ handleShowFormFilterDrawer(): void;
184
+ handleCloseFormFilterDrawer(): void;
185
+ handleCloseFormDrawer(): void;
186
+ fnGetDrawerWidth(prm_percent: any): number;
187
+ onFilterSelectionChange(eventData: any): void;
188
+ fnUpdateDataControllerBasedOnFilter(filterControlListConfig: YwDashboardWidgetFilterConfigInterface[]): void;
189
+ eventRemoveWidgetById(widgetId: string): void;
190
+ eventToggleLockWidget(widgetId: string, shouldLock: boolean): void;
191
+ eventToggleMaximizeWidget(widgetId: string, shouldMaximize: boolean): void;
192
+ eventShowFormConfigWidget(widgetId: string): void;
193
+ static ɵfac: i0.ɵɵFactoryDeclaration<YwDashboardComponent, never>;
194
+ static ɵcmp: i0.ɵɵComponentDeclaration<YwDashboardComponent, "yw-dashboard", never, { "showControls": { "alias": "showControls"; "required": false; "isSignal": true; }; "showFilter": { "alias": "showFilter"; "required": false; "isSignal": true; }; "dashboardStyle": { "alias": "dashboardStyle"; "required": false; }; "dashboardConfig": { "alias": "dashboardConfig"; "required": false; }; "dashboardData": { "alias": "dashboardData"; "required": false; }; "dashboardFilterConfig": { "alias": "dashboardFilterConfig"; "required": false; }; }, {}, never, never, true, never>;
195
+ }
196
+
197
+ declare class YwDashboardWidgetComponent {
198
+ componentWidgetId: string;
199
+ typeComponent: string;
200
+ varShowConfigButtons: boolean;
201
+ styleWidget: i0.InputSignal<YwWidgetStyleInterface>;
202
+ instanceStyleWidget: i0.Signal<{
203
+ widgetBackgroundColor: string | undefined;
204
+ widgetBorderColor: string | undefined;
205
+ }>;
206
+ configWidget: YwWidgetConfigInterface;
207
+ controlConfig: any;
208
+ controlData: any;
209
+ dataWidget: any;
210
+ isLocked: i0.ModelSignal<boolean>;
211
+ isMaximized: i0.WritableSignal<boolean>;
212
+ eventDeleteRequest: i0.OutputEmitterRef<string>;
213
+ eventLockToggleRequest: i0.OutputEmitterRef<{
214
+ widgetId: string;
215
+ shouldLock: boolean;
216
+ }>;
217
+ eventMaximizeToggleRequest: i0.OutputEmitterRef<{
218
+ widgetId: string;
219
+ shouldMaximize: boolean;
220
+ }>;
221
+ eventShowConfigFormRequest: i0.OutputEmitterRef<string>;
222
+ constructor();
223
+ ngOnInit(): void;
224
+ ngAfterViewInit(): void;
225
+ ngOnChanges(changes: SimpleChanges): void;
226
+ onDeleteClick(): void;
227
+ onLockClick(): void;
228
+ onMaximizeClick(): void;
229
+ onShowFormConfigClick(): void;
230
+ static ɵfac: i0.ɵɵFactoryDeclaration<YwDashboardWidgetComponent, never>;
231
+ static ɵcmp: i0.ɵɵComponentDeclaration<YwDashboardWidgetComponent, "yw-dashboard-widget", never, { "styleWidget": { "alias": "styleWidget"; "required": false; "isSignal": true; }; "configWidget": { "alias": "configWidget"; "required": false; }; "controlConfig": { "alias": "controlConfig"; "required": false; }; "controlData": { "alias": "controlData"; "required": false; }; "isLocked": { "alias": "isLocked"; "required": false; "isSignal": true; }; }, { "isLocked": "isLockedChange"; "eventDeleteRequest": "eventDeleteRequest"; "eventLockToggleRequest": "eventLockToggleRequest"; "eventMaximizeToggleRequest": "eventMaximizeToggleRequest"; "eventShowConfigFormRequest": "eventShowConfigFormRequest"; }, never, never, true, never>;
232
+ }
233
+
234
+ interface YwMappingConfig {
235
+ title: string;
236
+ xLabelText?: string;
237
+ yLabelText?: string;
238
+ provider: string;
239
+ configData: SingleConfigModel | SingleConfigModel[];
240
+ }
241
+ interface TwTableConfigModel {
242
+ name: string;
243
+ }
244
+ interface TwJoinConfigModel {
245
+ join: string;
246
+ }
247
+ type SingleConfigModel = {
248
+ table?: string | (string | TwTableConfigModel)[];
249
+ xAxis?: string;
250
+ yAxis?: string;
251
+ y2Axis?: string;
252
+ legends?: YwLegendSttings;
253
+ joins?: boolean;
254
+ serie?: string;
255
+ tooltip?: YwTooltipModel;
256
+ configJoins?: TwJoinConfigModel[];
257
+ };
258
+ interface YwTooltipModel {
259
+ enable: boolean;
260
+ format?: string;
261
+ header?: string;
262
+ shared?: boolean;
263
+ }
264
+ interface YwLegendSttings {
265
+ visible: boolean;
266
+ position?: 'Top' | 'Bottom' | 'Left' | 'Right';
267
+ }
268
+ /** Alias con la ortografía correcta */
269
+ type YwLegendSettings = YwLegendSttings;
270
+ interface YwComponentData<T = unknown> {
271
+ data: T;
272
+ }
273
+ interface YwComponentEvent<TPayload = unknown> {
274
+ type: string;
275
+ source?: string;
276
+ payload?: TPayload;
277
+ }
278
+
279
+ interface ChartDataModel {
280
+ x: string;
281
+ y: number | string;
282
+ y2?: number;
283
+ }
284
+ interface ChartSeriesModel {
285
+ name: string;
286
+ dataSource: ChartDataModel[];
287
+ }
288
+
289
+ interface ChartVariant {
290
+ type: 'cornerRadius' | "simple";
291
+ orientation?: 'vertical' | 'horizontal';
292
+ }
293
+ interface ChartolumnFacet {
294
+ type?: 'Cylinder' | 'Rectangle';
295
+ }
296
+ interface ChartTextConfig {
297
+ name?: string;
298
+ nameOver?: string;
299
+ }
300
+ type ColorRuleType$2 = 'threshold' | 'pair' | 'range' | 'custom';
301
+ interface BarRenderConfig {
302
+ rule: ColorRuleType$2;
303
+ thresholdValue?: number;
304
+ minRange?: number;
305
+ maxRange?: number;
306
+ trueColor?: string;
307
+ falseColor?: string;
308
+ }
309
+ interface YwBarMappingConfig extends YwMappingConfig {
310
+ color?: string;
311
+ columnFacet?: ChartolumnFacet;
312
+ ruleColorBar?: BarRenderConfig;
313
+ columnSpacing?: number;
314
+ variant?: ChartVariant;
315
+ border?: {
316
+ width?: number;
317
+ color?: string;
318
+ dashArray?: string;
319
+ };
320
+ }
321
+
322
+ declare class BarChartComponent implements OnChanges {
323
+ chartData: any;
324
+ config: YwBarMappingConfig;
325
+ idComponent: string;
326
+ ngOnChanges(changes: SimpleChanges): void;
327
+ static ɵfac: i0.ɵɵFactoryDeclaration<BarChartComponent, never>;
328
+ static ɵcmp: i0.ɵɵComponentDeclaration<BarChartComponent, "yw-bar-chart", never, { "chartData": { "alias": "chartData"; "required": false; }; "config": { "alias": "config"; "required": false; }; "idComponent": { "alias": "idComponent"; "required": false; }; }, {}, never, never, true, never>;
329
+ }
330
+
331
+ interface CustomTooltipModel {
332
+ enable: boolean;
333
+ format?: string;
334
+ header?: string;
335
+ shared?: boolean;
336
+ }
337
+ type ColorRuleType$1 = 'threshold' | 'pair' | 'range' | 'custom';
338
+ interface PointRenderConfig {
339
+ rule: ColorRuleType$1;
340
+ thresholdValue?: number;
341
+ minRange?: number;
342
+ maxRange?: number;
343
+ trueColor?: string;
344
+ falseColor?: string;
345
+ }
346
+ interface YwLineMappingConfig extends YwMappingConfig {
347
+ dashArray?: number;
348
+ widthLine?: number;
349
+ ruleColorPoint?: PointRenderConfig;
350
+ chartoColoredLine?: true;
351
+ valueOrder?: string;
352
+ }
353
+
354
+ declare class LineChartComponent {
355
+ chartData: any;
356
+ config: YwLineMappingConfig;
357
+ idComponent: string;
358
+ ngOnChanges(changes: SimpleChanges): void;
359
+ static ɵfac: i0.ɵɵFactoryDeclaration<LineChartComponent, never>;
360
+ static ɵcmp: i0.ɵɵComponentDeclaration<LineChartComponent, "yw-line-chart", never, { "chartData": { "alias": "chartData"; "required": false; }; "config": { "alias": "config"; "required": false; }; "idComponent": { "alias": "idComponent"; "required": false; }; }, {}, never, never, true, never>;
361
+ }
362
+
363
+ interface YwBubbleMappingConfig extends YwMappingConfig {
364
+ opacity?: '0.5' | '0.10';
365
+ emptyPointSettings?: string;
366
+ ruleColorPoint?: PointRenderBubbleConfig;
367
+ }
368
+ type ColorRuleType = 'threshold' | 'pair' | 'range' | 'custom';
369
+ interface PointRenderBubbleConfig {
370
+ rule: ColorRuleType;
371
+ thresholdValue?: number;
372
+ minRange?: number;
373
+ maxRange?: number;
374
+ trueColor?: string;
375
+ falseColor?: string;
376
+ }
377
+
378
+ declare class BubbleChartComponent {
379
+ chartData: any;
380
+ config: YwBubbleMappingConfig;
381
+ idComponent: string;
382
+ ngOnChanges(changes: SimpleChanges): void;
383
+ static ɵfac: i0.ɵɵFactoryDeclaration<BubbleChartComponent, never>;
384
+ static ɵcmp: i0.ɵɵComponentDeclaration<BubbleChartComponent, "yw-bubble-chart", never, { "chartData": { "alias": "chartData"; "required": false; }; "config": { "alias": "config"; "required": false; }; "idComponent": { "alias": "idComponent"; "required": false; }; }, {}, never, never, true, never>;
385
+ }
386
+
387
+ type YwPieLabelPosition = 'Inside' | 'Outside';
388
+ type YwPieVariant = {
389
+ type: 'pie' | 'doughnut' | 'mid';
390
+ };
391
+ type YwPieValueDisplayMode = 'percentage' | 'value' | 'both' | 'none';
392
+ interface YwPieMappingConfig extends YwMappingConfig {
393
+ /** Variante visual del gráfico */
394
+ variant?: YwPieVariant;
395
+ /** Radio general del gráfico. Ej: '70%' */
396
+ radius?: string;
397
+ /** Radio interno para el tipo 'Doughnut'. Ej: '40%' */
398
+ innerRadius?: string;
399
+ /** Mostrar etiquetas en los slices */
400
+ showDataLabels?: boolean;
401
+ /** Posición de la etiqueta en el slice */
402
+ labelPosition?: YwPieLabelPosition;
403
+ /** Separar el slice más destacado */
404
+ explodeSlice?: boolean;
405
+ /** Índice del slice a separar (0 = primero) */
406
+ explodeIndex?: number;
407
+ /** Distancia de separación del slice. Ej: '10%' */
408
+ explodeOffset?: string;
409
+ /** Paleta de colores personalizada para los slices */
410
+ palettes?: string[];
411
+ /** Altura del gráfico. Ej: '400px' */
412
+ height?: string;
413
+ /** Habilita la etiqueta en el centro de la dona (Center View). Default: false */
414
+ showCenterLabel?: boolean;
415
+ /** Título de la etiqueta central (ej: 'Total', 'Ventas', 'Taxes') */
416
+ centerLabelTitle?: string;
417
+ /** Valor de la etiqueta central (si no se define, calcula la suma total acumulada) */
418
+ centerLabelValue?: string;
419
+ /** Tamaño del título central. Default: '14px' */
420
+ centerLabelTitleSize?: string;
421
+ /** Tamaño del valor central. Default: '20px' */
422
+ centerLabelValueSize?: string;
423
+ /** Color del título central. Default: '#64748b' */
424
+ centerLabelTitleColor?: string;
425
+ /** Color del valor central. Default: '#1e293b' */
426
+ centerLabelValueColor?: string;
427
+ /** Muestra u oculta el nombre/categoría en la etiqueta de cada área. Default: true */
428
+ showCategoryName?: boolean;
429
+ /** Modo de visualización del valor en la etiqueta: porcentaje, valor numérico total, ambos o ninguno. Default: 'both' */
430
+ valueDisplayMode?: YwPieValueDisplayMode;
431
+ /** Formato del tooltip (fallback si no se especifica en configData.tooltip.format) */
432
+ tooltipFormat?: string;
433
+ /** Mostrar leyenda (fallback si no se especifica en configData.legends.visible) */
434
+ showLegend?: boolean;
435
+ /** Posición de leyenda (fallback si no se especifica en configData.legends.position) */
436
+ legendPosition?: 'Top' | 'Bottom' | 'Left' | 'Right';
437
+ }
438
+ /** Alias retrocompatible */
439
+ type YwPieChartConfig = YwPieMappingConfig;
440
+ interface ChartPieSeriesModelConfig extends ChartSeriesModel {
441
+ color?: string;
442
+ innerRadius?: string;
443
+ startAngle?: number;
444
+ endAngle?: number;
445
+ radius?: string;
446
+ }
447
+ /** Alias retrocompatible */
448
+ type YwPieSeriesModelConfig = ChartPieSeriesModelConfig;
449
+ /** Configuración visual procesada para Syncfusion AccumulationChart */
450
+ interface SfPieVisualConfig {
451
+ legendSettings?: LegendSettingsModel;
452
+ tooltip?: TooltipSettingsModel;
453
+ dataLabel?: AccumulationDataLabelSettingsModel;
454
+ }
455
+ /** Configuración de la etiqueta central para la variante Dona */
456
+ interface SfPieCenterLabelConfig {
457
+ show: boolean;
458
+ title: string;
459
+ value: string;
460
+ titleSize: string;
461
+ valueSize: string;
462
+ titleColor: string;
463
+ valueColor: string;
464
+ }
465
+ /** Resultado estructurado que entrega el adaptador de Pie al componente visual */
466
+ interface PieChartParseResult {
467
+ series: ChartPieSeriesModelConfig[];
468
+ visualConfig: SfPieVisualConfig;
469
+ centerLabel?: SfPieCenterLabelConfig;
470
+ labelData?: any;
471
+ }
472
+
473
+ interface SfPiePoint extends ChartDataModel {
474
+ text?: string;
475
+ fill?: string;
476
+ }
477
+
478
+ declare class PieChartComponent {
479
+ private static _nextId;
480
+ private _idComponent;
481
+ set idComponent(val: string);
482
+ get idComponent(): string;
483
+ chartData: any;
484
+ config: YwPieMappingConfig;
485
+ static ɵfac: i0.ɵɵFactoryDeclaration<PieChartComponent, never>;
486
+ static ɵcmp: i0.ɵɵComponentDeclaration<PieChartComponent, "yw-pie-chart", never, { "idComponent": { "alias": "idComponent"; "required": false; }; "chartData": { "alias": "chartData"; "required": false; }; "config": { "alias": "config"; "required": false; }; }, {}, never, never, true, never>;
487
+ }
488
+
489
+ interface SfGaugePoint {
490
+ /** Valor del puntero principal del gauge */
491
+ value: number;
492
+ /** Texto de la etiqueta central (ej: '65%', '1250 USD') */
493
+ text?: string;
494
+ }
495
+
496
+ /** Determina cómo se agrega el yLabel cuando hay múltiples filas */
497
+ type YwGaugeAggregation = 'sum' | 'avg' | 'count' | 'min' | 'max' | 'first';
498
+ /** Variantes prehechas del Gauge Chart */
499
+ type YwGaugeVariant = {
500
+ type: 'position' | 'width-range' | 'multi';
501
+ };
502
+ /** Rango de color en el arco del gauge (ej: verde/amarillo/rojo) */
503
+ interface YwGaugeRange {
504
+ start: number;
505
+ end: number;
506
+ color: string;
507
+ /** Grosor general del rango, por defecto 8 */
508
+ width?: number;
509
+ /** Grosor de inicio del rango (para arcos variables) */
510
+ startWidth?: number;
511
+ /** Grosor de fin del rango (para arcos variables) */
512
+ endWidth?: number;
513
+ /** Radio de curvatura específico para este rango. Si no se especifica, usa el cálculo del gauge */
514
+ roundedCornerRadius?: number;
515
+ /** Etiqueta descriptiva de la zona de valor (ej: 'Bajo', 'Medio', 'Alto') */
516
+ label?: string;
517
+ /** Identificador de zona opcional */
518
+ id?: string;
519
+ /** Opacidad del rango (usado dinámicamente en selección o personalización) */
520
+ opacity?: number;
521
+ }
522
+ /** Estilo de terminación de los extremos del arco/barra de progreso */
523
+ type YwGaugeCornerStyle = 'round' | 'flat';
524
+ /** Posición de los ticks respecto a la línea de medidas */
525
+ type YwGaugeTickPosition = 'Outside' | 'Inside' | 'Cross';
526
+ interface YwGaugeMappingConfig extends YwMappingConfig {
527
+ /** Cómo agregar el valor cuando hay múltiples filas ('sum' | 'avg' | 'count' | 'min' | 'max' | 'first'). Default: 'sum' */
528
+ aggregation?: YwGaugeAggregation;
529
+ /** Valor mínimo del arco del gauge. Default: 0 */
530
+ minimum?: number;
531
+ /** Valor máximo del arco del gauge. Default: 100 */
532
+ maximum?: number;
533
+ /** Ángulo de inicio del arco. Default: 270 (arriba) */
534
+ startAngle?: number;
535
+ /** Ángulo de fin del arco. Default: 90 */
536
+ endAngle?: number;
537
+ /** Rangos de colores sobre el arco (bajo/medio/alto) */
538
+ ranges?: YwGaugeRange[];
539
+ /** Color de la aguja/puntero */
540
+ pointerColor?: string;
541
+ /** Mostrar el valor como etiqueta central */
542
+ showLabel?: boolean;
543
+ /** Formato de la etiqueta central (ej: '{value} USD') */
544
+ labelFormat?: string;
545
+ /** Habilitar tooltip al hacer hover (también soportado vía configData.tooltip) */
546
+ enableTooltip?: boolean;
547
+ /** Mostrar regla/escala con ticks y valores alrededor del arco. Default: false */
548
+ showTicks?: boolean;
549
+ /** Posición de los ticks respecto a la línea de medidas. Default: 'Outside' */
550
+ tickPosition?: YwGaugeTickPosition;
551
+ /** Distancia de separación de las etiquetas numéricas para que los ticks queden entre el arco y los números */
552
+ labelOffset?: number;
553
+ /** Activar efecto de doble línea tipo líquido (línea de fondo vacío + línea de llenado) */
554
+ enableProgressTrack?: boolean;
555
+ /** Color de la línea de fondo / estado vacío. Default: '#E5E7EB' */
556
+ trackColor?: string;
557
+ /** Color de la línea de llenado progresivo / líquido. Default: pointerColor o '#0052CC' */
558
+ progressColor?: string;
559
+ /** Grosor en px de las líneas de fondo y líquido. Default: 14 */
560
+ progressWidth?: number;
561
+ /** Ancho inicial del arco en px para variantes con grosor progresivo (ej: 'width-range'). Default: 4 */
562
+ startWidth?: number;
563
+ /** Ancho final del arco en px para variantes con grosor progresivo (ej: 'width-range'). Default: 24 */
564
+ endWidth?: number;
565
+ /** Conservar la aguja cuando el modo de llenado líquido esté activo. Default: false */
566
+ showNeedleWithProgress?: boolean;
567
+ /** Estilo de terminación de extremos: 'round' (redondo/cápsula) o 'flat' (recto). Default: 'flat' */
568
+ cornerStyle?: YwGaugeCornerStyle;
569
+ /** Tamaño de fuente del label central (ej: '24px', 24). Default inteligente según aguja */
570
+ labelSize?: string | number;
571
+ /** Aplicar negrita/grosor al label central. Default: true sin aguja, false con aguja */
572
+ labelBold?: boolean;
573
+ /** Peso tipográfico específico para el label central ('normal' | 'bold' | '600' | '700') */
574
+ labelWeight?: string;
575
+ /** Color de la fuente del label central. Default: '#1F2937' */
576
+ labelColor?: string;
577
+ /** Distancia radial desde el centro hasta el label central (ej: '20%', '40%', 25). Default: '20%' sin aguja, '40%' con aguja */
578
+ labelDistance?: string | number;
579
+ /** Alias retrocompatible de labelDistance */
580
+ labelRadius?: string | number;
581
+ /** Ángulo polar de la etiqueta central respecto al centro. Default: 180 (abajo) */
582
+ labelAngle?: number;
583
+ /** Forzar redondeo en todos los rangos en modo multi-rango. Default: false (uniones rectas) */
584
+ roundMultiRanges?: boolean;
585
+ variant?: YwGaugeVariant;
586
+ }
587
+ /** Alias retrocompatible */
588
+ type YwGaugeChartConfig = YwGaugeMappingConfig;
589
+ /** Configuración visual ya mapeada por el adaptador, lista para renderizar en Syncfusion CircularGauge */
590
+ interface SfGaugeVisualConfig {
591
+ title: string;
592
+ minimum: number;
593
+ maximum: number;
594
+ startAngle: number;
595
+ endAngle: number;
596
+ ranges: YwGaugeRange[];
597
+ pointerColor: string;
598
+ enableTooltip: boolean;
599
+ showLabel: boolean;
600
+ labelFormat: string;
601
+ showTicks: boolean;
602
+ labelAngle: number;
603
+ labelRadius: string;
604
+ tickPosition: 'Outside' | 'Inside' | 'Cross';
605
+ labelOffset: number;
606
+ enableProgressTrack: boolean;
607
+ trackColor: string;
608
+ progressColor: string;
609
+ progressWidth: number;
610
+ showNeedleWithProgress: boolean;
611
+ cornerStyle: 'round' | 'flat';
612
+ cornerRadius: number;
613
+ labelSize: string;
614
+ labelBold: boolean;
615
+ labelWeight: string;
616
+ labelColor: string;
617
+ roundMultiRanges: boolean;
618
+ isVariableWidth?: boolean;
619
+ startWidth?: number;
620
+ endWidth?: number;
621
+ }
622
+ /** Resultado completo que entrega el adaptador al componente visual */
623
+ interface GaugeChartParseResult {
624
+ gaugePoint: SfGaugePoint;
625
+ visualConfig: SfGaugeVisualConfig;
626
+ }
627
+
628
+ declare class GaugeChartSyncfusionComponent implements OnInit, AfterViewInit, OnChanges, DoCheck, OnDestroy {
629
+ private cdr;
630
+ private elRef;
631
+ gaugeInstance?: CircularGaugeComponent;
632
+ private _chartData;
633
+ private _dataSnapshot;
634
+ private _resizeObserver?;
635
+ private _currentAnimationId?;
636
+ private _previousValue?;
637
+ private _isViewInitialized;
638
+ private _hasAnimatedInitial;
639
+ private _isAnimating;
640
+ private static _nextId;
641
+ private _idComponent;
642
+ set idComponent(val: string);
643
+ get idComponent(): string;
644
+ set chartData(val: any);
645
+ get chartData(): any;
646
+ config: YwGaugeMappingConfig;
647
+ gaugePoint: SfGaugePoint;
648
+ visualConfig: SfGaugeVisualConfig;
649
+ /** Tamaño de fuente dinámico del label central según el tamaño del contenedor */
650
+ currentLabelSize: string;
651
+ /** Texto animado del contador central durante la interpolación */
652
+ animatedLabelText: string;
653
+ constructor(cdr: ChangeDetectorRef, elRef: ElementRef);
654
+ ngOnInit(): void;
655
+ ngAfterViewInit(): void;
656
+ /**
657
+ * Evento emitido por Syncfusion cuando el SVG ha culminado su renderizado físico en el DOM.
658
+ * Garantiza que los elementos <path> existen antes de arrancar la animación de llenado.
659
+ */
660
+ onGaugeLoaded(args: any): void;
661
+ ngOnChanges(changes: SimpleChanges): void;
662
+ ngDoCheck(): void;
663
+ ngOnDestroy(): void;
664
+ updateParsedData(): void;
665
+ /**
666
+ * Configura el ResizeObserver siguiendo el patrón estandarizado del Bar Chart con requestAnimationFrame.
667
+ */
668
+ private _setupResizeObserver;
669
+ /**
670
+ * Calcula el tamaño de fuente óptimo para el label central en función del ancho del contenedor.
671
+ */
672
+ private _updateAdaptiveLabelSize;
673
+ /**
674
+ * Genera los dos rangos para la variante cónica (progreso + pista restante con midWidth interpolado).
675
+ * SIEMPRE produce exactamente 2 rangos para que Syncfusion los registre en el DOM.
676
+ */
677
+ private _getVariableWidthRanges;
678
+ /**
679
+ * Motor de animación a 60fps con requestAnimationFrame para la variante width-range.
680
+ * Transiciona desde startVal (0/min) hasta targetVal en duration ms con curva cúbica suave (easeOutCubic).
681
+ */
682
+ private _animateWidthRange;
683
+ private _cancelAnimation;
684
+ /** Método público para forzar refresco manual */
685
+ refresh(): void;
686
+ /** Helper para el trackBy en la plantilla */
687
+ trackByIndex(index: number): number;
688
+ static ɵfac: i0.ɵɵFactoryDeclaration<GaugeChartSyncfusionComponent, never>;
689
+ static ɵcmp: i0.ɵɵComponentDeclaration<GaugeChartSyncfusionComponent, "yw-gauge-chart-syncfusion", never, { "idComponent": { "alias": "idComponent"; "required": false; }; "chartData": { "alias": "chartData"; "required": false; }; "config": { "alias": "config"; "required": false; }; }, {}, never, never, true, never>;
690
+ }
691
+
692
+ declare class GaugeChartComponent implements OnChanges, DoCheck {
693
+ syncfusionComponent?: GaugeChartSyncfusionComponent;
694
+ private _chartData;
695
+ private _dataSnapshot;
696
+ private static _nextId;
697
+ private _idComponent;
698
+ set idComponent(val: string);
699
+ get idComponent(): string;
700
+ set chartData(val: any);
701
+ get chartData(): any;
702
+ config: YwGaugeMappingConfig;
703
+ ngOnChanges(changes: SimpleChanges): void;
704
+ ngDoCheck(): void;
705
+ /** Método público para forzar refresco manual */
706
+ refresh(): void;
707
+ static ɵfac: i0.ɵɵFactoryDeclaration<GaugeChartComponent, never>;
708
+ static ɵcmp: i0.ɵɵComponentDeclaration<GaugeChartComponent, "yw-gauge-chart", never, { "idComponent": { "alias": "idComponent"; "required": false; }; "chartData": { "alias": "chartData"; "required": false; }; "config": { "alias": "config"; "required": false; }; }, {}, never, never, true, never>;
709
+ }
710
+
711
+ interface JoinItem {
712
+ join: string;
713
+ }
714
+ interface ConfigJoinOutput {
715
+ configJoins: JoinItem[];
716
+ }
717
+ declare class TableRelationshipComponent implements OnInit, OnChanges {
718
+ private fb;
719
+ private message;
720
+ chartData: Record<string, any[]>;
721
+ config?: ConfigJoinOutput;
722
+ saveRelations: EventEmitter<ConfigJoinOutput>;
723
+ relationshipForm: FormGroup;
724
+ resultado?: ConfigJoinOutput;
725
+ constructor(fb: FormBuilder, message: NzMessageService);
726
+ ngOnInit(): void;
727
+ ngOnChanges(changes: SimpleChanges): void;
728
+ evaluarYcargarConfig(): void;
729
+ cargarConfiguracionPrevia(joinsArray: JoinItem[]): void;
730
+ getJoins(): FormArray;
731
+ getNombresTablas(): string[];
732
+ getColumnasDeTabla(tableName: string): string[];
733
+ agregarRelacionItem(): void;
734
+ eliminarRelacionItem(index: number): void;
735
+ emitirDatos(): void;
736
+ static ɵfac: i0.ɵɵFactoryDeclaration<TableRelationshipComponent, never>;
737
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableRelationshipComponent, "yw-table-relationship", never, { "chartData": { "alias": "chartData"; "required": false; }; "config": { "alias": "config"; "required": false; }; }, { "saveRelations": "saveRelations"; }, never, never, true, never>;
738
+ }
739
+
740
+ export { BarChartComponent, BubbleChartComponent, DEFAULT_WIDGET_STYLE, GaugeChartComponent, LineChartComponent, PieChartComponent, SYNCFUSION_CONFIG, TableRelationshipComponent, YwChartsLibraryComponent, YwChartsLibraryService, YwDashboardComponent, YwDashboardWidgetComponent, YwDashboardWidgetFilterTypes, YwDashboardWidgetTypes, provideSyncfusionLicense };
741
+ export type { BarRenderConfig, ChartDataModel, ChartPieSeriesModelConfig, ChartSeriesModel, ChartTextConfig, ChartVariant, ChartolumnFacet, ConfigJoinOutput, CustomTooltipModel, GaugeChartParseResult, JoinItem, PieChartParseResult, PointRenderBubbleConfig, PointRenderConfig, SfGaugePoint, SfGaugeVisualConfig, SfPieCenterLabelConfig, SfPiePoint, SfPieVisualConfig, SingleConfigModel, SyncfusionConfig, TwJoinConfigModel, TwTableConfigModel, YwBarMappingConfig, YwBaseSlicerFilterConfig, YwBubbleMappingConfig, YwButtonSlicerFilterConfig, YwComponentData, YwComponentEvent, YwDashboardConfigInterface, YwDashboardDataInterface, YwDashboardFilterConfigInterface, YwDashboardLayoutInterface, YwDashboardStyleInterface, YwDashboardWidgetFilterConfigInterface, YwGaugeAggregation, YwGaugeChartConfig, YwGaugeCornerStyle, YwGaugeMappingConfig, YwGaugeRange, YwGaugeTickPosition, YwGaugeVariant, YwLegendSettings, YwLegendSttings, YwLineMappingConfig, YwListSlicerFilterConfig, YwMappingConfig, YwPieChartConfig, YwPieLabelPosition, YwPieMappingConfig, YwPieSeriesModelConfig, YwPieValueDisplayMode, YwPieVariant, YwTooltipModel, YwWidgetConfigInterface, YwWidgetFilterConfigInterface, YwWidgetLayoutInterface, YwWidgetStyleInterface };