@esfaenza/dashboard-feature 19.2.9 → 20.3.0

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.
Files changed (36) hide show
  1. package/fesm2022/esfaenza-dashboard-feature.mjs +291 -223
  2. package/fesm2022/esfaenza-dashboard-feature.mjs.map +1 -1
  3. package/index.d.ts +693 -3
  4. package/package.json +13 -13
  5. package/lib/components/dashboard/dashboard.component.d.ts +0 -46
  6. package/lib/components/widgets/BaseWidgetComponent.d.ts +0 -44
  7. package/lib/components/widgets/IWidgetComponent.d.ts +0 -23
  8. package/lib/components/widgets/JaceWidgetTypes.d.ts +0 -6
  9. package/lib/components/widgets/chart/jace-dsh-chart.component.d.ts +0 -29
  10. package/lib/components/widgets/counter/jace-dsh-counter.component.d.ts +0 -24
  11. package/lib/components/widgets/list/jace-dsh-list.component.d.ts +0 -27
  12. package/lib/components/widgets/multiprog/circle-progress/circle-progress.component.d.ts +0 -219
  13. package/lib/components/widgets/multiprog/jace-dsh-multiprog.component.d.ts +0 -26
  14. package/lib/components/widgets/multiprog/progress-bar/progress-bar.component.d.ts +0 -6
  15. package/lib/dashboard-feature.module.d.ts +0 -24
  16. package/lib/models/config/JaceDashboardConfig.d.ts +0 -51
  17. package/lib/models/externals/JaceDashboardLayoutAppSearch.d.ts +0 -6
  18. package/lib/models/externals/JaceDashboardLayoutDetail.d.ts +0 -6
  19. package/lib/models/externals/JaceWidgetInstanceDetail.d.ts +0 -18
  20. package/lib/models/externals/Repository.d.ts +0 -5
  21. package/lib/models/externals/SaveJaceDashboardLayoutDTO.d.ts +0 -6
  22. package/lib/models/options/DefaultDashboardModuleOptions.d.ts +0 -6
  23. package/lib/models/options/IDashboardModuleOptions.d.ts +0 -4
  24. package/lib/models/options/IWidgetTypeConfig.d.ts +0 -8
  25. package/lib/models/widgets/BaseJaceWidgetModel.d.ts +0 -32
  26. package/lib/models/widgets/IJaceWidgetModel.d.ts +0 -33
  27. package/lib/models/widgets/JaceChartWidgetModel.d.ts +0 -10
  28. package/lib/models/widgets/JaceCounterWidgetModel.d.ts +0 -10
  29. package/lib/models/widgets/JaceListWidgetModel.d.ts +0 -16
  30. package/lib/models/widgets/JaceMultiprogWidgetModel.d.ts +0 -9
  31. package/lib/private-injection-tokens.d.ts +0 -3
  32. package/lib/public-injection-tokens.d.ts +0 -7
  33. package/lib/services/DashboardWidgetFactory.d.ts +0 -28
  34. package/lib/services/IDashboardFeatureDataService.d.ts +0 -11
  35. package/lib/services/dashboard-feature.service.d.ts +0 -18
  36. package/public-api.d.ts +0 -25
package/index.d.ts CHANGED
@@ -1,5 +1,695 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, EventEmitter, Type, ViewContainerRef, ComponentRef, OnInit, AfterViewInit, OnDestroy, OnChanges, QueryList, ChangeDetectorRef, SimpleChanges, ElementRef, NgZone, Injector, ModuleWithProviders } from '@angular/core';
3
+ import { CallResult, InterComService } from '@esfaenza/extensions';
4
+ import { Observable, Subscription, Subject } from 'rxjs';
5
+ import * as i10 from 'angular-gridster2';
6
+ import { GridsterItem, GridsterConfig, GridsterItemComponentInterface } from 'angular-gridster2';
7
+ import { ActivatedRoute, Router } from '@angular/router';
8
+ import * as i12 from '@esfaenza/es-charts';
9
+ import { BaseSettings } from '@esfaenza/es-charts';
10
+ import * as i8 from '@angular/common';
11
+ import * as i9 from '@angular/forms';
12
+ import * as i11 from '@esfaenza/forms-and-validations';
13
+ import * as i13 from '@esfaenza/httpservice';
14
+ import { HTTPService } from '@esfaenza/httpservice';
15
+ import { AppSearch } from '@esfaenza/es-table';
16
+
17
+ declare class JaceWidgetInstanceDetail {
18
+ id?: number;
19
+ name: string;
20
+ title?: string;
21
+ type: string;
22
+ x: number;
23
+ y: number;
24
+ cols: number;
25
+ rows: number;
26
+ backendid?: string;
27
+ dragenabled?: boolean;
28
+ resizeenabled?: boolean;
29
+ compactenabled?: boolean;
30
+ options?: {
31
+ [key: string]: any;
32
+ };
33
+ queryerror: boolean;
34
+ }
35
+
36
+ declare class JaceDashboardLayoutDetail {
37
+ accountid: number;
38
+ name: string;
39
+ widgets: JaceWidgetInstanceDetail[];
40
+ }
41
+
42
+ declare class SaveJaceDashboardLayoutDTO {
43
+ backendid: string;
44
+ name: string;
45
+ widgets: JaceWidgetInstanceDetail[];
46
+ }
47
+
48
+ interface IDashboardFeatureDataService {
49
+ GetUserDashboard(backendid: string, idaccount: number, dashboardName: string): Observable<JaceDashboardLayoutDetail>;
50
+ SaveUserDashboard(dto: SaveJaceDashboardLayoutDTO): Observable<CallResult>;
51
+ GetWidgetData(backendid: string, name: string, options: {
52
+ [key: string]: string;
53
+ }): Observable<any>;
54
+ }
55
+
1
56
  /**
2
- * Generated bundle index. Do not edit.
57
+ * Token di registrazione della DashboardFeatureService.
58
+ * Permette di fare l'override dell'implementazione di default a scopo di test delle widget
3
59
  */
4
- /// <amd-module name="@esfaenza/dashboard-feature" />
5
- export * from './public-api';
60
+ declare const DSH_DATA_SERVICE: InjectionToken<IDashboardFeatureDataService>;
61
+
62
+ interface IJaceWidgetModel extends GridsterItem {
63
+ /**
64
+ * Nome della widget (univoco per dashboard)
65
+ */
66
+ name: string;
67
+ /**
68
+ * Titolo visualizzato
69
+ */
70
+ title?: string;
71
+ /**
72
+ * Tipo di widget
73
+ */
74
+ widgetType: string;
75
+ /**
76
+ * Indica che c'è un errore nel recupero dati
77
+ */
78
+ dataError: boolean;
79
+ /**
80
+ * Opzioni specifiche per questo tipo di widget
81
+ */
82
+ options?: {
83
+ [key: string]: any;
84
+ };
85
+ /**
86
+ * Id del backend da contattare per avere i dati di questa widget
87
+ * Se non specificato o uguale a _default_backend_, viene usato quello specificato in JaceDashboardConfig della dashboard
88
+ */
89
+ backendid: string;
90
+ configureFromInstanceDetails(details: JaceWidgetInstanceDetail): void;
91
+ setData(data?: any): void;
92
+ }
93
+
94
+ /**
95
+ * Interfaccia che ogni Component che rappresenta una widget deve implementare.
96
+ */
97
+ interface IWidgetComponent {
98
+ /**
99
+ * Se rilevante per questa dashboard, in questo input viene impostata la data selezionata dall'utente.
100
+ */
101
+ DashboardDate: Date;
102
+ /**
103
+ * Lanciato quando questa widget viene rimossa dalla dashboard
104
+ */
105
+ OnRemove: EventEmitter<string>;
106
+ /**
107
+ * Imposta il modello della widget nel componente e l'id del backend da contattare impostato a livello di dashboard (vedi JaceDashboardConfig).
108
+ *
109
+ * Lanciata subito dopo la creazione del Componente, durante il rendering del layout della dashboard.
110
+ *
111
+ * @param widgetModel Imposta il modello della widget letto nel layout ricevuto dal BE
112
+ */
113
+ setWidgetModel(dshBackendId: string, widgetModel: IJaceWidgetModel): void;
114
+ }
115
+
116
+ interface IWidgetTypeConfig {
117
+ name: string;
118
+ component: Type<IWidgetComponent>;
119
+ model: Type<IJaceWidgetModel>;
120
+ }
121
+
122
+ interface IDashboardModuleOptions {
123
+ widgetTypes: IWidgetTypeConfig[];
124
+ }
125
+
126
+ interface IConstructableModel<T> {
127
+ new (): T;
128
+ }
129
+ declare class DashboardWidgetFactory {
130
+ types: {
131
+ [name: string]: IWidgetTypeConfig;
132
+ };
133
+ constructor();
134
+ addOption(option: IDashboardModuleOptions): void;
135
+ /**
136
+ * Versione ng11 della creazione dei componenti dinamici delle widget
137
+ * @param type
138
+ * @param vcr
139
+ * @returns
140
+ */
141
+ resolveComponent(type: string, vcr: ViewContainerRef): ComponentRef<IWidgetComponent> | null;
142
+ resolveDefinition(type: string, details: JaceWidgetInstanceDetail): IJaceWidgetModel | null;
143
+ private createInstance;
144
+ static ɵfac: i0.ɵɵFactoryDeclaration<DashboardWidgetFactory, never>;
145
+ static ɵprov: i0.ɵɵInjectableDeclaration<DashboardWidgetFactory>;
146
+ }
147
+
148
+ /**
149
+ * Configurazione della dashboard
150
+ */
151
+ declare class JaceDashboardConfig {
152
+ /**
153
+ * Id del backend a cui verranno indirizzate le chiamate di questa dashboard.
154
+ * Deve essere uno di quelli definiti in appsetting.json del FE nella sezione **Backends**.
155
+ */
156
+ backendId: string;
157
+ /**
158
+ * Nome della dashboard (deve essere univoco nel modulo).
159
+ * Deve essere 'conosciuto' nel BE in modo da ottenere il layout delle widget da visualizzare.
160
+ * Verrà usato anche per salvare le preferenze dell'account (widget ridimensionate/spostate/eliminate)
161
+ */
162
+ dashboardName: string;
163
+ /**
164
+ * ID dell'account dell'utente che deve visualizzare la dashboard.
165
+ * HINT: Leggerlo da JaceIdentity dell'account al momento loggato.
166
+ */
167
+ accountId: number;
168
+ /**
169
+ * Configurazioni specifiche del layout di [Gridster2](https://tiberiuzuld.github.io/angular-gridster2/)
170
+ */
171
+ gridsterConfig: GridsterConfig;
172
+ /**
173
+ * Se questa dashboard contiene widget che mostrano dati che dipendono dalla data corrente
174
+ * mostra il controllo (datetimepicker) per variare la data in base a cui mostrare i dati.
175
+ *
176
+ * NOTA: showToolbar deve essere a true.
177
+ *
178
+ * Default = false
179
+ */
180
+ showDateInput: boolean;
181
+ /**
182
+ * Mostrare la toolbar in cima alla dashboard che contiene il titolo, il pulsante per salvare il proprio layout personalizzato
183
+ * e il picker per scegliere la data nel caso che le widget nella dashboard mostrino dati dipendenti dalla data.
184
+ *
185
+ * Default = true
186
+ */
187
+ showToolbar: boolean;
188
+ /**
189
+ * Titolo della dashboard mostrato in cima al layout all'interno della toolbar.
190
+ *
191
+ * NOTA: showToolbar deve essere a true.
192
+ *
193
+ * Default = undefined
194
+ */
195
+ dashboardTitle: string;
196
+ constructor();
197
+ }
198
+
199
+ /**
200
+ * Componente di base che rappresenta una dashboard.
201
+ * Utilizza Gridster2 per il layout delle widget [Gridster2](https://tiberiuzuld.github.io/angular-gridster2/)
202
+ */
203
+ declare class DashboardComponent implements OnInit, AfterViewInit, OnDestroy, OnChanges {
204
+ private dshService;
205
+ private intercom;
206
+ private route;
207
+ private cmpFactory;
208
+ private cdr;
209
+ /**
210
+ * Configurazione di questa dashboard.
211
+ * Contiene anche le configurazioni di layout di Gridster2
212
+ */
213
+ Configuration: JaceDashboardConfig;
214
+ dashboardDate: Date;
215
+ dashboardLayout?: JaceDashboardLayoutDetail;
216
+ widgetDefinitions: IJaceWidgetModel[];
217
+ changesSub?: Subscription;
218
+ trackedSubscriptions: Subscription[];
219
+ readonly destroySignal$: Subject<void>;
220
+ gridItemRefs: QueryList<ViewContainerRef>;
221
+ constructor(dshService: IDashboardFeatureDataService, intercom: InterComService, route: ActivatedRoute, cmpFactory: DashboardWidgetFactory, cdr: ChangeDetectorRef);
222
+ ngOnInit(): void;
223
+ ngAfterViewInit(): void;
224
+ ngOnDestroy(): void;
225
+ clearTrackedSubscriptions(): void;
226
+ ngOnChanges(changes: SimpleChanges): void;
227
+ reloadData(): void;
228
+ removeItem(widgetName: string): void;
229
+ saveDashboard(): void;
230
+ renderLayout(comps: QueryList<ViewContainerRef>): void;
231
+ addItem(): void;
232
+ static ɵfac: i0.ɵɵFactoryDeclaration<DashboardComponent, never>;
233
+ static ɵcmp: i0.ɵɵComponentDeclaration<DashboardComponent, "es-dashboard", never, { "Configuration": { "alias": "Configuration"; "required": false; }; }, {}, never, never, false, never>;
234
+ }
235
+
236
+ declare abstract class BaseJaceWidgetModel implements IJaceWidgetModel {
237
+ name: string;
238
+ title?: string | undefined;
239
+ widgetType: string;
240
+ dataError: boolean;
241
+ options?: {
242
+ [key: string]: any;
243
+ } | undefined;
244
+ backendid: string;
245
+ x: number;
246
+ y: number;
247
+ rows: number;
248
+ cols: number;
249
+ resizeEnabled?: boolean;
250
+ layerIndex?: number | undefined;
251
+ initCallback?: ((item: GridsterItem, itemComponent: GridsterItemComponentInterface) => void) | undefined;
252
+ dragEnabled?: boolean | undefined;
253
+ compactEnabled?: boolean | undefined;
254
+ maxItemRows?: number | undefined;
255
+ minItemRows?: number | undefined;
256
+ maxItemCols?: number | undefined;
257
+ minItemCols?: number | undefined;
258
+ minItemArea?: number | undefined;
259
+ maxItemArea?: number | undefined;
260
+ [propName: string]: any;
261
+ constructor();
262
+ configureFromInstanceDetails(details: JaceWidgetInstanceDetail): void;
263
+ abstract setData(data?: any): void;
264
+ }
265
+
266
+ declare class JaceListItemWidget {
267
+ id?: any;
268
+ showId: boolean;
269
+ idParamName?: string;
270
+ description: string;
271
+ subline?: string;
272
+ classes?: string;
273
+ link?: string;
274
+ }
275
+ declare class JaceListWidgetModel extends BaseJaceWidgetModel {
276
+ superText?: string;
277
+ items: JaceListItemWidget[];
278
+ constructor();
279
+ setData(data?: any): void;
280
+ }
281
+
282
+ declare class JaceListWidgetComponent implements IWidgetComponent, OnInit {
283
+ private dshService;
284
+ private router;
285
+ model?: JaceListWidgetModel;
286
+ DashboardDate: Date;
287
+ OnRemove: EventEmitter<string>;
288
+ configuration: boolean;
289
+ dataReady: boolean;
290
+ lastdate: string;
291
+ constructor(dshService: IDashboardFeatureDataService, router: Router);
292
+ setWidgetModel(dshBackendId: string, widgetModel: IJaceWidgetModel): void;
293
+ ngOnInit(): void;
294
+ ngOnChanges(changes: SimpleChanges): void;
295
+ refreshData(): void;
296
+ removeWidget(): void;
297
+ itemClicked(item: JaceListItemWidget): void;
298
+ configure(): void;
299
+ static ɵfac: i0.ɵɵFactoryDeclaration<JaceListWidgetComponent, never>;
300
+ static ɵcmp: i0.ɵɵComponentDeclaration<JaceListWidgetComponent, "jace-dsh-list", never, { "DashboardDate": { "alias": "DashboardDate"; "required": false; }; }, { "OnRemove": "OnRemove"; }, never, never, false, never>;
301
+ }
302
+
303
+ declare class JaceCounterWidgetModel extends BaseJaceWidgetModel {
304
+ superText?: string;
305
+ subText?: string;
306
+ value: number;
307
+ icon?: string;
308
+ unit?: string;
309
+ constructor();
310
+ setData(data?: any): void;
311
+ }
312
+
313
+ declare class JaceCounterWidgetComponent implements IWidgetComponent, OnInit {
314
+ private dshService;
315
+ model?: JaceCounterWidgetModel;
316
+ DashboardDate: Date;
317
+ OnRemove: EventEmitter<string>;
318
+ configuration: boolean;
319
+ dataReady: boolean;
320
+ lastdate: string;
321
+ constructor(dshService: IDashboardFeatureDataService);
322
+ setWidgetModel(dshBackendId: string, widgetModel: IJaceWidgetModel): void;
323
+ ngOnInit(): void;
324
+ ngOnChanges(changes: SimpleChanges): void;
325
+ refreshData(): void;
326
+ removeWidget(): void;
327
+ configure(): void;
328
+ static ɵfac: i0.ɵɵFactoryDeclaration<JaceCounterWidgetComponent, never>;
329
+ static ɵcmp: i0.ɵɵComponentDeclaration<JaceCounterWidgetComponent, "jace-dsh-counter", never, { "DashboardDate": { "alias": "DashboardDate"; "required": false; }; }, { "OnRemove": "OnRemove"; }, never, never, false, never>;
330
+ }
331
+
332
+ declare class JaceChartWidgetModel extends BaseJaceWidgetModel {
333
+ chartType: 'pie' | 'line' | 'vertical' | 'vertical-2d' | 'vertical-stacked';
334
+ chartSettings: BaseSettings;
335
+ legend: boolean;
336
+ chartData: any;
337
+ constructor();
338
+ setData(data?: any): void;
339
+ }
340
+
341
+ declare class JaceChartWidgetComponent implements IWidgetComponent, OnInit {
342
+ private dshService;
343
+ model: JaceChartWidgetModel;
344
+ sizeCalculated: boolean;
345
+ size: number;
346
+ DashboardDate: Date;
347
+ OnRemove: EventEmitter<string>;
348
+ configuration: boolean;
349
+ dataReady: boolean;
350
+ lastdate: string;
351
+ chartName: string;
352
+ containerEl: ElementRef;
353
+ constructor(dshService: IDashboardFeatureDataService);
354
+ setWidgetModel(dshBackendId: string, widgetModel: IJaceWidgetModel): void;
355
+ ngOnInit(): void;
356
+ ngAfterViewInit(): void;
357
+ ngOnChanges(changes: SimpleChanges): void;
358
+ refreshData(): void;
359
+ removeWidget(): void;
360
+ configure(): void;
361
+ static ɵfac: i0.ɵɵFactoryDeclaration<JaceChartWidgetComponent, never>;
362
+ static ɵcmp: i0.ɵɵComponentDeclaration<JaceChartWidgetComponent, "jace-dsh-chart", never, { "DashboardDate": { "alias": "DashboardDate"; "required": false; }; }, { "OnRemove": "OnRemove"; }, never, never, false, never>;
363
+ }
364
+
365
+ declare class JaceMultiprogWidgetModel extends BaseJaceWidgetModel {
366
+ resizeEnabled: boolean;
367
+ progressTitles: string[];
368
+ progressValues: number[];
369
+ circleProgress: boolean;
370
+ constructor();
371
+ setData(data?: any): void;
372
+ }
373
+
374
+ declare class JaceMultiprogWidgetComponent implements IWidgetComponent, OnInit {
375
+ private dshService;
376
+ private router;
377
+ model?: JaceMultiprogWidgetModel;
378
+ DashboardDate: Date;
379
+ OnRemove: EventEmitter<string>;
380
+ configuration: boolean;
381
+ dataReady: boolean;
382
+ lastdate: string;
383
+ constructor(dshService: IDashboardFeatureDataService, router: Router);
384
+ setWidgetModel(dshBackendId: string, widgetModel: IJaceWidgetModel): void;
385
+ ngOnInit(): void;
386
+ ngOnChanges(changes: SimpleChanges): void;
387
+ refreshData(): void;
388
+ removeWidget(): void;
389
+ configure(): void;
390
+ static ɵfac: i0.ɵɵFactoryDeclaration<JaceMultiprogWidgetComponent, never>;
391
+ static ɵcmp: i0.ɵɵComponentDeclaration<JaceMultiprogWidgetComponent, "jace-dsh-multiprog", never, { "DashboardDate": { "alias": "DashboardDate"; "required": false; }; }, { "OnRemove": "OnRemove"; }, never, never, false, never>;
392
+ }
393
+
394
+ interface CircleProgressOptionsInterface {
395
+ class?: string;
396
+ backgroundGradient?: boolean;
397
+ backgroundColor?: string;
398
+ backgroundGradientStopColor?: string;
399
+ backgroundOpacity?: number;
400
+ backgroundStroke?: string;
401
+ backgroundStrokeWidth?: number;
402
+ backgroundPadding?: number;
403
+ percent?: number;
404
+ radius?: number;
405
+ space?: number;
406
+ toFixed?: number;
407
+ maxPercent?: number;
408
+ renderOnClick?: boolean;
409
+ units?: string;
410
+ unitsFontSize?: string;
411
+ unitsFontWeight?: string;
412
+ unitsColor?: string;
413
+ outerStrokeGradient?: boolean;
414
+ outerStrokeWidth?: number;
415
+ outerStrokeColor?: string;
416
+ outerStrokeGradientStopColor?: string;
417
+ outerStrokeLinecap?: string;
418
+ innerStrokeColor?: string;
419
+ innerStrokeWidth?: number;
420
+ titleFormat?: Function;
421
+ title?: string | Array<String>;
422
+ titleColor?: string;
423
+ titleFontSize?: string;
424
+ titleFontWeight?: string;
425
+ subtitleFormat?: Function;
426
+ subtitle?: string | Array<String>;
427
+ subtitleColor?: string;
428
+ subtitleFontSize?: string;
429
+ subtitleFontWeight?: string;
430
+ imageSrc?: string;
431
+ imageHeight?: number;
432
+ imageWidth?: number;
433
+ animation?: boolean;
434
+ animateTitle?: boolean;
435
+ animateSubtitle?: boolean;
436
+ animationDuration?: number;
437
+ showTitle?: boolean;
438
+ showSubtitle?: boolean;
439
+ showUnits?: boolean;
440
+ showImage?: boolean;
441
+ showBackground?: boolean;
442
+ showInnerStroke?: boolean;
443
+ clockwise?: boolean;
444
+ responsive?: boolean;
445
+ startFromZero?: boolean;
446
+ showZeroOuterStroke?: boolean;
447
+ lazy?: boolean;
448
+ }
449
+ declare class CircleProgressOptions implements CircleProgressOptionsInterface {
450
+ class: string;
451
+ backgroundGradient: boolean;
452
+ backgroundColor: string;
453
+ backgroundGradientStopColor: string;
454
+ backgroundOpacity: number;
455
+ backgroundStroke: string;
456
+ backgroundStrokeWidth: number;
457
+ backgroundPadding: number;
458
+ percent: number;
459
+ radius: number;
460
+ space: number;
461
+ toFixed: number;
462
+ maxPercent: number;
463
+ renderOnClick: boolean;
464
+ units: string;
465
+ unitsFontSize: string;
466
+ unitsFontWeight: string;
467
+ unitsColor: string;
468
+ outerStrokeGradient: boolean;
469
+ outerStrokeWidth: number;
470
+ outerStrokeColor: string;
471
+ outerStrokeGradientStopColor: string;
472
+ outerStrokeLinecap: string;
473
+ innerStrokeColor: string;
474
+ innerStrokeWidth: number;
475
+ titleFormat: any;
476
+ title: string | Array<String>;
477
+ titleColor: string;
478
+ titleFontSize: string;
479
+ titleFontWeight: string;
480
+ subtitleFormat: any;
481
+ subtitle: string | Array<String>;
482
+ subtitleColor: string;
483
+ subtitleFontSize: string;
484
+ subtitleFontWeight: string;
485
+ imageSrc: any;
486
+ imageHeight: number;
487
+ imageWidth: number;
488
+ animation: boolean;
489
+ animateTitle: boolean;
490
+ animateSubtitle: boolean;
491
+ animationDuration: number;
492
+ showTitle: boolean;
493
+ showSubtitle: boolean;
494
+ showUnits: boolean;
495
+ showImage: boolean;
496
+ showBackground: boolean;
497
+ showInnerStroke: boolean;
498
+ clockwise: boolean;
499
+ responsive: boolean;
500
+ startFromZero: boolean;
501
+ showZeroOuterStroke: boolean;
502
+ lazy: boolean;
503
+ }
504
+ declare class CircleProgressComponent implements OnChanges, OnInit, OnDestroy {
505
+ private ngZone;
506
+ private elRef;
507
+ onClick: EventEmitter<MouseEvent>;
508
+ name: string;
509
+ class: string;
510
+ backgroundGradient: boolean;
511
+ backgroundColor: string;
512
+ backgroundGradientStopColor: String;
513
+ backgroundOpacity: number;
514
+ backgroundStroke: string;
515
+ backgroundStrokeWidth: number;
516
+ backgroundPadding: number;
517
+ radius: number;
518
+ space: number;
519
+ percent: number;
520
+ toFixed: number;
521
+ maxPercent: number;
522
+ renderOnClick: boolean;
523
+ units: string;
524
+ unitsFontSize: string;
525
+ unitsFontWeight: string;
526
+ unitsColor: string;
527
+ outerStrokeGradient: boolean;
528
+ outerStrokeWidth: number;
529
+ outerStrokeColor: string;
530
+ outerStrokeGradientStopColor: String;
531
+ outerStrokeLinecap: string;
532
+ innerStrokeColor: string;
533
+ innerStrokeWidth: string | number;
534
+ titleFormat: Function;
535
+ title: string | Array<String>;
536
+ titleColor: string;
537
+ titleFontSize: string;
538
+ titleFontWeight: string;
539
+ subtitleFormat: Function;
540
+ subtitle: string | string[];
541
+ subtitleColor: string;
542
+ subtitleFontSize: string;
543
+ subtitleFontWeight: string;
544
+ imageSrc: string;
545
+ imageHeight: number;
546
+ imageWidth: number;
547
+ animation: boolean;
548
+ animateTitle: boolean;
549
+ animateSubtitle: boolean;
550
+ animationDuration: number;
551
+ showTitle: boolean;
552
+ showSubtitle: boolean;
553
+ showUnits: boolean;
554
+ showImage: boolean;
555
+ showBackground: boolean;
556
+ showInnerStroke: boolean;
557
+ clockwise: boolean;
558
+ responsive: boolean;
559
+ startFromZero: boolean;
560
+ showZeroOuterStroke: boolean;
561
+ lazy: boolean;
562
+ templateOptions: CircleProgressOptions;
563
+ svgElement: HTMLElement;
564
+ isInViewport: Boolean;
565
+ onViewportChanged: EventEmitter<{
566
+ oldValue: Boolean;
567
+ newValue: Boolean;
568
+ }>;
569
+ window: Window;
570
+ _viewportChangedSubscriber: Subscription;
571
+ svg: any;
572
+ options: CircleProgressOptions;
573
+ defaultOptions: CircleProgressOptions;
574
+ _lastPercent: number;
575
+ _gradientUUID: string;
576
+ render: () => void;
577
+ polarToCartesian: (centerX: number, centerY: number, radius: number, angleInDegrees: number) => {
578
+ x: number;
579
+ y: number;
580
+ };
581
+ draw: (percent: number) => void;
582
+ getAnimationParameters: (previousPercent: number, currentPercent: number) => {
583
+ times: number;
584
+ step: number;
585
+ interval: number;
586
+ };
587
+ animate: (previousPercent: number, currentPercent: number) => void;
588
+ emitClickEvent(event: MouseEvent): void;
589
+ private _timerSubscription;
590
+ private applyOptions;
591
+ private getRelativeY;
592
+ private min;
593
+ private max;
594
+ private uuid;
595
+ isDrawing(): boolean;
596
+ findSvgElement(): void;
597
+ private isElementInViewport;
598
+ checkViewport: () => void;
599
+ onScroll: (event: Event) => void;
600
+ loadEventsForLazyMode: () => void;
601
+ unloadEventsForLazyMode: () => void;
602
+ ngOnInit(): void;
603
+ ngOnDestroy(): void;
604
+ ngOnChanges(changes: SimpleChanges): void;
605
+ private document;
606
+ constructor(defaultOptions: CircleProgressOptions, ngZone: NgZone, elRef: ElementRef, injector: Injector);
607
+ static ɵfac: i0.ɵɵFactoryDeclaration<CircleProgressComponent, never>;
608
+ static ɵcmp: i0.ɵɵComponentDeclaration<CircleProgressComponent, "circle-progress", never, { "name": { "alias": "name"; "required": false; }; "class": { "alias": "class"; "required": false; }; "backgroundGradient": { "alias": "backgroundGradient"; "required": false; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; }; "backgroundGradientStopColor": { "alias": "backgroundGradientStopColor"; "required": false; }; "backgroundOpacity": { "alias": "backgroundOpacity"; "required": false; }; "backgroundStroke": { "alias": "backgroundStroke"; "required": false; }; "backgroundStrokeWidth": { "alias": "backgroundStrokeWidth"; "required": false; }; "backgroundPadding": { "alias": "backgroundPadding"; "required": false; }; "radius": { "alias": "radius"; "required": false; }; "space": { "alias": "space"; "required": false; }; "percent": { "alias": "percent"; "required": false; }; "toFixed": { "alias": "toFixed"; "required": false; }; "maxPercent": { "alias": "maxPercent"; "required": false; }; "renderOnClick": { "alias": "renderOnClick"; "required": false; }; "units": { "alias": "units"; "required": false; }; "unitsFontSize": { "alias": "unitsFontSize"; "required": false; }; "unitsFontWeight": { "alias": "unitsFontWeight"; "required": false; }; "unitsColor": { "alias": "unitsColor"; "required": false; }; "outerStrokeGradient": { "alias": "outerStrokeGradient"; "required": false; }; "outerStrokeWidth": { "alias": "outerStrokeWidth"; "required": false; }; "outerStrokeColor": { "alias": "outerStrokeColor"; "required": false; }; "outerStrokeGradientStopColor": { "alias": "outerStrokeGradientStopColor"; "required": false; }; "outerStrokeLinecap": { "alias": "outerStrokeLinecap"; "required": false; }; "innerStrokeColor": { "alias": "innerStrokeColor"; "required": false; }; "innerStrokeWidth": { "alias": "innerStrokeWidth"; "required": false; }; "titleFormat": { "alias": "titleFormat"; "required": false; }; "title": { "alias": "title"; "required": false; }; "titleColor": { "alias": "titleColor"; "required": false; }; "titleFontSize": { "alias": "titleFontSize"; "required": false; }; "titleFontWeight": { "alias": "titleFontWeight"; "required": false; }; "subtitleFormat": { "alias": "subtitleFormat"; "required": false; }; "subtitle": { "alias": "subtitle"; "required": false; }; "subtitleColor": { "alias": "subtitleColor"; "required": false; }; "subtitleFontSize": { "alias": "subtitleFontSize"; "required": false; }; "subtitleFontWeight": { "alias": "subtitleFontWeight"; "required": false; }; "imageSrc": { "alias": "imageSrc"; "required": false; }; "imageHeight": { "alias": "imageHeight"; "required": false; }; "imageWidth": { "alias": "imageWidth"; "required": false; }; "animation": { "alias": "animation"; "required": false; }; "animateTitle": { "alias": "animateTitle"; "required": false; }; "animateSubtitle": { "alias": "animateSubtitle"; "required": false; }; "animationDuration": { "alias": "animationDuration"; "required": false; }; "showTitle": { "alias": "showTitle"; "required": false; }; "showSubtitle": { "alias": "showSubtitle"; "required": false; }; "showUnits": { "alias": "showUnits"; "required": false; }; "showImage": { "alias": "showImage"; "required": false; }; "showBackground": { "alias": "showBackground"; "required": false; }; "showInnerStroke": { "alias": "showInnerStroke"; "required": false; }; "clockwise": { "alias": "clockwise"; "required": false; }; "responsive": { "alias": "responsive"; "required": false; }; "startFromZero": { "alias": "startFromZero"; "required": false; }; "showZeroOuterStroke": { "alias": "showZeroOuterStroke"; "required": false; }; "lazy": { "alias": "lazy"; "required": false; }; "templateOptions": { "alias": "options"; "required": false; }; }, { "onClick": "onClick"; }, never, never, false, never>;
609
+ }
610
+
611
+ declare class ProgressBarComponent {
612
+ value: number;
613
+ static ɵfac: i0.ɵɵFactoryDeclaration<ProgressBarComponent, never>;
614
+ static ɵcmp: i0.ɵɵComponentDeclaration<ProgressBarComponent, "progress-bar", never, { "value": { "alias": "value"; "required": false; }; }, {}, never, never, false, never>;
615
+ }
616
+
617
+ declare class DashboardFeatureModule {
618
+ static forRoot(options?: IDashboardModuleOptions): ModuleWithProviders<DashboardFeatureModule>;
619
+ constructor(componentFactory: DashboardWidgetFactory, options: IDashboardModuleOptions[]);
620
+ static ɵfac: i0.ɵɵFactoryDeclaration<DashboardFeatureModule, [null, { optional: true; }]>;
621
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DashboardFeatureModule, [typeof DashboardComponent, typeof JaceListWidgetComponent, typeof JaceCounterWidgetComponent, typeof JaceChartWidgetComponent, typeof JaceMultiprogWidgetComponent, typeof CircleProgressComponent, typeof ProgressBarComponent], [typeof i8.CommonModule, typeof i9.FormsModule, typeof i10.GridsterModule, typeof i11.FormsAndValidationsModule, typeof i12.EsChartsModule, typeof i13.HttpserviceModule], [typeof DashboardComponent, typeof JaceListWidgetComponent, typeof JaceCounterWidgetComponent, typeof JaceChartWidgetComponent, typeof JaceMultiprogWidgetComponent, typeof CircleProgressComponent, typeof ProgressBarComponent]>;
622
+ static ɵinj: i0.ɵɵInjectorDeclaration<DashboardFeatureModule>;
623
+ }
624
+
625
+ declare class JaceDashboardLayoutAppSearch extends AppSearch<JaceDashboardLayoutDetail> {
626
+ backendid: string;
627
+ filtname?: string;
628
+ }
629
+
630
+ declare class DefaultDashboardModuleOptions implements IDashboardModuleOptions {
631
+ widgetTypes: IWidgetTypeConfig[];
632
+ constructor();
633
+ }
634
+
635
+ declare class DashboardFeatureAPIDataService implements IDashboardFeatureDataService {
636
+ private http;
637
+ constructor(http: HTTPService);
638
+ GetUserDashboard(backendid: string, idaccount: number, dashboardName: string): Observable<JaceDashboardLayoutDetail>;
639
+ SaveUserDashboard(dto: SaveJaceDashboardLayoutDTO): Observable<CallResult>;
640
+ GetWidgetData(backendid: string, name: string, options: {
641
+ [key: string]: string;
642
+ }): Observable<any>;
643
+ static ɵfac: i0.ɵɵFactoryDeclaration<DashboardFeatureAPIDataService, never>;
644
+ static ɵprov: i0.ɵɵInjectableDeclaration<DashboardFeatureAPIDataService>;
645
+ }
646
+
647
+ /**
648
+ * Classe di base astratta per la creazione di Widget custom.
649
+ */
650
+ declare abstract class BaseWidgetComponent<T extends IJaceWidgetModel> implements IWidgetComponent {
651
+ protected dshService: IDashboardFeatureDataService;
652
+ model?: T;
653
+ DashboardDate: Date;
654
+ OnRemove: EventEmitter<string>;
655
+ configuration: boolean;
656
+ dataReady: boolean;
657
+ lastdate: string;
658
+ constructor(dshService: IDashboardFeatureDataService);
659
+ setWidgetModel(dshBackendId: string, widgetModel: IJaceWidgetModel): void;
660
+ ngOnInit(): void;
661
+ ngOnChanges(changes: SimpleChanges): void;
662
+ /**
663
+ * Prepara i parametri e lancia la chiamata GetWidgetData della DashboardFeatureService.
664
+ * Imposta il model con i dati restituiti (setData) e imposta la variabile dataReady del campo a true
665
+ */
666
+ refreshData(): void;
667
+ /**
668
+ * Modifica/aggiorna i parametri della chiamata GetWidgetData prima di eseguirla. *
669
+ *
670
+ * @param pars parametri della chiamata. Se impostata, già contengono il parametro 'DT' con la data selezionata a livello di dashboard
671
+ */
672
+ abstract prepareGetDataParameters(pars: {
673
+ [key: string]: string;
674
+ }): void;
675
+ /**
676
+ * Da chiamare quando l'utente preme il pulsante 'rimuovi' nella toolbar della widget.
677
+ */
678
+ removeWidget(): void;
679
+ /**
680
+ * Da chiamare quando viene premuto il pulsante 'configure' nella toolbar della widget
681
+ */
682
+ configureWidget(): void;
683
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaseWidgetComponent<any>, never>;
684
+ static ɵprov: i0.ɵɵInjectableDeclaration<BaseWidgetComponent<any>>;
685
+ }
686
+
687
+ declare enum JaceWidgetTypes {
688
+ CHART = "CHART",
689
+ COUNTER = "COUNTER",
690
+ LIST = "LIST",
691
+ MULTIPROGRESS = "MULTIPROGRESS"
692
+ }
693
+
694
+ export { BaseJaceWidgetModel, BaseWidgetComponent, CircleProgressComponent, CircleProgressOptions, DSH_DATA_SERVICE, DashboardComponent, DashboardFeatureAPIDataService, DashboardFeatureModule, DashboardWidgetFactory, DefaultDashboardModuleOptions, JaceChartWidgetComponent, JaceCounterWidgetComponent, JaceDashboardConfig, JaceDashboardLayoutAppSearch, JaceDashboardLayoutDetail, JaceListWidgetComponent, JaceMultiprogWidgetComponent, JaceWidgetInstanceDetail, JaceWidgetTypes, ProgressBarComponent, SaveJaceDashboardLayoutDTO };
695
+ export type { CircleProgressOptionsInterface, IConstructableModel, IDashboardFeatureDataService, IDashboardModuleOptions, IJaceWidgetModel, IWidgetComponent, IWidgetTypeConfig };