@fluxhub/fluxhub-lib 21.0.0 → 22.0.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.
@@ -2,25 +2,25 @@ import { HttpHeaders, HttpClient, HttpInterceptor, HttpRequest, HttpHandler, Htt
2
2
  import { Router, ActivatedRouteSnapshot, RouterStateSnapshot, ActivatedRoute } from '@angular/router';
3
3
  import { ToastrService } from 'ngx-toastr';
4
4
  import * as i0 from '@angular/core';
5
- import { AfterViewInit, ElementRef, EventEmitter, PipeTransform, ChangeDetectorRef } from '@angular/core';
5
+ import { AfterViewInit, ElementRef, EventEmitter, PipeTransform, OnDestroy, ChangeDetectorRef, OnInit, QueryList, DoCheck } from '@angular/core';
6
6
  import { Observable } from 'rxjs';
7
7
  import { Title, DomSanitizer, SafeHtml, SafeStyle, SafeScript, SafeUrl, SafeResourceUrl } from '@angular/platform-browser';
8
+ import { TranslateService } from '@ngx-translate/core';
8
9
  import { MatDialog, MatDialogRef } from '@angular/material/dialog';
9
10
  import { ControlValueAccessor } from '@angular/forms';
10
- import { TranslateService } from '@ngx-translate/core';
11
11
  import { MatAutocompleteTrigger, MatAutocomplete } from '@angular/material/autocomplete';
12
- import { DateAdapter } from '@angular/material/core';
12
+ import { DateAdapter, ThemePalette } from '@angular/material/core';
13
13
  import { MatDatepicker } from '@angular/material/datepicker';
14
14
  import { Moment } from 'moment';
15
15
  import { Clipboard } from '@angular/cdk/clipboard';
16
16
  import { MatSlideToggle } from '@angular/material/slide-toggle';
17
17
  import { GridOptions, ColDef, CheckboxSelectionCallbackParams, HeaderCheckboxSelectionCallbackParams } from 'ag-grid-community';
18
- import { Color, ColorPickerControl } from '@iplab/ngx-color-picker';
19
18
  import { QuillEditorComponent, QuillModules } from 'ngx-quill';
20
19
  import { FileItem } from 'ng2-file-upload';
21
20
  import { ICellEditorAngularComp, ICellRendererAngularComp } from 'ag-grid-angular';
22
21
  import { MapMarker, MapInfoWindow } from '@angular/google-maps';
23
22
  import { CdkDragDrop } from '@angular/cdk/drag-drop';
23
+ import { ChartDataset, ChartConfiguration } from 'chart.js';
24
24
 
25
25
  /**
26
26
  * Internal State
@@ -133,7 +133,17 @@ declare class QResult {
133
133
  declare class UtilityService {
134
134
  private app_s;
135
135
  private titleService;
136
- constructor(app_s: AppService, titleService: Title);
136
+ private translateService;
137
+ constructor(app_s: AppService, titleService: Title, translateService: TranslateService);
138
+ /**
139
+ * Log di debug attivo SOLO sul dev server ng-serve (localhost:4200):
140
+ * in produzione non stampa nulla. È STATICO di proposito: così è
141
+ * richiamabile ovunque senza iniettare UtilityService — anche dentro gli
142
+ * HTTP interceptor, dove iniettare un service che usa HttpClient darebbe
143
+ * un cyclic dependency ("Cannot instantiate cyclic dependency! HttpClient").
144
+ * Uso: UtilityService.dlog('[TAG]', valore, ...);
145
+ */
146
+ static dlog(...args: any[]): void;
137
147
  set_home_title(s: string): void;
138
148
  get_home_title(): string;
139
149
  disabilitaConsole(): void;
@@ -455,13 +465,144 @@ declare class FHCheckBoxComponent implements AfterViewInit, ControlValueAccessor
455
465
  static ɵcmp: i0.ɵɵComponentDeclaration<FHCheckBoxComponent, "FHCheckBox", never, { "hidden": { "alias": "hidden"; "required": false; }; "label": { "alias": "label"; "required": false; }; "enabled": { "alias": "enabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; }, { "change": "change"; "click": "click"; }, never, never, true, never>;
456
466
  }
457
467
 
468
+ /**
469
+ * Interfaccia per la configurazione dei pulsanti della dialog
470
+ */
471
+ interface DialogButton {
472
+ /** Testo del pulsante */
473
+ text: string;
474
+ /** Icona Material (opzionale) */
475
+ icon?: string;
476
+ /** Colore del pulsante: 'primary' | 'accent' | 'warn' | undefined */
477
+ color?: 'primary' | 'accent' | 'warn';
478
+ /** Tipo di pulsante: 'raised' | 'stroked' | 'flat' | 'icon' */
479
+ type?: 'raised' | 'stroked' | 'flat' | 'icon';
480
+ /** Valore da restituire quando il pulsante viene cliccato */
481
+ returnValue?: any;
482
+ /** CSS class personalizzata per il pulsante */
483
+ cssClass?: string;
484
+ /** Se true, il pulsante viene allineato a sinistra (es. pulsante Elimina) */
485
+ alignLeft?: boolean;
486
+ /** Se true, il pulsante è disabilitato */
487
+ disabled?: boolean;
488
+ /** Larghezza minima del pulsante in pixel (se 0 o non specificato, non viene applicata) */
489
+ minWidth?: number;
490
+ }
491
+ /**
492
+ * Evento emesso prima della chiusura della dialog
493
+ */
494
+ interface DialogBeforeCloseEvent {
495
+ /** Valore di ritorno dal pulsante cliccato */
496
+ returnValue: any;
497
+ /** Funzione per impedire la chiusura della dialog */
498
+ preventDefault: () => void;
499
+ }
500
+ /**
501
+ * Componente base riutilizzabile per le dialog
502
+ *
503
+ * Esempio di utilizzo:
504
+ * ```typescript
505
+ * const dialogRef = this.dialog.open(MyDialogComponent, {
506
+ * width: '900px',
507
+ * maxWidth: '95vw',
508
+ * maxHeight: '85vh',
509
+ * data: { ... }
510
+ * });
511
+ * ```
512
+ *
513
+ * Nel template del componente:
514
+ * ```html
515
+ * <fh-dialog-base
516
+ * [title]="'Titolo Dialog'"
517
+ * [buttons]="buttons"
518
+ * [canValidate]="canSave"
519
+ * (beforeClose)="onBeforeClose($event)"
520
+ * (buttonClick)="onButtonClick($event)">
521
+ *
522
+ * <!-- Contenuto proiettato -->
523
+ * <div dialog-content>
524
+ * <p>Contenuto della dialog</p>
525
+ * </div>
526
+ * </fh-dialog-base>
527
+ * ```
528
+ */
529
+ declare class DialogBaseComponent {
530
+ dialogRef: MatDialogRef<DialogBaseComponent>;
531
+ /**
532
+ * Titolo della dialog
533
+ */
534
+ title: string;
535
+ /**
536
+ * Configurazione dei pulsanti
537
+ */
538
+ buttons: DialogButton[];
539
+ /**
540
+ * Mostra il pulsante X di chiusura nell'header
541
+ */
542
+ showCloseButton: boolean;
543
+ /**
544
+ * Funzione di validazione personalizzata
545
+ * Restituisce true se la validazione è OK, false altrimenti
546
+ * Usato per disabilitare i pulsanti che hanno requireValidation = true
547
+ */
548
+ canValidate: (() => boolean) | boolean;
549
+ /**
550
+ * Allineamento dei pulsanti nel footer
551
+ * 'space-between': pulsanti distribuiti tra sinistra e destra (default)
552
+ * 'center': pulsanti centrati
553
+ * 'flex-end': pulsanti allineati a destra
554
+ * 'flex-start': pulsanti allineati a sinistra
555
+ */
556
+ buttonsAlignment: 'space-between' | 'center' | 'flex-end' | 'flex-start';
557
+ /**
558
+ * Evento emesso quando viene cliccato un pulsante
559
+ * Payload: returnValue del pulsante
560
+ */
561
+ buttonClick: EventEmitter<any>;
562
+ /**
563
+ * Evento emesso prima della chiusura della dialog
564
+ * Permette di validare e impedire la chiusura chiamando preventDefault()
565
+ */
566
+ beforeClose: EventEmitter<DialogBeforeCloseEvent>;
567
+ constructor(dialogRef: MatDialogRef<DialogBaseComponent>);
568
+ /**
569
+ * Gestisce il click sul pulsante X di chiusura
570
+ */
571
+ onCloseClick(): void;
572
+ /**
573
+ * Gestisce il click su un pulsante della dialog
574
+ */
575
+ onButtonClick(button: DialogButton): void;
576
+ /**
577
+ * Chiude la dialog dopo aver validato
578
+ */
579
+ private closeDialog;
580
+ /**
581
+ * Verifica se la validazione è OK
582
+ */
583
+ isValid(): boolean;
584
+ /**
585
+ * Ottiene i pulsanti allineati a sinistra
586
+ */
587
+ getLeftButtons(): DialogButton[];
588
+ /**
589
+ * Ottiene i pulsanti allineati a destra
590
+ */
591
+ getRightButtons(): DialogButton[];
592
+ static ɵfac: i0.ɵɵFactoryDeclaration<DialogBaseComponent, never>;
593
+ static ɵcmp: i0.ɵɵComponentDeclaration<DialogBaseComponent, "fh-dialog-base", never, { "title": { "alias": "title"; "required": false; }; "buttons": { "alias": "buttons"; "required": false; }; "showCloseButton": { "alias": "showCloseButton"; "required": false; }; "canValidate": { "alias": "canValidate"; "required": false; }; "buttonsAlignment": { "alias": "buttonsAlignment"; "required": false; }; }, { "buttonClick": "buttonClick"; "beforeClose": "beforeClose"; }, never, ["[dialog-content]"], true, never>;
594
+ }
595
+
458
596
  declare class FHWinWaitComponent implements AfterViewInit {
459
597
  dialogRef: MatDialogRef<FHWinWaitComponent>;
460
598
  data: any;
461
599
  title: string;
462
600
  label: string;
463
601
  progress_p: number;
602
+ buttons: DialogButton[];
464
603
  constructor(dialogRef: MatDialogRef<FHWinWaitComponent>, data: any);
604
+ private updateButtons;
605
+ onBeforeClose(event: DialogBeforeCloseEvent): void;
465
606
  close(): void;
466
607
  update_progess(p: any): void;
467
608
  ngAfterViewInit(): void;
@@ -494,6 +635,7 @@ declare class FHUploadComponent {
494
635
  selezionare_tipologia: string;
495
636
  show_error: boolean;
496
637
  download_by_api: boolean;
638
+ allowed_extensions: string;
497
639
  lista_allegati: Array<any>;
498
640
  change: EventEmitter<any>;
499
641
  upload_ended: EventEmitter<any>;
@@ -541,7 +683,7 @@ declare class FHUploadComponent {
541
683
  show_upload: boolean;
542
684
  ref_allegato(): void;
543
685
  static ɵfac: i0.ɵɵFactoryDeclaration<FHUploadComponent, never>;
544
- static ɵcmp: i0.ɵɵComponentDeclaration<FHUploadComponent, "FHUpload", never, { "lascia_il_file": { "alias": "lascia_il_file"; "required": false; }; "trascina_il_file": { "alias": "trascina_il_file"; "required": false; }; "show_download_button": { "alias": "show_download_button"; "required": false; }; "show_descri": { "alias": "show_descri"; "required": false; }; "enabled": { "alias": "enabled"; "required": false; }; "single": { "alias": "single"; "required": false; }; "descri_obb": { "alias": "descri_obb"; "required": false; }; "programma_da_eseguire": { "alias": "programma_da_eseguire"; "required": false; }; "label_attendere": { "alias": "label_attendere"; "required": false; }; "sovrascrivi_path": { "alias": "sovrascrivi_path"; "required": false; }; "fixed_label": { "alias": "fixed_label"; "required": false; }; "limit_string": { "alias": "limit_string"; "required": false; }; "allegato_inserito": { "alias": "allegato_inserito"; "required": false; }; "inserire_descrizione": { "alias": "inserire_descrizione"; "required": false; }; "selezionare_tipologia": { "alias": "selezionare_tipologia"; "required": false; }; "show_error": { "alias": "show_error"; "required": false; }; "download_by_api": { "alias": "download_by_api"; "required": false; }; "lista_allegati": { "alias": "lista_allegati"; "required": false; }; }, { "change": "change"; "upload_ended": "upload_ended"; "call_upload": "call_upload"; "fill_end": "fill_end"; "init_end": "init_end"; }, never, never, true, never>;
686
+ static ɵcmp: i0.ɵɵComponentDeclaration<FHUploadComponent, "FHUpload", never, { "lascia_il_file": { "alias": "lascia_il_file"; "required": false; }; "trascina_il_file": { "alias": "trascina_il_file"; "required": false; }; "show_download_button": { "alias": "show_download_button"; "required": false; }; "show_descri": { "alias": "show_descri"; "required": false; }; "enabled": { "alias": "enabled"; "required": false; }; "single": { "alias": "single"; "required": false; }; "descri_obb": { "alias": "descri_obb"; "required": false; }; "programma_da_eseguire": { "alias": "programma_da_eseguire"; "required": false; }; "label_attendere": { "alias": "label_attendere"; "required": false; }; "sovrascrivi_path": { "alias": "sovrascrivi_path"; "required": false; }; "fixed_label": { "alias": "fixed_label"; "required": false; }; "limit_string": { "alias": "limit_string"; "required": false; }; "allegato_inserito": { "alias": "allegato_inserito"; "required": false; }; "inserire_descrizione": { "alias": "inserire_descrizione"; "required": false; }; "selezionare_tipologia": { "alias": "selezionare_tipologia"; "required": false; }; "show_error": { "alias": "show_error"; "required": false; }; "download_by_api": { "alias": "download_by_api"; "required": false; }; "allowed_extensions": { "alias": "allowed_extensions"; "required": false; }; "lista_allegati": { "alias": "lista_allegati"; "required": false; }; }, { "change": "change"; "upload_ended": "upload_ended"; "call_upload": "call_upload"; "fill_end": "fill_end"; "init_end": "init_end"; }, never, never, true, never>;
545
687
  }
546
688
 
547
689
  declare class FHWinUploadComponent implements AfterViewInit {
@@ -561,9 +703,13 @@ declare class FHWinUploadComponent implements AfterViewInit {
561
703
  title: string;
562
704
  admin_role: string;
563
705
  sovrascrivi_path: string;
706
+ allowed_extensions: string;
707
+ buttons: DialogButton[];
708
+ constructor(data: any, dialogRef: MatDialogRef<FHWinUploadComponent>, app_s: AppService);
709
+ private updateButtons;
710
+ onBeforeClose(event: DialogBeforeCloseEvent): void;
564
711
  close(): void;
565
712
  upload_ended(): void;
566
- constructor(data: any, dialogRef: MatDialogRef<FHWinUploadComponent>, app_s: AppService);
567
713
  ngAfterViewInit(): void;
568
714
  init(p_app: string, p_k: string): void;
569
715
  static ɵfac: i0.ɵɵFactoryDeclaration<FHWinUploadComponent, never>;
@@ -595,14 +741,15 @@ declare class FHWinConfirmComponent implements AfterViewInit {
595
741
  annulla_mgs: string;
596
742
  commento_mgs: string;
597
743
  insert_comment_msg: string;
598
- ok(): void;
599
- constructor(dialogRef: MatDialogRef<FHWinConfirmComponent>, app_s: AppService, conf: FHConfirmValues, toast: ToastrService);
744
+ buttons: DialogButton[];
745
+ constructor(dialogRef: MatDialogRef<FHWinConfirmComponent>, app_s: AppService, conf: FHConfirmValues, toast: ToastrService | null);
746
+ private updateButtons;
747
+ onBeforeClose(event: DialogBeforeCloseEvent): void;
600
748
  close(): void;
601
749
  setTitle(texto: string): void;
602
750
  setMsg(texto: string): void;
603
- btn_annulla?: ElementRef | null;
604
751
  ngAfterViewInit(): void;
605
- static ɵfac: i0.ɵɵFactoryDeclaration<FHWinConfirmComponent, never>;
752
+ static ɵfac: i0.ɵɵFactoryDeclaration<FHWinConfirmComponent, [null, null, null, { optional: true; }]>;
606
753
  static ɵcmp: i0.ɵɵComponentDeclaration<FHWinConfirmComponent, "ng-component", never, {}, {}, never, never, true, never>;
607
754
  }
608
755
 
@@ -622,8 +769,8 @@ declare class FHCurrencyFormatterDirective implements AfterViewInit {
622
769
  private el;
623
770
  constructor(elementRef: ElementRef, currencyPipe: FHCurrencyPipe);
624
771
  ngAfterViewInit(): void;
625
- onFocus(event: any): void;
626
- onBlur(event: any): void;
772
+ onFocus(): void;
773
+ onBlur(): void;
627
774
  static ɵfac: i0.ɵɵFactoryDeclaration<FHCurrencyFormatterDirective, never>;
628
775
  static ɵdir: i0.ɵɵDirectiveDeclaration<FHCurrencyFormatterDirective, "[FHCurrencyFormatter]", never, {}, {}, never, never, true, never>;
629
776
  }
@@ -732,20 +879,28 @@ declare class YearPickerComponent {
732
879
  declare class FHFieldPickListComponent implements ControlValueAccessor {
733
880
  private readonly m_dialog;
734
881
  private readonly _trs;
882
+ private readonly _qs;
735
883
  sql: string;
736
884
  types: any[];
737
885
  values: string[];
738
886
  hidden: boolean;
739
887
  only_in_list: boolean;
740
888
  single_sel: boolean;
889
+ /** Abilita la ricerca in memoria (filtro client-side) nel dialog di scelta. */
890
+ enableSearch: boolean;
741
891
  label: string;
742
892
  enabled: boolean;
743
893
  required: boolean;
744
894
  db_type: string;
745
895
  separator: string;
896
+ /** Valore mostrato nel campo = concatenazione delle descrizioni (descrizione_valore). */
746
897
  value: string;
898
+ /** Concatenazione dei codici (valore) selezionati, separati da `separator`. Uso per il salvataggio. */
899
+ valore: string;
900
+ /** Ultimi oggetti selezionati {valore, descrizione_valore}. */
901
+ selectedObjects: any[];
747
902
  selchange: EventEmitter<any>;
748
- constructor(m_dialog: MatDialog, _trs: TranslateService);
903
+ constructor(m_dialog: MatDialog, _trs: TranslateService, _qs: QueryService);
749
904
  setv(): void;
750
905
  resetValue(): void;
751
906
  writeValue(value: any): void;
@@ -755,8 +910,43 @@ declare class FHFieldPickListComponent implements ControlValueAccessor {
755
910
  registerOnTouched(fn: () => void): void;
756
911
  getFormattedValues(): string;
757
912
  open_pick_list(): void;
913
+ /**
914
+ * Imposta la selezione dagli oggetti {valore, descrizione_valore}.
915
+ * Ricostruisce sia il display (descrizioni) sia i codici (valore).
916
+ */
917
+ setObjects(objects: any[]): void;
918
+ /** Ritorna i codici (valore) selezionati, concatenati da `separator`. */
919
+ getValues(): string;
920
+ /** Ritorna le descrizioni (descrizione_valore) selezionate, concatenate da `separator`. */
921
+ getDescriptions(): string;
922
+ /** Ritorna gli oggetti selezionati {valore, descrizione_valore}. */
923
+ getObjects(): any[];
924
+ /**
925
+ * Ripristina la selezione a partire dai codici (valore), es. in fase di load.
926
+ * Esegue la `sql` del componente per risolvere codici -> descrizioni, quindi
927
+ * popola display e codici. Se `valoreStr` è vuoto, azzera la selezione.
928
+ */
929
+ setByValues(valoreStr: string): void;
758
930
  static ɵfac: i0.ɵɵFactoryDeclaration<FHFieldPickListComponent, never>;
759
- static ɵcmp: i0.ɵɵComponentDeclaration<FHFieldPickListComponent, "FHFieldPickList", never, { "sql": { "alias": "sql"; "required": false; }; "types": { "alias": "types"; "required": false; }; "values": { "alias": "values"; "required": false; }; "hidden": { "alias": "hidden"; "required": false; }; "only_in_list": { "alias": "only_in_list"; "required": false; }; "single_sel": { "alias": "single_sel"; "required": false; }; "label": { "alias": "label"; "required": false; }; "enabled": { "alias": "enabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "db_type": { "alias": "db_type"; "required": false; }; "separator": { "alias": "separator"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "selchange": "selchange"; }, never, never, true, never>;
931
+ static ɵcmp: i0.ɵɵComponentDeclaration<FHFieldPickListComponent, "FHFieldPickList", never, { "sql": { "alias": "sql"; "required": false; }; "types": { "alias": "types"; "required": false; }; "values": { "alias": "values"; "required": false; }; "hidden": { "alias": "hidden"; "required": false; }; "only_in_list": { "alias": "only_in_list"; "required": false; }; "single_sel": { "alias": "single_sel"; "required": false; }; "enableSearch": { "alias": "enableSearch"; "required": false; }; "label": { "alias": "label"; "required": false; }; "enabled": { "alias": "enabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "db_type": { "alias": "db_type"; "required": false; }; "separator": { "alias": "separator"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "selchange": "selchange"; }, never, never, true, never>;
932
+ }
933
+
934
+ /**
935
+ * Posizione del pulsante custom nella header bar workflow:
936
+ * - 'left' : all'inizio, prima di "Salva" (equivale a primary = true)
937
+ * - 'actions' : nel gruppo delle azioni di flusso, tra "Respingi" e "Procedi"
938
+ * (utile per mettere un pulsante subito prima del tasto di avanzamento)
939
+ * - 'right' : in fondo a destra, dopo Info/Commenti/Allegati/Workflow (default)
940
+ */
941
+ type FHToolBarCustomActionPosition = 'left' | 'actions' | 'right';
942
+ declare class FHToolBarCustomAction {
943
+ command: any;
944
+ label: string;
945
+ color?: 'primary' | 'accent' | 'warn' | string;
946
+ icon?: string;
947
+ hidden?: boolean;
948
+ primary?: boolean;
949
+ position?: FHToolBarCustomActionPosition;
760
950
  }
761
951
 
762
952
  declare class FHFormToolBarComponent {
@@ -776,7 +966,7 @@ declare class FHFormToolBarComponent {
776
966
  logShowDescription: boolean;
777
967
  logShowDiff: boolean;
778
968
  log_enabled: boolean;
779
- custom_commands: any[];
969
+ custom_commands: FHToolBarCustomAction[];
780
970
  command: EventEmitter<any>;
781
971
  constructor(_dialog: MatDialog);
782
972
  logs(): void;
@@ -849,7 +1039,101 @@ declare class GridService {
849
1039
  static ɵprov: i0.ɵɵInjectableDeclaration<GridService>;
850
1040
  }
851
1041
 
852
- declare class FHGridComponent implements AfterViewInit {
1042
+ /**
1043
+ * Modelli tipizzati per FHGridToolBar
1044
+ *
1045
+ * Questo file contiene le interfacce e gli enum per definire
1046
+ * i custom commands della toolbar in modo type-safe
1047
+ */
1048
+
1049
+ /**
1050
+ * Tipi di comando disponibili per la toolbar
1051
+ */
1052
+ declare enum FHToolbarCommandType {
1053
+ /** Pulsante standard */
1054
+ BUTTON = "button",
1055
+ /** Checkbox */
1056
+ CHECKBOX = "checkbox",
1057
+ /** Spaziatore vuoto */
1058
+ SPACER = "spacer",
1059
+ /** Table manager per gestione valori */
1060
+ TABLE_MANAGER = "table_manager"
1061
+ }
1062
+ /**
1063
+ * Interfaccia base per tutti i comandi della toolbar
1064
+ */
1065
+ interface FHToolbarCommandBase {
1066
+ /** Tipo di comando */
1067
+ type?: FHToolbarCommandType | null;
1068
+ /** Comando da emettere quando l'elemento viene attivato */
1069
+ command: string;
1070
+ /** Nasconde l'elemento se true */
1071
+ hidden?: boolean;
1072
+ }
1073
+ /**
1074
+ * Configurazione per un pulsante della toolbar
1075
+ */
1076
+ interface FHToolbarButtonCommand extends FHToolbarCommandBase {
1077
+ type?: FHToolbarCommandType.BUTTON | null;
1078
+ /** Etichetta del pulsante (verrà tradotta) */
1079
+ label?: string;
1080
+ /** Icona Material da visualizzare */
1081
+ icon?: string;
1082
+ /** Colore del pulsante (Material palette) */
1083
+ color?: ThemePalette;
1084
+ /** Se true, mostra solo l'icona con tooltip invece dell'etichetta */
1085
+ tooltipMode?: boolean;
1086
+ }
1087
+ /**
1088
+ * Configurazione per una checkbox della toolbar
1089
+ */
1090
+ interface FHToolbarCheckboxCommand extends FHToolbarCommandBase {
1091
+ type: FHToolbarCommandType.CHECKBOX;
1092
+ /** Etichetta della checkbox (verrà tradotta) */
1093
+ label: string;
1094
+ /** Valore iniziale della checkbox */
1095
+ default_value: boolean;
1096
+ }
1097
+ /**
1098
+ * Configurazione per uno spaziatore vuoto
1099
+ */
1100
+ interface FHToolbarSpacerCommand extends FHToolbarCommandBase {
1101
+ type: FHToolbarCommandType.SPACER;
1102
+ /** Lo spaziatore non necessita di un command, ma è richiesto dall'interfaccia base */
1103
+ command: '';
1104
+ }
1105
+ /**
1106
+ * Configurazione per un table manager
1107
+ */
1108
+ interface FHToolbarTableManagerCommand extends FHToolbarCommandBase {
1109
+ type: FHToolbarCommandType.TABLE_MANAGER;
1110
+ /** Nome dell'applicazione per il table manager */
1111
+ default_value: string;
1112
+ /** Il table manager non emette un command diretto */
1113
+ command: '';
1114
+ }
1115
+ /**
1116
+ * Union type per tutti i tipi di comando possibili
1117
+ */
1118
+ type FHToolbarCommand = FHToolbarButtonCommand | FHToolbarCheckboxCommand | FHToolbarSpacerCommand | FHToolbarTableManagerCommand;
1119
+ /**
1120
+ * Helper per creare un comando button in modo type-safe
1121
+ */
1122
+ declare function createButtonCommand(config: Omit<FHToolbarButtonCommand, 'type'>): FHToolbarButtonCommand;
1123
+ /**
1124
+ * Helper per creare un comando checkbox in modo type-safe
1125
+ */
1126
+ declare function createCheckboxCommand(config: Omit<FHToolbarCheckboxCommand, 'type'>): FHToolbarCheckboxCommand;
1127
+ /**
1128
+ * Helper per creare uno spaziatore in modo type-safe
1129
+ */
1130
+ declare function createSpacerCommand(): FHToolbarSpacerCommand;
1131
+ /**
1132
+ * Helper per creare un comando table manager in modo type-safe
1133
+ */
1134
+ declare function createTableManagerCommand(application: string): FHToolbarTableManagerCommand;
1135
+
1136
+ declare class FHGridComponent implements AfterViewInit, OnDestroy {
853
1137
  private _gridservice;
854
1138
  private _toast;
855
1139
  private _dataService;
@@ -861,24 +1145,35 @@ declare class FHGridComponent implements AfterViewInit {
861
1145
  private _trs;
862
1146
  private http;
863
1147
  private cdr;
1148
+ private el;
864
1149
  width_max: string;
865
1150
  browser: string;
866
1151
  getBrowserName(): "edge" | "opera" | "chrome" | "ie" | "firefox" | "safari" | "other";
867
1152
  theme: any;
1153
+ get effectiveTheme(): any;
868
1154
  gridCursorPointer: boolean;
869
1155
  pagination: boolean;
870
1156
  paginationPageSize: number;
871
1157
  paginationAutoPageSize: boolean;
872
1158
  subtitle: string | null;
873
1159
  forceFitSize: boolean;
1160
+ exportLanguage: boolean;
874
1161
  tooltipShowDelay: number;
875
1162
  elimina_label: string;
876
1163
  export_field_aggiuntivi: string;
877
1164
  end_point: string;
878
- tbl_name: string;
1165
+ /**
1166
+ * Grid configuration key used to retrieve settings from grids_customer.ini
1167
+ * @since Angular 19+ (renamed from tbl_name)
1168
+ */
1169
+ grid_config_key: string;
879
1170
  columnDefs: any[];
880
1171
  num_per_pag: number;
881
- grid_key: string;
1172
+ /**
1173
+ * Grid customer preference key used to save/load user preferences (column order, filters, etc.)
1174
+ * @since Angular 19+ (renamed from grid_key)
1175
+ */
1176
+ grid_customer_preference_key: string;
882
1177
  service: string;
883
1178
  enabled: boolean;
884
1179
  show_link: boolean;
@@ -897,6 +1192,7 @@ declare class FHGridComponent implements AfterViewInit {
897
1192
  system_dest: number;
898
1193
  header_h: number;
899
1194
  selection_mode: any;
1195
+ set_srow_on_single_select: boolean;
900
1196
  init_fill: boolean;
901
1197
  no_pref: boolean;
902
1198
  pref_hidden: boolean;
@@ -909,6 +1205,16 @@ declare class FHGridComponent implements AfterViewInit {
909
1205
  label_elementi: string;
910
1206
  trova_label: string;
911
1207
  mantieni_impostazioni: string;
1208
+ tooltip_remove_filter: string;
1209
+ tooltip_auto_size: string;
1210
+ tooltip_fit_size: string;
1211
+ tooltip_refresh: string;
1212
+ tooltip_modifica_preferenza: string;
1213
+ tooltip_elimina_preferenza: string;
1214
+ tooltip_crea_preferenza: string;
1215
+ tooltip_help: string;
1216
+ tooltip_export_pdf: string;
1217
+ tooltip_export_excel: string;
912
1218
  rowHeight: number;
913
1219
  master_detail: boolean;
914
1220
  detail_cell_renderer: any;
@@ -920,11 +1226,26 @@ declare class FHGridComponent implements AfterViewInit {
920
1226
  dclicked: EventEmitter<any>;
921
1227
  columndclicked: EventEmitter<any>;
922
1228
  cell_clicked: EventEmitter<any>;
1229
+ selection_change: EventEmitter<any[]>;
923
1230
  cellValueChanged: EventEmitter<any>;
1231
+ /**
1232
+ * Apertura della riga "in una nuova scheda": Ctrl+Click (Cmd+Click su Mac) oppure
1233
+ * click col tasto centrale del mouse. Emette i DATI DI RIGA, come `dclicked`, cosi'
1234
+ * il consumer puo' riusare la stessa logica del doppio click cambiando solo la
1235
+ * destinazione:
1236
+ *
1237
+ * (dclicked)="edit($event)" -> naviga nella stessa scheda
1238
+ * (ctrl_click)="editNewTab($event)" -> window.open(...) su una scheda nuova
1239
+ *
1240
+ * OPT-IN: se nessuno e' in ascolto la grid non fa NULLA di diverso dal solito — in
1241
+ * particolare non tocca il Ctrl+Click, che in AG Grid serve alla selezione multipla.
1242
+ * Vedi `setupCtrlClick`.
1243
+ */
1244
+ ctrl_click: EventEmitter<any>;
924
1245
  custom_export: boolean;
925
1246
  toolbar_type: string;
926
1247
  toolbar_wkfapp: any;
927
- toolbar_custom_commands: any[];
1248
+ toolbar_custom_commands: FHToolbarCommand[];
928
1249
  exec_params: any[];
929
1250
  command: EventEmitter<any>;
930
1251
  check_width(): void;
@@ -951,6 +1272,11 @@ declare class FHGridComponent implements AfterViewInit {
951
1272
  private b_restored;
952
1273
  str_curr_q_p: string;
953
1274
  p_fi: any;
1275
+ /**
1276
+ * Converts numeric filter values to strings for backend compatibility
1277
+ * AG Grid sends numbers for numeric filters, but .NET backend expects strings
1278
+ */
1279
+ private normalizeFilterModel;
954
1280
  dataSource: {
955
1281
  getRows: (params: any) => void;
956
1282
  };
@@ -972,19 +1298,60 @@ declare class FHGridComponent implements AfterViewInit {
972
1298
  b_init1: boolean;
973
1299
  private errorMsg;
974
1300
  init_opt: boolean;
1301
+ private first_load_completed;
975
1302
  ngAfterViewInit(): void;
976
1303
  okr(event: any): void;
977
1304
  help_window(): void;
978
1305
  onResize(): void;
979
1306
  show_pulisci_filtri: boolean;
980
- autoSizeAll(): void;
1307
+ private pendingAutoSize;
1308
+ private _visRO?;
1309
+ /** Elemento su cui misurare/osservare le dimensioni reali della grid.
1310
+ * ATTENZIONE: NON usare l'host <FHGrid>. Il componente non dichiara alcun display,
1311
+ * quindi il suo box e' inline: clientWidth su un box inline vale sempre 0 e
1312
+ * ResizeObserver non notifica gli inline non rimpiazzati. Misuriamo quindi il
1313
+ * wrapper interno di ag-grid (block) e, finche' non esiste, il div contenitore. */
1314
+ private visibilityTarget;
1315
+ /** True se la grid è effettivamente renderizzata con una larghezza reale
1316
+ * (non dentro un tab nascosto / display:none). */
1317
+ private isGridVisible;
1318
+ /** Osserva il contenitore della grid: appena passa da nascosta a visibile (es.
1319
+ * attivazione del tab), se c'era un auto-fit rimandato lo esegue una sola volta.
1320
+ * Idempotente: si può richiamare finché non riesce ad agganciare un target. */
1321
+ private setupVisibilityAutoSize;
1322
+ ngOnDestroy(): void;
1323
+ /** Sgancio dei listener di `setupCtrlClick`. */
1324
+ private _ctrlClickOff?;
1325
+ /**
1326
+ * true se qualcuno ha agganciato `(ctrl_click)`. La funzione e' opt-in per progetto:
1327
+ * senza ascoltatori NON si intercetta nulla, perche' in AG Grid il Ctrl+Click e' il
1328
+ * gesto della selezione multipla e rubarlo a tutte le grid dei portali sarebbe una
1329
+ * regressione.
1330
+ */
1331
+ private hasCtrlClickListener;
1332
+ /**
1333
+ * Perche' un listener DOM e non l'evento AG Grid `cellClicked`: quello passa per
1334
+ * `onCellClicked`, che esce se `b_init` e' false, e arriva DOPO che AG Grid ha gia'
1335
+ * trattato il click come selezione. In CAPTURE sull'host si intercetta prima di
1336
+ * chiunque altro, quindi il Ctrl non sposta la selezione e il tasto centrale non
1337
+ * apre l'auto-scroll del browser.
1338
+ *
1339
+ * Dalla riga del DOM si risale al record via `row-index` + `getDisplayedRowAtIndex`:
1340
+ * se la riga non e' risolvibile il click viene lasciato passare intatto.
1341
+ */
1342
+ private setupCtrlClick;
1343
+ private teardownCtrlClick;
1344
+ /** @param force true quando l'auto-fit è richiesto esplicitamente dall'utente
1345
+ * (pulsante in toolbar): in quel caso la grid è per definizione a video, quindi
1346
+ * si salta l'euristica di visibilità e non si rimanda mai. */
1347
+ autoSizeAll(force?: boolean): void;
981
1348
  fitSizeAll(): void;
982
1349
  selectCount(): number;
983
1350
  getquerySelected(f: any, t: any): string;
984
1351
  selectAllFiltered(): void;
985
1352
  deselectAllFiltered(): void;
986
1353
  pulisci_filtri(resetr?: boolean): void;
987
- constructor(_gridservice: GridService, _toast: ToastrService, _dataService: QueryService, m_appService: AppService, m_dialog: MatDialog, uti_s: UtilityService, _fileService: FileService, clipboard: Clipboard, _trs: TranslateService, http: HttpClient, cdr: ChangeDetectorRef);
1354
+ constructor(_gridservice: GridService, _toast: ToastrService, _dataService: QueryService, m_appService: AppService, m_dialog: MatDialog, uti_s: UtilityService, _fileService: FileService, clipboard: Clipboard, _trs: TranslateService, http: HttpClient, cdr: ChangeDetectorRef, el: ElementRef);
988
1355
  uiid_stampa: string;
989
1356
  xxopx: number;
990
1357
  dialogRef_W: any;
@@ -994,6 +1361,7 @@ declare class FHGridComponent implements AfterViewInit {
994
1361
  ckk_ed: boolean;
995
1362
  myData: Array<any>;
996
1363
  private ckk;
1364
+ inittedSize: boolean;
997
1365
  set_init_size(): void;
998
1366
  res_columns(forza?: boolean): void;
999
1367
  sortAndFilter(): void;
@@ -1011,7 +1379,9 @@ declare class FHGridComponent implements AfterViewInit {
1011
1379
  keyDownFunctioncl(event: any): void;
1012
1380
  private free_search;
1013
1381
  onCellClicked(event: any): void;
1014
- onSelectionChanged(): void;
1382
+ selectedRows: any[];
1383
+ onSelectionChanged(event: any): void;
1384
+ getSelectedRows(): any[];
1015
1385
  oncolumnEverythingChanged(): void;
1016
1386
  onFilterModified(): void;
1017
1387
  onBeforeSortChanged(): void;
@@ -1028,7 +1398,7 @@ declare class FHGridComponent implements AfterViewInit {
1028
1398
  Refresh(): void;
1029
1399
  RefreshOnlyMemory(): void;
1030
1400
  static ɵfac: i0.ɵɵFactoryDeclaration<FHGridComponent, never>;
1031
- static ɵcmp: i0.ɵɵComponentDeclaration<FHGridComponent, "FHGrid", never, { "theme": { "alias": "theme"; "required": false; }; "gridCursorPointer": { "alias": "gridCursorPointer"; "required": false; }; "pagination": { "alias": "pagination"; "required": false; }; "paginationPageSize": { "alias": "paginationPageSize"; "required": false; }; "paginationAutoPageSize": { "alias": "paginationAutoPageSize"; "required": false; }; "subtitle": { "alias": "subtitle"; "required": false; }; "forceFitSize": { "alias": "forceFitSize"; "required": false; }; "tooltipShowDelay": { "alias": "tooltipShowDelay"; "required": false; }; "elimina_label": { "alias": "elimina_label"; "required": false; }; "export_field_aggiuntivi": { "alias": "export_field_aggiuntivi"; "required": false; }; "end_point": { "alias": "end_point"; "required": false; }; "tbl_name": { "alias": "tbl_name"; "required": false; }; "columnDefs": { "alias": "columnDefs"; "required": false; }; "num_per_pag": { "alias": "num_per_pag"; "required": false; }; "grid_key": { "alias": "grid_key"; "required": false; }; "service": { "alias": "service"; "required": false; }; "enabled": { "alias": "enabled"; "required": false; }; "show_link": { "alias": "show_link"; "required": false; }; "show_help_bar": { "alias": "show_help_bar"; "required": false; }; "help_label_bar": { "alias": "help_label_bar"; "required": false; }; "auto_load": { "alias": "auto_load"; "required": false; }; "auto_height": { "alias": "auto_height"; "required": false; }; "enable_export": { "alias": "enable_export"; "required": false; }; "enabled_pag": { "alias": "enabled_pag"; "required": false; }; "show_help": { "alias": "show_help"; "required": false; }; "show_num_elem": { "alias": "show_num_elem"; "required": false; }; "private_pref": { "alias": "private_pref"; "required": false; }; "icons": { "alias": "icons"; "required": false; }; "system_dest": { "alias": "system_dest"; "required": false; }; "header_h": { "alias": "header_h"; "required": false; }; "selection_mode": { "alias": "selection_mode"; "required": false; }; "init_fill": { "alias": "init_fill"; "required": false; }; "no_pref": { "alias": "no_pref"; "required": false; }; "pref_hidden": { "alias": "pref_hidden"; "required": false; }; "enable_export_pdf": { "alias": "enable_export_pdf"; "required": false; }; "enable_export_xls": { "alias": "enable_export_xls"; "required": false; }; "enable_copy": { "alias": "enable_copy"; "required": false; }; "full_text_added_columns": { "alias": "full_text_added_columns"; "required": false; }; "autosize_at_ini": { "alias": "autosize_at_ini"; "required": false; }; "label_elementi": { "alias": "label_elementi"; "required": false; }; "trova_label": { "alias": "trova_label"; "required": false; }; "mantieni_impostazioni": { "alias": "mantieni_impostazioni"; "required": false; }; "rowHeight": { "alias": "rowHeight"; "required": false; }; "master_detail": { "alias": "master_detail"; "required": false; }; "detail_cell_renderer": { "alias": "detail_cell_renderer"; "required": false; }; "show_buttons": { "alias": "show_buttons"; "required": false; }; "custom_export": { "alias": "custom_export"; "required": false; }; "toolbar_type": { "alias": "toolbar_type"; "required": false; }; "toolbar_wkfapp": { "alias": "toolbar_wkfapp"; "required": false; }; "toolbar_custom_commands": { "alias": "toolbar_custom_commands"; "required": false; }; "exec_params": { "alias": "exec_params"; "required": false; }; "off_set": { "alias": "off_set"; "required": false; }; }, { "fill_end": "fill_end"; "cell_edited": "cell_edited"; "clicked": "clicked"; "dclicked": "dclicked"; "columndclicked": "columndclicked"; "cell_clicked": "cell_clicked"; "cellValueChanged": "cellValueChanged"; "command": "command"; "init_end": "init_end"; }, never, never, true, never>;
1401
+ static ɵcmp: i0.ɵɵComponentDeclaration<FHGridComponent, "FHGrid", never, { "theme": { "alias": "theme"; "required": false; }; "gridCursorPointer": { "alias": "gridCursorPointer"; "required": false; }; "pagination": { "alias": "pagination"; "required": false; }; "paginationPageSize": { "alias": "paginationPageSize"; "required": false; }; "paginationAutoPageSize": { "alias": "paginationAutoPageSize"; "required": false; }; "subtitle": { "alias": "subtitle"; "required": false; }; "forceFitSize": { "alias": "forceFitSize"; "required": false; }; "exportLanguage": { "alias": "exportLanguage"; "required": false; }; "tooltipShowDelay": { "alias": "tooltipShowDelay"; "required": false; }; "elimina_label": { "alias": "elimina_label"; "required": false; }; "export_field_aggiuntivi": { "alias": "export_field_aggiuntivi"; "required": false; }; "end_point": { "alias": "end_point"; "required": false; }; "grid_config_key": { "alias": "grid_config_key"; "required": false; }; "columnDefs": { "alias": "columnDefs"; "required": false; }; "num_per_pag": { "alias": "num_per_pag"; "required": false; }; "grid_customer_preference_key": { "alias": "grid_customer_preference_key"; "required": false; }; "service": { "alias": "service"; "required": false; }; "enabled": { "alias": "enabled"; "required": false; }; "show_link": { "alias": "show_link"; "required": false; }; "show_help_bar": { "alias": "show_help_bar"; "required": false; }; "help_label_bar": { "alias": "help_label_bar"; "required": false; }; "auto_load": { "alias": "auto_load"; "required": false; }; "auto_height": { "alias": "auto_height"; "required": false; }; "enable_export": { "alias": "enable_export"; "required": false; }; "enabled_pag": { "alias": "enabled_pag"; "required": false; }; "show_help": { "alias": "show_help"; "required": false; }; "show_num_elem": { "alias": "show_num_elem"; "required": false; }; "private_pref": { "alias": "private_pref"; "required": false; }; "icons": { "alias": "icons"; "required": false; }; "system_dest": { "alias": "system_dest"; "required": false; }; "header_h": { "alias": "header_h"; "required": false; }; "selection_mode": { "alias": "selection_mode"; "required": false; }; "set_srow_on_single_select": { "alias": "set_srow_on_single_select"; "required": false; }; "init_fill": { "alias": "init_fill"; "required": false; }; "no_pref": { "alias": "no_pref"; "required": false; }; "pref_hidden": { "alias": "pref_hidden"; "required": false; }; "enable_export_pdf": { "alias": "enable_export_pdf"; "required": false; }; "enable_export_xls": { "alias": "enable_export_xls"; "required": false; }; "enable_copy": { "alias": "enable_copy"; "required": false; }; "full_text_added_columns": { "alias": "full_text_added_columns"; "required": false; }; "autosize_at_ini": { "alias": "autosize_at_ini"; "required": false; }; "label_elementi": { "alias": "label_elementi"; "required": false; }; "trova_label": { "alias": "trova_label"; "required": false; }; "mantieni_impostazioni": { "alias": "mantieni_impostazioni"; "required": false; }; "tooltip_remove_filter": { "alias": "tooltip_remove_filter"; "required": false; }; "tooltip_auto_size": { "alias": "tooltip_auto_size"; "required": false; }; "tooltip_fit_size": { "alias": "tooltip_fit_size"; "required": false; }; "tooltip_refresh": { "alias": "tooltip_refresh"; "required": false; }; "tooltip_modifica_preferenza": { "alias": "tooltip_modifica_preferenza"; "required": false; }; "tooltip_elimina_preferenza": { "alias": "tooltip_elimina_preferenza"; "required": false; }; "tooltip_crea_preferenza": { "alias": "tooltip_crea_preferenza"; "required": false; }; "tooltip_help": { "alias": "tooltip_help"; "required": false; }; "tooltip_export_pdf": { "alias": "tooltip_export_pdf"; "required": false; }; "tooltip_export_excel": { "alias": "tooltip_export_excel"; "required": false; }; "rowHeight": { "alias": "rowHeight"; "required": false; }; "master_detail": { "alias": "master_detail"; "required": false; }; "detail_cell_renderer": { "alias": "detail_cell_renderer"; "required": false; }; "show_buttons": { "alias": "show_buttons"; "required": false; }; "custom_export": { "alias": "custom_export"; "required": false; }; "toolbar_type": { "alias": "toolbar_type"; "required": false; }; "toolbar_wkfapp": { "alias": "toolbar_wkfapp"; "required": false; }; "toolbar_custom_commands": { "alias": "toolbar_custom_commands"; "required": false; }; "exec_params": { "alias": "exec_params"; "required": false; }; "off_set": { "alias": "off_set"; "required": false; }; }, { "fill_end": "fill_end"; "cell_edited": "cell_edited"; "clicked": "clicked"; "dclicked": "dclicked"; "columndclicked": "columndclicked"; "cell_clicked": "cell_clicked"; "selection_change": "selection_change"; "cellValueChanged": "cellValueChanged"; "ctrl_click": "ctrl_click"; "command": "command"; "init_end": "init_end"; }, never, never, true, never>;
1032
1402
  }
1033
1403
 
1034
1404
  interface FHGridColumn {
@@ -1069,11 +1439,11 @@ declare class FHGridJSONComponent {
1069
1439
  m_appService: AppService;
1070
1440
  private m_dialog;
1071
1441
  private _trs;
1072
- tbl_name: string;
1442
+ grid_config_key: string;
1073
1443
  columnDefs: any[];
1074
1444
  count_tbl_name: string;
1075
1445
  num_per_pag: number;
1076
- grid_key: string;
1446
+ grid_customer_preference_key: string;
1077
1447
  sort_field: string;
1078
1448
  fields: string;
1079
1449
  filters: string;
@@ -1192,7 +1562,7 @@ declare class FHGridJSONComponent {
1192
1562
  Refresh(): void;
1193
1563
  RefreshOnlyMemory(): void;
1194
1564
  static ɵfac: i0.ɵɵFactoryDeclaration<FHGridJSONComponent, never>;
1195
- static ɵcmp: i0.ɵɵComponentDeclaration<FHGridJSONComponent, "FHGridJSON", never, { "tbl_name": { "alias": "tbl_name"; "required": false; }; "columnDefs": { "alias": "columnDefs"; "required": false; }; "count_tbl_name": { "alias": "count_tbl_name"; "required": false; }; "num_per_pag": { "alias": "num_per_pag"; "required": false; }; "grid_key": { "alias": "grid_key"; "required": false; }; "sort_field": { "alias": "sort_field"; "required": false; }; "fields": { "alias": "fields"; "required": false; }; "filters": { "alias": "filters"; "required": false; }; "auto_height": { "alias": "auto_height"; "required": false; }; "enable_export": { "alias": "enable_export"; "required": false; }; "enabled_pag": { "alias": "enabled_pag"; "required": false; }; "show_help": { "alias": "show_help"; "required": false; }; "show_num_elem": { "alias": "show_num_elem"; "required": false; }; "system_dest": { "alias": "system_dest"; "required": false; }; "header_h": { "alias": "header_h"; "required": false; }; "g_width": { "alias": "g_width"; "required": false; }; "g_height": { "alias": "g_height"; "required": false; }; "init_fill": { "alias": "init_fill"; "required": false; }; "label_elementi": { "alias": "label_elementi"; "required": false; }; "trova_label": { "alias": "trova_label"; "required": false; }; "mantieni_impostazioni": { "alias": "mantieni_impostazioni"; "required": false; }; "show_buttons": { "alias": "show_buttons"; "required": false; }; "off_set": { "alias": "off_set"; "required": false; }; }, { "fill_end": "fill_end"; "cell_edited": "cell_edited"; "clicked": "clicked"; "dclicked": "dclicked"; "columndclicked": "columndclicked"; "cell_clicked": "cell_clicked"; "init_end": "init_end"; }, never, never, true, never>;
1565
+ static ɵcmp: i0.ɵɵComponentDeclaration<FHGridJSONComponent, "FHGridJSON", never, { "grid_config_key": { "alias": "grid_config_key"; "required": false; }; "columnDefs": { "alias": "columnDefs"; "required": false; }; "count_tbl_name": { "alias": "count_tbl_name"; "required": false; }; "num_per_pag": { "alias": "num_per_pag"; "required": false; }; "grid_customer_preference_key": { "alias": "grid_customer_preference_key"; "required": false; }; "sort_field": { "alias": "sort_field"; "required": false; }; "fields": { "alias": "fields"; "required": false; }; "filters": { "alias": "filters"; "required": false; }; "auto_height": { "alias": "auto_height"; "required": false; }; "enable_export": { "alias": "enable_export"; "required": false; }; "enabled_pag": { "alias": "enabled_pag"; "required": false; }; "show_help": { "alias": "show_help"; "required": false; }; "show_num_elem": { "alias": "show_num_elem"; "required": false; }; "system_dest": { "alias": "system_dest"; "required": false; }; "header_h": { "alias": "header_h"; "required": false; }; "g_width": { "alias": "g_width"; "required": false; }; "g_height": { "alias": "g_height"; "required": false; }; "init_fill": { "alias": "init_fill"; "required": false; }; "label_elementi": { "alias": "label_elementi"; "required": false; }; "trova_label": { "alias": "trova_label"; "required": false; }; "mantieni_impostazioni": { "alias": "mantieni_impostazioni"; "required": false; }; "show_buttons": { "alias": "show_buttons"; "required": false; }; "off_set": { "alias": "off_set"; "required": false; }; }, { "fill_end": "fill_end"; "cell_edited": "cell_edited"; "clicked": "clicked"; "dclicked": "dclicked"; "columndclicked": "columndclicked"; "cell_clicked": "cell_clicked"; "init_end": "init_end"; }, never, never, true, never>;
1196
1566
  }
1197
1567
 
1198
1568
  declare class FHHelpButtonComponent {
@@ -1600,16 +1970,15 @@ declare class FHPickFieldComponent implements AfterViewInit {
1600
1970
  declare class FHColorPickerComponent implements AfterViewInit, ControlValueAccessor {
1601
1971
  hidden: boolean;
1602
1972
  enabled: boolean;
1603
- change: EventEmitter<any>;
1604
- _color: Color | null;
1605
- colorControl: ColorPickerControl;
1606
- isVisible: boolean;
1973
+ /** Larghezza della dialog del color picker (ngx-color-picker cpWidth). */
1974
+ cpWidth: string;
1975
+ change: EventEmitter<string>;
1976
+ _color: string;
1977
+ presetColors: string[];
1607
1978
  set color(color: string);
1608
1979
  colorChange: EventEmitter<string>;
1609
- get background(): string | null;
1610
- ngOnInit(): void;
1611
- showColorPicker(event: MouseEvent): void;
1612
- applyClick(event: MouseEvent): void;
1980
+ onColorChange(color: string): void;
1981
+ onColorSelect(color: string): void;
1613
1982
  constructor();
1614
1983
  ngAfterViewInit(): void;
1615
1984
  writeValue(value: any): void;
@@ -1617,21 +1986,147 @@ declare class FHColorPickerComponent implements AfterViewInit, ControlValueAcces
1617
1986
  onTouched: () => void;
1618
1987
  registerOnChange(fn: (_: any) => void): void;
1619
1988
  registerOnTouched(fn: () => void): void;
1989
+ /**
1990
+ * Ritorna il colore selezionato in formato stringa esadecimale
1991
+ * @returns Stringa esadecimale nel formato #RRGGBB o #RRGGBBAA
1992
+ */
1993
+ toHexString(): string;
1620
1994
  static ɵfac: i0.ɵɵFactoryDeclaration<FHColorPickerComponent, never>;
1621
- static ɵcmp: i0.ɵɵComponentDeclaration<FHColorPickerComponent, "FHColorPicker", never, { "hidden": { "alias": "hidden"; "required": false; }; "enabled": { "alias": "enabled"; "required": false; }; "color": { "alias": "color"; "required": false; }; }, { "change": "change"; "colorChange": "colorChange"; }, never, never, true, never>;
1995
+ static ɵcmp: i0.ɵɵComponentDeclaration<FHColorPickerComponent, "FHColorPicker", never, { "hidden": { "alias": "hidden"; "required": false; }; "enabled": { "alias": "enabled"; "required": false; }; "cpWidth": { "alias": "cpWidth"; "required": false; }; "color": { "alias": "color"; "required": false; }; }, { "change": "change"; "colorChange": "colorChange"; }, never, never, true, never>;
1622
1996
  }
1623
1997
 
1624
- declare class WkfService {
1625
- private http;
1626
- private app_s;
1627
- private toastr;
1628
- private uti_s;
1629
- headers?: HttpHeaders | null;
1630
- constructor(http: HttpClient, app_s: AppService, toastr: ToastrService, uti_s: UtilityService);
1631
- url: string | null;
1632
- doQuery(queryp: QParam, displayError?: boolean): Observable<QResult>;
1633
- static ɵfac: i0.ɵɵFactoryDeclaration<WkfService, never>;
1634
- static ɵprov: i0.ɵɵInjectableDeclaration<WkfService>;
1998
+ type IconStyle = 'all' | 'solid' | 'brands';
1999
+ /** Formato del valore emesso (ngModel / change). */
2000
+ type ValueFormat = 'name' | 'plain' | 'class';
2001
+ interface IconEntry {
2002
+ name: string;
2003
+ cls: string;
2004
+ style: 'solid' | 'brands';
2005
+ }
2006
+ /**
2007
+ * FHIconPicker — selettore di icone FontAwesome (solo set FREE).
2008
+ *
2009
+ * Ispirato a https://github.com/tech-advantage/ngx-icon-picker ma:
2010
+ * - standalone, ControlValueAccessor (usabile con [(ngModel)])
2011
+ * - nessuna dipendenza npm aggiuntiva: rende le icone via classi CSS,
2012
+ * quindi richiede che l'app abbia caricato il CSS di FontAwesome 6.
2013
+ * - popup di selezione via CDK Overlay con ricerca, tab Tutte/Solid/Brands,
2014
+ * navigazione da tastiera (frecce / Invio / Esc) e icone recenti.
2015
+ *
2016
+ * VALORE EMESSO (ngModel / change): per default è il **nome testuale** dell'icona,
2017
+ * es. "fa-bookmark" (formato 'name'). Configurabile con [valueFormat]:
2018
+ * - 'name' -> "fa-bookmark" (default)
2019
+ * - 'plain' -> "bookmark"
2020
+ * - 'class' -> "fa-solid fa-bookmark" (classe CSS completa)
2021
+ *
2022
+ * In input accetta tutti i formati (nome, nome con prefisso, sintassi FA5
2023
+ * "fas fa-x"/"fa fa-x", classe completa) e li normalizza internamente.
2024
+ *
2025
+ * Esempio:
2026
+ * <FHIconPicker [(ngModel)]="obj.icona" [label]="'Icona'" [enabled]="canEdit"
2027
+ * (change)="onIconChange($event)"></FHIconPicker>
2028
+ */
2029
+ declare class FHIconPickerComponent implements OnInit, ControlValueAccessor {
2030
+ private cdr;
2031
+ label: string;
2032
+ placeholder: string;
2033
+ enabled: boolean;
2034
+ hidden: boolean;
2035
+ required: boolean;
2036
+ error: string;
2037
+ /** Mostra il pulsante per azzerare la selezione. */
2038
+ allowClear: boolean;
2039
+ /** Tab attiva all'apertura: 'all' | 'solid' | 'brands'. */
2040
+ defaultStyle: IconStyle;
2041
+ /** Vista iniziale del popup: 'grid' | 'list'. */
2042
+ defaultView: 'grid' | 'list';
2043
+ /** Formato del valore emesso: 'name' (fa-bookmark) | 'plain' (bookmark) | 'class'. */
2044
+ valueFormat: ValueFormat;
2045
+ /** Quante icone recenti memorizzare (0 = disattiva). */
2046
+ recentCount: number;
2047
+ /** Emette il nome dell'icona nel formato configurato (valueFormat). */
2048
+ change: EventEmitter<string>;
2049
+ /** Banana-in-a-box: supporto a [(icon)] oltre a [(ngModel)]. */
2050
+ iconChange: EventEmitter<string>;
2051
+ searchBox?: ElementRef<HTMLInputElement>;
2052
+ triggerRef?: ElementRef<HTMLElement>;
2053
+ gridRef?: ElementRef<HTMLElement>;
2054
+ cells?: QueryList<ElementRef<HTMLElement>>;
2055
+ private static readonly RECENT_KEY;
2056
+ /** Classe CSS completa dell'icona selezionata (uso interno per il rendering). */
2057
+ _value: string;
2058
+ /** Valore "di output" (nel formato configurato) mostrato nel trigger. */
2059
+ outValue: string;
2060
+ panelOpen: boolean;
2061
+ panelWidth: number;
2062
+ search: string;
2063
+ activeStyle: IconStyle;
2064
+ view: 'grid' | 'list';
2065
+ highlightIndex: number;
2066
+ private allSolid;
2067
+ private allBrands;
2068
+ private allIcons;
2069
+ private styleByName;
2070
+ filtered: IconEntry[];
2071
+ recent: string[];
2072
+ overlayPositions: ({
2073
+ readonly originX: "start";
2074
+ readonly originY: "bottom";
2075
+ readonly overlayX: "start";
2076
+ readonly overlayY: "top";
2077
+ readonly offsetY: 6;
2078
+ } | {
2079
+ readonly originX: "start";
2080
+ readonly originY: "top";
2081
+ readonly overlayX: "start";
2082
+ readonly overlayY: "bottom";
2083
+ readonly offsetY: -6;
2084
+ })[];
2085
+ constructor(cdr: ChangeDetectorRef);
2086
+ ngOnInit(): void;
2087
+ private get currentSet();
2088
+ togglePanel(): void;
2089
+ openPanel(): void;
2090
+ closePanel(): void;
2091
+ setStyle(style: IconStyle): void;
2092
+ setView(v: 'grid' | 'list'): void;
2093
+ applyFilter(): void;
2094
+ selectIcon(cls: string): void;
2095
+ clear(ev?: Event): void;
2096
+ private setVal;
2097
+ /** Nome di output per una classe completa (usato per i tooltip dei recenti). */
2098
+ outOf(cls: string): string;
2099
+ trackByIcon(_: number, item: IconEntry): string;
2100
+ onPanelKeydown(ev: KeyboardEvent): void;
2101
+ private computeColumns;
2102
+ private scrollHighlightIntoView;
2103
+ private loadRecent;
2104
+ private pushRecent;
2105
+ /** Ritorna il valore nel formato configurato (es. "fa-bookmark"). */
2106
+ getValue(): string;
2107
+ /** Ritorna SEMPRE la classe CSS completa (es. "fa-solid fa-bookmark"). */
2108
+ getCssClass(): string;
2109
+ /** Imposta l'icona da qualsiasi formato (nome, fa-name, fas fa-name, classe completa). */
2110
+ setValue(value: string): void;
2111
+ /** Azzera la selezione. */
2112
+ reset(): void;
2113
+ writeValue(value: any): void;
2114
+ /**
2115
+ * Estrae nome + stile da una stringa in qualsiasi formato:
2116
+ * "fa-solid fa-house", "fas fa-house", "fa fa-house", "fa-house", "house".
2117
+ */
2118
+ private parse;
2119
+ /** Normalizza un valore in classe CSS completa per il rendering. */
2120
+ private toFullClass;
2121
+ /** Converte una classe completa nel formato di output configurato. */
2122
+ private toOutput;
2123
+ onChange: (_: any) => void;
2124
+ onTouched: () => void;
2125
+ registerOnChange(fn: (_: any) => void): void;
2126
+ registerOnTouched(fn: () => void): void;
2127
+ setDisabledState(isDisabled: boolean): void;
2128
+ static ɵfac: i0.ɵɵFactoryDeclaration<FHIconPickerComponent, never>;
2129
+ static ɵcmp: i0.ɵɵComponentDeclaration<FHIconPickerComponent, "FHIconPicker", never, { "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "enabled": { "alias": "enabled"; "required": false; }; "hidden": { "alias": "hidden"; "required": false; }; "required": { "alias": "required"; "required": false; }; "error": { "alias": "error"; "required": false; }; "allowClear": { "alias": "allowClear"; "required": false; }; "defaultStyle": { "alias": "defaultStyle"; "required": false; }; "defaultView": { "alias": "defaultView"; "required": false; }; "valueFormat": { "alias": "valueFormat"; "required": false; }; "recentCount": { "alias": "recentCount"; "required": false; }; }, { "change": "change"; "iconChange": "iconChange"; }, never, never, true, never>;
1635
2130
  }
1636
2131
 
1637
2132
  declare class FHNotesPanelComponent {
@@ -1640,7 +2135,6 @@ declare class FHNotesPanelComponent {
1640
2135
  m_appService: AppService;
1641
2136
  private readonly toastr;
1642
2137
  private readonly _dataService;
1643
- private readonly m_wkf;
1644
2138
  private readonly m_file;
1645
2139
  private readonly _tsr;
1646
2140
  commenti_list: Array<any>;
@@ -1655,7 +2149,7 @@ declare class FHNotesPanelComponent {
1655
2149
  set App(value: string | null);
1656
2150
  get K(): string | null;
1657
2151
  set K(value: string | null);
1658
- constructor(dialogRef: MatDialogRef<FHNotesPanelComponent>, m_dialogRef: MatDialog, m_appService: AppService, toastr: ToastrService, _dataService: QueryService, m_wkf: WkfService, m_file: FileService, _tsr: TranslateService);
2152
+ constructor(dialogRef: MatDialogRef<FHNotesPanelComponent>, m_dialogRef: MatDialog, m_appService: AppService, toastr: ToastrService, _dataService: QueryService, m_file: FileService, _tsr: TranslateService);
1659
2153
  edit_comm(event: any): void;
1660
2154
  delete_comm(event: any): void;
1661
2155
  refresh_list(): void;
@@ -1720,8 +2214,8 @@ declare class FHGridToolBarComponent implements AfterViewInit {
1720
2214
  b_wait: boolean;
1721
2215
  type: string;
1722
2216
  toolbar_wkfapp: any;
1723
- custom_commands: any[];
1724
- custom_commands_primary: any[];
2217
+ custom_commands: FHToolbarCommand[];
2218
+ custom_commands_primary: FHToolbarCommand[];
1725
2219
  sRow: any;
1726
2220
  command: EventEmitter<any>;
1727
2221
  ngAfterViewInit(): void;
@@ -1747,29 +2241,27 @@ declare class FHGridToolBarComponent implements AfterViewInit {
1747
2241
  declare class FHWinErrorComponent {
1748
2242
  dialogRef: MatDialogRef<FHWinErrorComponent>;
1749
2243
  data: any;
1750
- b_edit: boolean;
1751
2244
  msg_dialog: string;
1752
2245
  title: string;
1753
- close(): void;
1754
- ta: ElementRef | undefined;
2246
+ buttons: DialogButton[];
1755
2247
  constructor(dialogRef: MatDialogRef<FHWinErrorComponent>, data: any);
1756
- ngAfterViewInit(): void;
2248
+ onBeforeClose(event: DialogBeforeCloseEvent): void;
2249
+ close(): void;
1757
2250
  static ɵfac: i0.ɵɵFactoryDeclaration<FHWinErrorComponent, never>;
1758
- static ɵcmp: i0.ɵɵComponentDeclaration<FHWinErrorComponent, "ng-component", never, {}, {}, never, never, true, never>;
2251
+ static ɵcmp: i0.ɵɵComponentDeclaration<FHWinErrorComponent, "fh-win-error", never, {}, {}, never, never, true, never>;
1759
2252
  }
1760
2253
 
1761
2254
  declare class FHWinInfoComponent {
1762
2255
  dialogRef: MatDialogRef<FHWinInfoComponent>;
1763
2256
  data: any;
1764
- b_edit: boolean;
1765
2257
  msg_dialog: string;
1766
2258
  title: string;
1767
- close(): void;
1768
- ta: ElementRef | undefined;
2259
+ buttons: DialogButton[];
1769
2260
  constructor(dialogRef: MatDialogRef<FHWinInfoComponent>, data: any);
1770
- ngAfterViewInit(): void;
2261
+ onBeforeClose(event: DialogBeforeCloseEvent): void;
2262
+ close(): void;
1771
2263
  static ɵfac: i0.ɵɵFactoryDeclaration<FHWinInfoComponent, never>;
1772
- static ɵcmp: i0.ɵɵComponentDeclaration<FHWinInfoComponent, "ng-component", never, {}, {}, never, never, true, never>;
2264
+ static ɵcmp: i0.ɵɵComponentDeclaration<FHWinInfoComponent, "fh-win-info", never, {}, {}, never, never, true, never>;
1773
2265
  }
1774
2266
 
1775
2267
  declare class FHDateRangePickerComponent {
@@ -2033,6 +2525,16 @@ declare class FHUploadPanelComponent implements AfterViewInit {
2033
2525
  init(p_app: string, p_k: string, p_tipo?: string, programma_da_eseguire?: string): void;
2034
2526
  do_upload(App: string, K: string, descri_all: string, m_p_tipo: string, m_programma_da_eseguire: string): void;
2035
2527
  ref_allegato(): void;
2528
+ /**
2529
+ * Verifica se ci sono file caricati nel pannello upload
2530
+ * @returns true se ci sono file caricati, false altrimenti
2531
+ */
2532
+ hasFiles(): boolean;
2533
+ /**
2534
+ * Ottiene la lista dei file caricati
2535
+ * @returns Array dei file caricati o array vuoto se non ci sono file
2536
+ */
2537
+ getFilesList(): any[];
2036
2538
  static ɵfac: i0.ɵɵFactoryDeclaration<FHUploadPanelComponent, never>;
2037
2539
  static ɵcmp: i0.ɵɵComponentDeclaration<FHUploadPanelComponent, "FHUploadPanel", never, { "enabled": { "alias": "enabled"; "required": false; }; "show_dim": { "alias": "show_dim"; "required": false; }; "show_descri": { "alias": "show_descri"; "required": false; }; "show_preview": { "alias": "show_preview"; "required": false; }; "forceDownload": { "alias": "forceDownload"; "required": false; }; "label": { "alias": "label"; "required": false; }; "sovrascrivi_path": { "alias": "sovrascrivi_path"; "required": false; }; "ruolo_supervisore": { "alias": "ruolo_supervisore"; "required": false; }; "access_control": { "alias": "access_control"; "required": false; }; "show_images": { "alias": "show_images"; "required": false; }; "can_delete_owner": { "alias": "can_delete_owner"; "required": false; }; "show_upload": { "alias": "show_upload"; "required": false; }; "show_download": { "alias": "show_download"; "required": false; }; "download_by_api": { "alias": "download_by_api"; "required": false; }; "description_required": { "alias": "description_required"; "required": false; }; "selezionare_tipologia": { "alias": "selezionare_tipologia"; "required": false; }; "show_delete": { "alias": "show_delete"; "required": false; }; }, { "upload_ended": "upload_ended"; "expand": "expand"; "file_copy": "file_copy"; "change": "change"; "call_upload": "call_upload"; "init_end": "init_end"; "after_init": "after_init"; }, never, never, true, never>;
2038
2540
  }
@@ -2296,12 +2798,14 @@ declare class FHWinAppLogsComponent implements AfterViewInit {
2296
2798
  title: string;
2297
2799
  data: any;
2298
2800
  b_commento: boolean;
2299
- close(): void;
2801
+ buttons: DialogButton[];
2802
+ columnDefs: any[];
2803
+ commento_label: string;
2300
2804
  ngAfterViewInit(): void;
2301
2805
  cce(event: any): void;
2302
- commento_label: string;
2303
2806
  constructor(dialogRef: MatDialogRef<FHWinAppLogsComponent>, m_dialogRef: MatDialog, m_appService: AppService, m_translateService: TranslateService, uti: UtilityService, datax: any);
2304
- columnDefs: any[];
2807
+ private updateButtons;
2808
+ onBeforeClose(event: DialogBeforeCloseEvent): void;
2305
2809
  static ɵfac: i0.ɵɵFactoryDeclaration<FHWinAppLogsComponent, never>;
2306
2810
  static ɵcmp: i0.ɵɵComponentDeclaration<FHWinAppLogsComponent, "ng-component", never, {}, {}, never, never, true, never>;
2307
2811
  }
@@ -2313,7 +2817,10 @@ declare class FHWinAskButtonsComponent implements AfterViewInit {
2313
2817
  title: string;
2314
2818
  button_config: Array<any>;
2315
2819
  show_close: boolean;
2820
+ buttons: DialogButton[];
2316
2821
  constructor(dialogRef: MatDialogRef<FHWinAskButtonsComponent>, data: any);
2822
+ private updateButtons;
2823
+ onBeforeClose(event: DialogBeforeCloseEvent): void;
2317
2824
  open(o: any): void;
2318
2825
  close(): void;
2319
2826
  static ɵfac: i0.ɵɵFactoryDeclaration<FHWinAskButtonsComponent, never>;
@@ -2331,45 +2838,22 @@ declare class FHWinAskNumberComponent implements AfterViewInit {
2331
2838
  value_min: number;
2332
2839
  value_max: number;
2333
2840
  decimal_n: number;
2334
- constructor(dialogRef: MatDialogRef<FHWinAskNumberComponent>, toastr: ToastrService, data: any);
2841
+ buttons: DialogButton[];
2842
+ constructor(dialogRef: MatDialogRef<FHWinAskNumberComponent>, toastr: ToastrService | null, data: any);
2843
+ private updateButtons;
2844
+ onBeforeClose(event: DialogBeforeCloseEvent): void;
2335
2845
  show(): void;
2336
2846
  close(): void;
2337
2847
  hide(): void;
2338
- do_check(): void;
2339
2848
  chiudi(): void;
2340
- static ɵfac: i0.ɵɵFactoryDeclaration<FHWinAskNumberComponent, never>;
2341
- static ɵcmp: i0.ɵɵComponentDeclaration<FHWinAskNumberComponent, "app-win_ask_text", never, {}, {}, never, never, true, never>;
2849
+ static ɵfac: i0.ɵɵFactoryDeclaration<FHWinAskNumberComponent, [null, { optional: true; }, null]>;
2850
+ static ɵcmp: i0.ɵɵComponentDeclaration<FHWinAskNumberComponent, "app-win_ask_number", never, {}, {}, never, never, true, never>;
2342
2851
  }
2343
2852
 
2344
2853
  declare class FHWinAskRichTextComponent implements AfterViewInit {
2345
2854
  private dialogRef;
2346
2855
  private toastr;
2347
2856
  data: any;
2348
- config: {
2349
- modules: {
2350
- toolbar: ({
2351
- size: (string | boolean)[];
2352
- }[] | {
2353
- header: (number | boolean)[];
2354
- }[] | ({
2355
- color: never[];
2356
- background?: undefined;
2357
- } | {
2358
- background: never[];
2359
- color?: undefined;
2360
- })[] | {
2361
- font: never[];
2362
- }[] | {
2363
- align: never[];
2364
- }[] | (string | {
2365
- list: string;
2366
- indent?: undefined;
2367
- } | {
2368
- indent: string;
2369
- list?: undefined;
2370
- })[])[];
2371
- };
2372
- };
2373
2857
  ngAfterViewInit(): void;
2374
2858
  title: string;
2375
2859
  label: string;
@@ -2378,13 +2862,15 @@ declare class FHWinAskRichTextComponent implements AfterViewInit {
2378
2862
  show_annulla: boolean;
2379
2863
  show_ok: boolean;
2380
2864
  min_chars: number;
2381
- close(): void;
2382
- constructor(dialogRef: MatDialogRef<FHWinAskRichTextComponent>, toastr: ToastrService, data: any);
2865
+ buttons: DialogButton[];
2866
+ constructor(dialogRef: MatDialogRef<FHWinAskRichTextComponent>, toastr: ToastrService | null, data: any);
2867
+ private updateButtons;
2868
+ onBeforeClose(event: DialogBeforeCloseEvent): void;
2383
2869
  show(): void;
2384
2870
  hide(): void;
2385
- do_check(): void;
2871
+ close(): void;
2386
2872
  chiudi(): void;
2387
- static ɵfac: i0.ɵɵFactoryDeclaration<FHWinAskRichTextComponent, never>;
2873
+ static ɵfac: i0.ɵɵFactoryDeclaration<FHWinAskRichTextComponent, [null, { optional: true; }, null]>;
2388
2874
  static ɵcmp: i0.ɵɵComponentDeclaration<FHWinAskRichTextComponent, "app-win_ask_richtext", never, {}, {}, never, never, true, never>;
2389
2875
  }
2390
2876
 
@@ -2400,13 +2886,18 @@ declare class FHWinAskTextComponent implements AfterViewInit {
2400
2886
  min_chars: number;
2401
2887
  max_chars: number;
2402
2888
  readonly: boolean;
2403
- close(): void;
2404
- constructor(dialogRef: MatDialogRef<FHWinAskTextComponent>, toastr: ToastrService, data: any);
2889
+ show_annulla: boolean;
2890
+ show_ok: boolean;
2891
+ buttons: DialogButton[];
2892
+ constructor(dialogRef: MatDialogRef<FHWinAskTextComponent>, toastr: ToastrService | null, data: any);
2893
+ private updateButtons;
2894
+ onBeforeClose(event: DialogBeforeCloseEvent): void;
2895
+ triggerOk(): void;
2405
2896
  show(): void;
2406
2897
  hide(): void;
2407
- do_check(): void;
2898
+ close(): void;
2408
2899
  chiudi(): void;
2409
- static ɵfac: i0.ɵɵFactoryDeclaration<FHWinAskTextComponent, never>;
2900
+ static ɵfac: i0.ɵɵFactoryDeclaration<FHWinAskTextComponent, [null, { optional: true; }, null]>;
2410
2901
  static ɵcmp: i0.ɵɵComponentDeclaration<FHWinAskTextComponent, "app-win_ask_text", never, {}, {}, never, never, true, never>;
2411
2902
  }
2412
2903
 
@@ -2423,16 +2914,71 @@ declare class FHWinAskBigTextComponent implements AfterViewInit {
2423
2914
  show_ok: boolean;
2424
2915
  min_chars: number;
2425
2916
  error_msg: string | null;
2426
- close(): void;
2427
- constructor(dialogRef: MatDialogRef<FHWinAskBigTextComponent>, toastr: ToastrService, data: any);
2917
+ buttons: DialogButton[];
2918
+ constructor(dialogRef: MatDialogRef<FHWinAskBigTextComponent>, toastr: ToastrService | null, data: any);
2919
+ private updateButtons;
2920
+ onBeforeClose(event: DialogBeforeCloseEvent): void;
2428
2921
  show(): void;
2429
2922
  hide(): void;
2430
- do_check(): void;
2431
2923
  chiudi(): void;
2432
- static ɵfac: i0.ɵɵFactoryDeclaration<FHWinAskBigTextComponent, never>;
2924
+ static ɵfac: i0.ɵɵFactoryDeclaration<FHWinAskBigTextComponent, [null, { optional: true; }, null]>;
2433
2925
  static ɵcmp: i0.ɵɵComponentDeclaration<FHWinAskBigTextComponent, "app-win_ask_text", never, {}, {}, never, never, true, never>;
2434
2926
  }
2435
2927
 
2928
+ /**
2929
+ * fh_win_translate
2930
+ * --------------------------------------------------------------------------
2931
+ * Dialog FluxHub (basata su fh-dialog-base) per richiamare il Translation Server LLM.
2932
+ *
2933
+ * Il servizio espone:
2934
+ * POST {endpoint}/translate body: { "text": "...", "dest_lang": "it" }
2935
+ * -> { "success": true, "translation": "...", "source_lang": "en", "dest_lang": "it" }
2936
+ *
2937
+ * L'URL dell'endpoint NON è cablato: si passa dall'esterno tramite MAT_DIALOG_DATA.endpoint
2938
+ * (può cambiare a seconda del deploy). Se non passato, usa DEFAULT_ENDPOINT come fallback.
2939
+ *
2940
+ * Parametri (MAT_DIALOG_DATA):
2941
+ * endpoint string URL base del Translation Server (es. https://translate.fluxhub.com)
2942
+ * text string testo iniziale da tradurre (opzionale)
2943
+ * dest_lang string lingua destinazione iniziale: it|es|pt|el (default 'it')
2944
+ * title string titolo del dialog (opzionale)
2945
+ *
2946
+ * Apertura:
2947
+ * this.dialog.open(fh_win_translate, {
2948
+ * width: '680px', maxWidth: '95vw', maxHeight: '90vh',
2949
+ * data: { endpoint: 'https://translate.fluxhub.com', text: '...', dest_lang: 'it' }
2950
+ * });
2951
+ *
2952
+ * Ritorno (alla chiusura): { text, dest_lang, translation } se una traduzione è stata
2953
+ * eseguita, altrimenti null.
2954
+ */
2955
+ declare class fh_win_translate {
2956
+ dialogRef: MatDialogRef<fh_win_translate>;
2957
+ private http;
2958
+ private toastr;
2959
+ data: any;
2960
+ static DEFAULT_ENDPOINT: string;
2961
+ langCombo?: FHComboboxComponent;
2962
+ title: string;
2963
+ endpoint: string;
2964
+ text: string;
2965
+ dest_lang: string;
2966
+ translation: string;
2967
+ loading: boolean;
2968
+ lang_values: string;
2969
+ buttons: DialogButton[];
2970
+ constructor(dialogRef: MatDialogRef<fh_win_translate>, http: HttpClient, toastr: ToastrService, data: any);
2971
+ private updateButtons;
2972
+ /** Costruisce l'URL completo dell'endpoint /translate gestendo lo slash finale */
2973
+ private get translate_url();
2974
+ onLangChange(): void;
2975
+ do_translate(): void;
2976
+ copy(): void;
2977
+ onBeforeClose(event: DialogBeforeCloseEvent): void;
2978
+ static ɵfac: i0.ɵɵFactoryDeclaration<fh_win_translate, never>;
2979
+ static ɵcmp: i0.ɵɵComponentDeclaration<fh_win_translate, "fh-win-translate", never, {}, {}, never, never, true, never>;
2980
+ }
2981
+
2436
2982
  declare class FHWinAutoComplete implements AfterViewInit {
2437
2983
  dialogRef: MatDialogRef<FHWinAutoComplete>;
2438
2984
  private toastr;
@@ -2442,13 +2988,15 @@ declare class FHWinAutoComplete implements AfterViewInit {
2442
2988
  width: string;
2443
2989
  nota: boolean;
2444
2990
  nota_val: string;
2991
+ buttons: DialogButton[];
2445
2992
  cmb_sel?: FHComboboxComponent;
2446
- constructor(dialogRef: MatDialogRef<FHWinAutoComplete>, toastr: ToastrService, data: any);
2993
+ constructor(dialogRef: MatDialogRef<FHWinAutoComplete>, toastr: ToastrService | null, data: any);
2994
+ private updateButtons;
2995
+ onBeforeClose(event: DialogBeforeCloseEvent): void;
2447
2996
  close(): void;
2448
2997
  set_selection(lab: string, myD: Array<any>, nota?: boolean): void;
2449
- ok(): void;
2450
2998
  ngAfterViewInit(): void;
2451
- static ɵfac: i0.ɵɵFactoryDeclaration<FHWinAutoComplete, never>;
2999
+ static ɵfac: i0.ɵɵFactoryDeclaration<FHWinAutoComplete, [null, { optional: true; }, null]>;
2452
3000
  static ɵcmp: i0.ɵɵComponentDeclaration<FHWinAutoComplete, "FHWinAutoComplete", never, {}, {}, never, never, true, never>;
2453
3001
  }
2454
3002
 
@@ -2460,13 +3008,15 @@ declare class FHWinComboComponent implements AfterViewInit {
2460
3008
  width: string;
2461
3009
  nota: boolean;
2462
3010
  nota_val: string;
3011
+ buttons: DialogButton[];
2463
3012
  cmb_sel?: FHComboboxComponent;
2464
- constructor(dialogRef: MatDialogRef<FHWinComboComponent>, toastr: ToastrService, data: any);
3013
+ constructor(dialogRef: MatDialogRef<FHWinComboComponent>, toastr: ToastrService | null, data: any);
3014
+ private updateButtons;
3015
+ onBeforeClose(event: DialogBeforeCloseEvent): void;
2465
3016
  close(): void;
2466
3017
  set_selection(lab: string, myD: Array<any>, nota?: boolean): void;
2467
- ok(): void;
2468
3018
  ngAfterViewInit(): void;
2469
- static ɵfac: i0.ɵɵFactoryDeclaration<FHWinComboComponent, never>;
3019
+ static ɵfac: i0.ɵɵFactoryDeclaration<FHWinComboComponent, [null, { optional: true; }, null]>;
2470
3020
  static ɵcmp: i0.ɵɵComponentDeclaration<FHWinComboComponent, "FHWinComboComponent", never, {}, {}, never, never, true, never>;
2471
3021
  }
2472
3022
 
@@ -2484,16 +3034,19 @@ declare class FHWinListComponent implements AfterViewInit {
2484
3034
  single_sel: boolean;
2485
3035
  enableSearch: boolean;
2486
3036
  sel_values: string;
3037
+ sel_valori: string;
2487
3038
  required: boolean;
2488
3039
  options: null;
3040
+ buttons: DialogButton[];
2489
3041
  cmb_sel: FHListComponent | null;
2490
- constructor(appService: AppService, dialogRef: MatDialogRef<FHWinListComponent>, toastr: ToastrService, data: any);
3042
+ constructor(appService: AppService, dialogRef: MatDialogRef<FHWinListComponent>, toastr: ToastrService | null, data: any);
3043
+ private updateButtons;
3044
+ onBeforeClose(event: DialogBeforeCloseEvent): void;
2491
3045
  close(): void;
2492
3046
  doFill(): void;
2493
- ok(): void;
2494
3047
  ok_single(): void;
2495
3048
  ngAfterViewInit(): void;
2496
- static ɵfac: i0.ɵɵFactoryDeclaration<FHWinListComponent, never>;
3049
+ static ɵfac: i0.ɵɵFactoryDeclaration<FHWinListComponent, [null, null, { optional: true; }, null]>;
2497
3050
  static ɵcmp: i0.ɵɵComponentDeclaration<FHWinListComponent, "FHWinListComponent", never, {}, {}, never, never, true, never>;
2498
3051
  }
2499
3052
 
@@ -2504,7 +3057,6 @@ declare class FHWinMappaComponent implements AfterViewInit {
2504
3057
  data: any;
2505
3058
  title: string;
2506
3059
  sql_dett: string;
2507
- close(): void;
2508
3060
  open_only_one: boolean;
2509
3061
  descri: string;
2510
3062
  zoom: number;
@@ -2514,9 +3066,13 @@ declare class FHWinMappaComponent implements AfterViewInit {
2514
3066
  infoWindowOpened: null;
2515
3067
  markers: any[];
2516
3068
  height: number;
3069
+ buttons: DialogButton[];
2517
3070
  apri_Scheda(s_id: string): void;
2518
3071
  clickedMarker(label: any, marker: MapMarker, ind: MapInfoWindow): void;
2519
3072
  constructor(dialogRef: MatDialogRef<FHWinMappaComponent>, toastr: ToastrService, m_appService: AppService, data: any);
3073
+ private updateButtons;
3074
+ onBeforeClose(event: DialogBeforeCloseEvent): void;
3075
+ close(): void;
2520
3076
  ngAfterViewInit(): void;
2521
3077
  static ɵfac: i0.ɵɵFactoryDeclaration<FHWinMappaComponent, never>;
2522
3078
  static ɵcmp: i0.ɵɵComponentDeclaration<FHWinMappaComponent, "ng-component", never, {}, {}, never, never, true, never>;
@@ -2530,13 +3086,16 @@ declare class FHWinOutputComponent implements AfterViewInit {
2530
3086
  private _tsr;
2531
3087
  data: any;
2532
3088
  ngAfterViewInit(): void;
2533
- close(): void;
2534
- copia(): void;
2535
3089
  title: string;
2536
3090
  label: string;
2537
3091
  value: string;
2538
3092
  showCopy: boolean;
3093
+ buttons: DialogButton[];
2539
3094
  constructor(dialogRef: MatDialogRef<FHWinOutputComponent>, appService: AppService, clipboard: Clipboard, toastr: ToastrService, _tsr: TranslateService, data: any);
3095
+ private updateButtons;
3096
+ onBeforeClose(event: DialogBeforeCloseEvent): void;
3097
+ copia(): void;
3098
+ close(): void;
2540
3099
  show(): void;
2541
3100
  hide(): void;
2542
3101
  chiudi(): void;
@@ -2602,6 +3161,7 @@ declare class FHWinSelectByGridComponent implements AfterViewInit {
2602
3161
  private _trs;
2603
3162
  rowData: any;
2604
3163
  gridApi: any;
3164
+ buttons: DialogButton[];
2605
3165
  onReady(event: any): void;
2606
3166
  selection_mode: any;
2607
3167
  cmd_wkf_prog(o: any): void;
@@ -2625,9 +3185,11 @@ declare class FHWinSelectByGridComponent implements AfterViewInit {
2625
3185
  columnDefs: never[];
2626
3186
  system_dest: number;
2627
3187
  title: string;
2628
- tbl_name: string;
3188
+ grid_config_key: string;
2629
3189
  tbl_flt: string;
2630
3190
  constructor(dialogRef: MatDialogRef<FHWinSelectByGridComponent>, _dataService: QueryService, toastr: ToastrService, apps: AppService, data: any, _trs: TranslateService);
3191
+ private updateButtons;
3192
+ onBeforeClose(event: DialogBeforeCloseEvent): void;
2631
3193
  option: number;
2632
3194
  init: boolean;
2633
3195
  fe(): void;
@@ -2645,15 +3207,18 @@ declare class FHWinShowEmail {
2645
3207
  m_appService: AppService;
2646
3208
  data: any;
2647
3209
  allegati: never[];
2648
- init_w(): void;
2649
3210
  App: string;
2650
3211
  K: string;
2651
3212
  Filename: string;
2652
- open_eml(): void;
2653
- open_all(u: any): void;
2654
3213
  email_obj: any;
2655
3214
  title: string;
3215
+ buttons: DialogButton[];
2656
3216
  constructor(dialogRef: MatDialogRef<FHWinShowEmail>, _fileservice: FileService, m_appService: AppService, data: any);
3217
+ private updateButtons;
3218
+ onBeforeClose(event: DialogBeforeCloseEvent): void;
3219
+ init_w(): void;
3220
+ open_eml(): void;
3221
+ open_all(u: any): void;
2657
3222
  static ɵfac: i0.ɵɵFactoryDeclaration<FHWinShowEmail, never>;
2658
3223
  static ɵcmp: i0.ɵɵComponentDeclaration<FHWinShowEmail, "ng-component", never, {}, {}, never, never, true, never>;
2659
3224
  }
@@ -2664,16 +3229,19 @@ declare class FHWinShowEmailS3 {
2664
3229
  m_appService: AppService;
2665
3230
  data: any;
2666
3231
  allegati: never[];
2667
- init_w(): void;
2668
3232
  App: string;
2669
3233
  K: string;
2670
- open_all(u: any): void;
2671
3234
  email_obj: any;
2672
3235
  title: string;
2673
3236
  web_url: string;
2674
3237
  local_dir: string;
2675
3238
  ant_preview: string;
3239
+ buttons: DialogButton[];
2676
3240
  constructor(dialogRef: MatDialogRef<FHWinShowEmailS3>, _fileservice: FileService, m_appService: AppService, data: any);
3241
+ private updateButtons;
3242
+ onBeforeClose(event: DialogBeforeCloseEvent): void;
3243
+ init_w(): void;
3244
+ open_all(u: any): void;
2677
3245
  static ɵfac: i0.ɵɵFactoryDeclaration<FHWinShowEmailS3, never>;
2678
3246
  static ɵcmp: i0.ɵɵComponentDeclaration<FHWinShowEmailS3, "ng-component", never, {}, {}, never, never, true, never>;
2679
3247
  }
@@ -2682,7 +3250,10 @@ declare class FHWinShowImage implements AfterViewInit {
2682
3250
  dialogRef: MatDialogRef<FHWinShowImage>;
2683
3251
  imageIndex: number;
2684
3252
  images: never[];
3253
+ buttons: DialogButton[];
2685
3254
  constructor(dialogRef: MatDialogRef<FHWinShowImage>);
3255
+ private updateButtons;
3256
+ onBeforeClose(event: DialogBeforeCloseEvent): void;
2686
3257
  ngAfterViewInit(): void;
2687
3258
  static ɵfac: i0.ɵɵFactoryDeclaration<FHWinShowImage, never>;
2688
3259
  static ɵcmp: i0.ɵɵComponentDeclaration<FHWinShowImage, "ng-component", never, {}, {}, never, never, true, never>;
@@ -2703,6 +3274,7 @@ declare class FHWinGridSelection implements AfterViewInit {
2703
3274
  groupColumnSize: number;
2704
3275
  rowData: any[];
2705
3276
  singleRowSel: any[];
3277
+ buttons: DialogButton[];
2706
3278
  dtm: FHGridComponent | undefined;
2707
3279
  cellClick($event: any): void;
2708
3280
  dblClick($event: any): void;
@@ -2714,6 +3286,8 @@ declare class FHWinGridSelection implements AfterViewInit {
2714
3286
  autoSizeAll(): void;
2715
3287
  fitSizeAll(): void;
2716
3288
  constructor(dialogRef: MatDialogRef<FHWinGridSelection>, m_AppService: AppService, data: any);
3289
+ private updateButtons;
3290
+ onBeforeClose(event: DialogBeforeCloseEvent): void;
2717
3291
  ie(): void;
2718
3292
  ok(): void;
2719
3293
  static ɵfac: i0.ɵɵFactoryDeclaration<FHWinGridSelection, never>;
@@ -2721,8 +3295,6 @@ declare class FHWinGridSelection implements AfterViewInit {
2721
3295
  }
2722
3296
 
2723
3297
  declare class FHWinShowLog implements AfterViewInit {
2724
- private router;
2725
- private route;
2726
3298
  private _dataService;
2727
3299
  private toastr;
2728
3300
  private dialog;
@@ -2731,13 +3303,17 @@ declare class FHWinShowLog implements AfterViewInit {
2731
3303
  dialogRef: MatDialogRef<FHWinShowLog>;
2732
3304
  data: any;
2733
3305
  title: string;
2734
- close(): void;
3306
+ buttons: DialogButton[];
2735
3307
  datagrid?: FHGridComponent;
2736
3308
  cce(event: any): void;
2737
3309
  columnDefs: any[];
3310
+ private initColumnDefs;
2738
3311
  ie(): void;
2739
3312
  show_descri(): void;
2740
- constructor(router: Router, route: ActivatedRoute, _dataService: QueryService, toastr: ToastrService, dialog: MatDialog, appService: AppService, uti: UtilityService, dialogRef: MatDialogRef<FHWinShowLog>, data: any);
3313
+ constructor(_dataService: QueryService, toastr: ToastrService, dialog: MatDialog, appService: AppService, uti: UtilityService, dialogRef: MatDialogRef<FHWinShowLog>, data: any);
3314
+ private updateButtons;
3315
+ onBeforeClose(event: DialogBeforeCloseEvent): void;
3316
+ close(): void;
2741
3317
  flt_log: string;
2742
3318
  ngAfterViewInit(): void;
2743
3319
  static ɵfac: i0.ɵɵFactoryDeclaration<FHWinShowLog, never>;
@@ -2749,8 +3325,11 @@ declare class FHWinShowLogDett implements AfterViewInit {
2749
3325
  data: any;
2750
3326
  modifiche: any[];
2751
3327
  title: string;
2752
- close(): void;
3328
+ buttons: DialogButton[];
2753
3329
  constructor(dialogRef: MatDialogRef<FHWinShowLogDett>, data: any);
3330
+ private updateButtons;
3331
+ onBeforeClose(event: DialogBeforeCloseEvent): void;
3332
+ close(): void;
2754
3333
  ngAfterViewInit(): void;
2755
3334
  static ɵfac: i0.ɵɵFactoryDeclaration<FHWinShowLogDett, never>;
2756
3335
  static ɵcmp: i0.ɵɵComponentDeclaration<FHWinShowLogDett, "ng-component", never, {}, {}, never, never, true, never>;
@@ -2765,12 +3344,15 @@ declare class FHWinTimeSlider implements AfterViewInit {
2765
3344
  res: string;
2766
3345
  h: number;
2767
3346
  m: number;
3347
+ buttons: DialogButton[];
3348
+ constructor(dialogRef: MatDialogRef<FHWinTimeSlider>, toastr: ToastrService | null, m_appService: AppService, uti_s: UtilityService);
3349
+ private updateButtons;
3350
+ onBeforeClose(event: DialogBeforeCloseEvent): void;
2768
3351
  close(): void;
2769
- constructor(dialogRef: MatDialogRef<FHWinTimeSlider>, toastr: ToastrService, m_appService: AppService, uti_s: UtilityService);
2770
3352
  change(): void;
2771
3353
  ok(): void;
2772
3354
  ngAfterViewInit(): void;
2773
- static ɵfac: i0.ɵɵFactoryDeclaration<FHWinTimeSlider, never>;
3355
+ static ɵfac: i0.ɵɵFactoryDeclaration<FHWinTimeSlider, [null, { optional: true; }, null, null]>;
2774
3356
  static ɵcmp: i0.ɵɵComponentDeclaration<FHWinTimeSlider, "fhtimeslider", never, {}, {}, never, never, true, never>;
2775
3357
  }
2776
3358
 
@@ -2778,8 +3360,6 @@ declare class FHWinUserInfo implements AfterViewInit {
2778
3360
  dialogRef: MatDialogRef<FHWinUserInfo>;
2779
3361
  appService: AppService;
2780
3362
  private _dataService;
2781
- close(): void;
2782
- constructor(dialogRef: MatDialogRef<FHWinUserInfo>, appService: AppService, _dataService: QueryService);
2783
3363
  title: string;
2784
3364
  user: string | null;
2785
3365
  user_name: string | null;
@@ -2791,6 +3371,11 @@ declare class FHWinUserInfo implements AfterViewInit {
2791
3371
  foto_ut: string;
2792
3372
  dev_mode: boolean;
2793
3373
  b_filef: boolean;
3374
+ buttons: DialogButton[];
3375
+ constructor(dialogRef: MatDialogRef<FHWinUserInfo>, appService: AppService, _dataService: QueryService);
3376
+ private updateButtons;
3377
+ onBeforeClose(event: DialogBeforeCloseEvent): void;
3378
+ close(): void;
2794
3379
  ngAfterViewInit(): void;
2795
3380
  upd_dev(dv: boolean): void;
2796
3381
  static ɵfac: i0.ɵɵFactoryDeclaration<FHWinUserInfo, never>;
@@ -2844,10 +3429,13 @@ declare class FHWinUserPickerComponent {
2844
3429
  user_sel: Array<any>;
2845
3430
  users_list_sel: Array<any>;
2846
3431
  title: string;
2847
- selchange(o: any): void;
3432
+ buttons: DialogButton[];
2848
3433
  user_picker: FHPickUsersComponent | undefined;
2849
- filtra(): void;
2850
3434
  constructor(dialogRef: MatDialogRef<FHWinUserPickerComponent>, data: any);
3435
+ private updateButtons;
3436
+ onBeforeClose(event: DialogBeforeCloseEvent): void;
3437
+ selchange(o: any): void;
3438
+ filtra(): void;
2851
3439
  getSelArr(): Array<any>;
2852
3440
  static ɵfac: i0.ɵɵFactoryDeclaration<FHWinUserPickerComponent, never>;
2853
3441
  static ɵcmp: i0.ɵɵComponentDeclaration<FHWinUserPickerComponent, "ng-component", never, { "height": { "alias": "height"; "required": false; }; "users_list": { "alias": "users_list"; "required": false; }; "single_sel": { "alias": "single_sel"; "required": false; }; "vis_buttons": { "alias": "vis_buttons"; "required": false; }; "all_users": { "alias": "all_users"; "required": false; }; "user_sel": { "alias": "user_sel"; "required": false; }; "users_list_sel": { "alias": "users_list_sel"; "required": false; }; "title": { "alias": "title"; "required": false; }; }, {}, never, never, true, never>;
@@ -2950,6 +3538,76 @@ declare class OfficeAutomatorService {
2950
3538
  static ɵprov: i0.ɵɵInjectableDeclaration<OfficeAutomatorService>;
2951
3539
  }
2952
3540
 
3541
+ /**
3542
+ * Tipo di dato di un campo passato a `FHWorkflowForm.getfieldvalues()`.
3543
+ *
3544
+ * Stesso set di `QParam.types` (vedi QParam.ts): i due contratti descrivono
3545
+ * la stessa cosa a due passi diversi della stessa pipeline (getfieldvalues()
3546
+ * costruisce i campi, save_agg() li travasa dentro un QParam per la insert_aggiuntivi).
3547
+ * 'cblob' non viene stringificato da save_agg() (nessun ramo per lui nell'if-chain):
3548
+ * il valore passa cosi' com'e', quindi qui e' vincolato a string come gli altri
3549
+ * campi testuali.
3550
+ */
3551
+ type WkfFieldType = 'string' | 'int' | 'decimal' | 'date' | 'datetime' | 'boolean' | 'cblob';
3552
+ /**
3553
+ * Un campo da salvare tramite `FHWorkflowForm.getfieldvalues()`.
3554
+ *
3555
+ * `values` accetta il valore nativo (Date per date/datetime, number per
3556
+ * int/decimal, boolean per boolean) OPPURE una stringa gia' pronta: entrambe
3557
+ * le forme sono legittime perche' e' esattamente cio' che `save_agg()` gestisce
3558
+ * gia' oggi (vedi wkf-form-data.ts, il ramo `if (arr[i].types == '...')` per
3559
+ * ciascun tipo chiama uti_s.sql_date/sql_date_time o fa un cast a stringa, e
3560
+ * se il valore era gia' una stringa nel formato giusto la passa cosi' com'e').
3561
+ * `| null | undefined` copre i campi non valorizzati (save_agg() li manda
3562
+ * come 'dbnull' con `== null`, che in JS e' vero per entrambi): `undefined`
3563
+ * non e' un caso raro, e' cio' che produce `this.qualcheControllo?.getValue()`
3564
+ * su un campo non ancora renderizzato, pattern usatissimo nei form concreti.
3565
+ *
3566
+ * Discriminato su `types`: assegnare `values: true` a un campo `types: 'datetime'`
3567
+ * e' un errore di compilazione. Non e' un vincolo nuovo, e' quello che
3568
+ * save_agg() richiede gia' silenziosamente a runtime.
3569
+ */
3570
+ type WkfFieldValue = {
3571
+ types: 'string' | 'cblob';
3572
+ names: string;
3573
+ values: string | null | undefined;
3574
+ } | {
3575
+ types: 'int' | 'decimal';
3576
+ names: string;
3577
+ values: number | string | null | undefined;
3578
+ } | {
3579
+ types: 'boolean';
3580
+ names: string;
3581
+ values: boolean | string | null | undefined;
3582
+ } | {
3583
+ types: 'date' | 'datetime';
3584
+ names: string;
3585
+ values: Date | string | null | undefined;
3586
+ };
3587
+ /**
3588
+ * Costruisce un WkfFieldValue, con `values` vincolato al ramo giusto in base
3589
+ * al `types` passato (overload esplicito, non un generico con `Extract<...>`:
3590
+ * quella via distribuisce male su un discriminated union quando il generico
3591
+ * non e' ancora risolto a un literal, e collassa il parametro a `never` --
3592
+ * provato e scartato).
3593
+ *
3594
+ * Pensato per rimpiazzare il pattern storico
3595
+ *
3596
+ * o = new Object();
3597
+ * o.types = 'boolean';
3598
+ * o.names = 'verifica_tecnico';
3599
+ * o.values = this.m_obj.verifica_tecnico;
3600
+ * p.push(o);
3601
+ *
3602
+ * con una riga sola, tipizzata:
3603
+ *
3604
+ * p.push(wkfField('boolean', 'verifica_tecnico', this.m_obj.verifica_tecnico));
3605
+ */
3606
+ declare function wkfField(types: 'string' | 'cblob', names: string, values: string | null | undefined): WkfFieldValue;
3607
+ declare function wkfField(types: 'int' | 'decimal', names: string, values: number | string | null | undefined): WkfFieldValue;
3608
+ declare function wkfField(types: 'boolean', names: string, values: boolean | string | null | undefined): WkfFieldValue;
3609
+ declare function wkfField(types: 'date' | 'datetime', names: string, values: Date | string | null | undefined): WkfFieldValue;
3610
+
2953
3611
  declare class AppMakerService {
2954
3612
  private http;
2955
3613
  private app_s;
@@ -2964,21 +3622,225 @@ declare class AppMakerService {
2964
3622
  static ɵprov: i0.ɵɵInjectableDeclaration<AppMakerService>;
2965
3623
  }
2966
3624
 
2967
- declare abstract class FHWorkflowView {
2968
- private app_s;
2969
- private m_service;
2970
- private m_dataService;
2971
- private m_router;
2972
- private _toastr;
2973
- private dialog;
2974
- private m_wkf;
2975
- private m_uti;
2976
- private tsr;
2977
- private m_fileservice;
2978
- b_editing: boolean;
2979
- is_Supervisor: boolean;
2980
- is_Visor: boolean;
2981
- is_Admin: boolean;
3625
+ /** Motivo per cui un avanzamento headless non e' andato a buon fine. */
3626
+ type WkfProceedReason = 'OK' | 'NO_DOC' | 'CLOSED' | 'TASKS_OPEN' | 'NO_LEVELS' | 'NO_CURRENT_LEVEL' | 'NO_TRANSITION' | 'MULTIPLE_TRANSITIONS' | 'NO_RECIPIENTS' | 'MANUAL_ASSIGNMENT';
3627
+ interface WkfProceedResult {
3628
+ ok: boolean;
3629
+ reason: WkfProceedReason;
3630
+ /** Step di partenza (stato del documento al momento della chiamata). */
3631
+ step_o?: number;
3632
+ /** Step di arrivo, valorizzato solo quando l'avanzamento e' partito. */
3633
+ step_d?: number;
3634
+ /** Transizioni candidate, per far scegliere al chiamante su MULTIPLE_TRANSITIONS. */
3635
+ transizioni?: any[];
3636
+ /** Destinatari (livelli) calcolati per lo step di arrivo. */
3637
+ destinatari?: any[];
3638
+ msg?: string;
3639
+ }
3640
+ interface WkfProceedOptions {
3641
+ /**
3642
+ * Step di arrivo. Obbligatorio quando dallo step corrente escono piu' transizioni
3643
+ * e non si vuole delegare la scelta ad `auto_forward`.
3644
+ */
3645
+ step_d?: number;
3646
+ /**
3647
+ * Con piu' transizioni disponibili e nessuno `step_d`: prende la prima transizione
3648
+ * IN AVANTI (step_d > step corrente) in ordine di `ord`. Senza questo flag il
3649
+ * metodo si ferma con MULTIPLE_TRANSITIONS e restituisce le candidate.
3650
+ */
3651
+ auto_forward?: boolean;
3652
+ /** Commento di avanzamento registrato sul workflow. */
3653
+ nota?: string;
3654
+ /** Titolo/descrizione usati nelle notifiche (default: codice/oggetto del documento). */
3655
+ title?: string;
3656
+ descri?: string;
3657
+ /** Username che compare come autore dell'operazione (default: utente collegato). */
3658
+ username?: string;
3659
+ /**
3660
+ * Salta il controllo sui task obbligatori ancora aperti. Da usare solo quando il
3661
+ * chiamante ha gia' verificato lui lo stato dei task.
3662
+ */
3663
+ skip_tasks_check?: boolean;
3664
+ }
3665
+ interface WkfTaskResult {
3666
+ ok: boolean;
3667
+ /** Chi detiene la presa in carico: valorizzato quando `ok` e' false per corsa persa. */
3668
+ owner?: string;
3669
+ /** Task risolto (riga di SELECT_WKF_STEP_TASKS). */
3670
+ task?: any;
3671
+ /** Esito dell'eventuale avanzamento innescato dalla chiusura. */
3672
+ proceed?: WkfProceedResult;
3673
+ msg?: string;
3674
+ }
3675
+ interface WkfCompleteTaskOptions extends WkfProceedOptions {
3676
+ /** Nota di chiusura del task. */
3677
+ nota_task?: string;
3678
+ /**
3679
+ * Chiude l'attivita' anche se l'utente non ha un ruolo abilitato su di essa
3680
+ * (`can_close`). Da usare solo per processi automatici che agiscono per conto
3681
+ * del sistema: per un'azione fatta da una persona il controllo va lasciato.
3682
+ */
3683
+ force?: boolean;
3684
+ /**
3685
+ * A task tutti chiusi tenta l'avanzamento dello step (default true). A false il
3686
+ * task viene solo chiuso e lo step resta dov'e'.
3687
+ */
3688
+ proceed?: boolean;
3689
+ }
3690
+ declare class WkfService {
3691
+ private http;
3692
+ private app_s;
3693
+ private toastr;
3694
+ private uti_s;
3695
+ private q_s;
3696
+ private f_s;
3697
+ headers?: HttpHeaders | null;
3698
+ constructor(http: HttpClient, app_s: AppService, toastr: ToastrService, uti_s: UtilityService, q_s: QueryService, f_s: FileService);
3699
+ url: string | null;
3700
+ doQuery(queryp: QParam, displayError?: boolean): Observable<QResult>;
3701
+ /** doQuery sul canale query standard (NON l'endpoint wkf di questo service). */
3702
+ private q;
3703
+ private rows;
3704
+ /**
3705
+ * I bit(1) di MySQL possono arrivare come true/false, 1/0 oppure come i byte
3706
+ * grezzi 0x01 / 0x00 a seconda del driver: qui vengono normalizzati tutti.
3707
+ */
3708
+ private is_true;
3709
+ private cur_user;
3710
+ /**
3711
+ * Riga di log sul documento (`wkf_workflow`), la stessa tabella del log del form:
3712
+ * le operazioni sulle attivita' devono comparire nel dialog LOGS come quelle del
3713
+ * motore, altrimenti una pratica avanzata da un'applicazione esterna risulta
3714
+ * mossa "da sola".
3715
+ *
3716
+ * Il dialog rende `operazione (stato_attuale)`: qui il titolo dell'attivita' va
3717
+ * nel secondo campo, cosi' la riga si legge come le altre ("... (ATTESA SCHEDA
3718
+ * TECNICA)"). Il log e' accessorio: un suo errore non deve far fallire
3719
+ * l'operazione, quindi l'errore viene assorbito.
3720
+ */
3721
+ log_task_op(id_applicativo: string, id_documento: string, operazione: string, task: any, username?: string): Observable<any>;
3722
+ private dev_mode;
3723
+ /**
3724
+ * Testata del documento di workflow (stato, canale, creatore, codice, oggetto).
3725
+ * Headless non abbiamo la vista applicativa del form: leggiamo `wkf_documents`.
3726
+ */
3727
+ load_wkf_document(id_applicativo: string, id_documento: string): Observable<any>;
3728
+ /**
3729
+ * Livelli del workflow con le variabili speciali gia' risolte sul documento.
3730
+ *
3731
+ * Replica di quello che il form fa al load: `SELECT_WLIVELLIV2_2` da' i livelli
3732
+ * di configurazione (dove `value` puo' essere un ruolo o una variabile `*XXX`),
3733
+ * `SELECT_WKF_VARIABILES_V2` da' i valori delle variabili sul documento. I
3734
+ * livelli con una variabile non risolvibile vengono scartati, esattamente come
3735
+ * nel form: un livello senza utente non e' un destinatario valido.
3736
+ */
3737
+ load_wkf_levels(id_applicativo: string, id_documento: string, doc: any): Observable<any[]>;
3738
+ /**
3739
+ * Risoluzione delle variabili speciali sui livelli.
3740
+ *
3741
+ * NB: a differenza del form NON persiste la variabile REQUESTER mancante — un
3742
+ * avanzamento headless non deve scrivere configurazione di nascosto. La sintetizza
3743
+ * solo in memoria, dal creatore del documento.
3744
+ */
3745
+ private resolve_levels;
3746
+ /** Transizioni in uscita da uno step, in ordine di configurazione (`ord`). */
3747
+ load_wkf_transitions(id_applicativo: string, step_o: number): Observable<any[]>;
3748
+ /** Attivita' (task) di uno step con lo stato sul documento. */
3749
+ load_step_tasks(id_applicativo: string, id_documento: string, step: number, username?: string): Observable<any[]>;
3750
+ /** Task obbligatori dello step ancora aperti. */
3751
+ required_tasks_open(tasks: any[]): any[];
3752
+ /**
3753
+ * Presa in carico atomica: materializza la riga, tenta l'UPDATE condizionato su
3754
+ * `preso_da IS NULL`, poi rilegge il proprietario. Chi ha vinto la corsa lo
3755
+ * decide il DB, non il frontend.
3756
+ */
3757
+ claim_task(id_applicativo: string, id_documento: string, task: any, step: number, username?: string): Observable<WkfTaskResult>;
3758
+ /**
3759
+ * Chiude un task gia' preso in carico. L'UPDATE porta `preso_da` nella WHERE:
3760
+ * se nel frattempo la presa in carico e' stata forzata via, la chiusura non passa.
3761
+ */
3762
+ close_task(id_applicativo: string, id_documento: string, task: any, nota?: string | null, username?: string): Observable<boolean>;
3763
+ /** Riapre un task chiuso, azzerando anche la presa in carico. */
3764
+ reopen_task(id_applicativo: string, id_documento: string, task: any, username?: string): Observable<boolean>;
3765
+ /**
3766
+ * Segnala a exec_wkf la chiusura di un task: sblocco dei task dipendenti,
3767
+ * lettori e notifiche. La chiusura resta un UPDATE del frontend (serve l'esito
3768
+ * sincrono della corsa), qui passa solo l'evento.
3769
+ */
3770
+ notify_task_closed(id_applicativo: string, id_documento: string, uiid_task: string, username?: string): Observable<any>;
3771
+ /**
3772
+ * Avanzamento di step innescato dalla chiusura dei task: e' l'avanza classico
3773
+ * SENZA il vincolo che chi lo esegue sia agganciato allo step corrente.
3774
+ *
3775
+ * Nel form l'avanzamento richiede che l'utente compaia tra i livelli dello step
3776
+ * corrente (`doApprova` cerca il `clevel` che combacia con lui) e che sia autore
3777
+ * del documento (`b_edit`). Su uno step in modalita' task le due cose spesso non
3778
+ * coincidono: gli esecutori dei task sono LETTORI del documento, non autori, e i
3779
+ * ruoli dei task sono diversi da quelli dello step. Qui il livello corrente si
3780
+ * prende per solo step: chi ha chiuso l'ultimo task obbligatorio fa avanzare la
3781
+ * pratica, chiunque sia.
3782
+ *
3783
+ * Cosa NON fa (e va tenuto presente):
3784
+ * - non esegue `ck_after()` del form: le validazioni applicative legate
3785
+ * all'avanzamento vanno spostate su `ck_task()` del task che chiude lo step;
3786
+ * - non gestisce l'assegnazione manuale (`manual_assignment`/`pre_assegna_man`),
3787
+ * che richiede un dialog: in quel caso si ferma con MANUAL_ASSIGNMENT;
3788
+ * - con piu' transizioni in uscita non sceglie da solo se non glielo si dice
3789
+ * (`step_d` o `auto_forward`).
3790
+ */
3791
+ proceed_from_task(id_applicativo: string, id_documento: string, opts?: WkfProceedOptions): Observable<WkfProceedResult>;
3792
+ private do_proceed;
3793
+ /**
3794
+ * Scelta della transizione: esplicita (`step_d`), unica, oppure — con
3795
+ * `auto_forward` — la prima IN AVANTI in ordine di configurazione. Gli step
3796
+ * terminali/laterali (annullamento, sospensione...) non vengono mai scelti da
3797
+ * soli: sono decisioni di un operatore, non conseguenze di un task chiuso.
3798
+ */
3799
+ private pick_transition;
3800
+ /**
3801
+ * Destinatari dello step di arrivo. Stessa logica del form (`calcola_destinari`):
3802
+ * livelli dello step di destinazione filtrati per canale, poi le restrizioni su
3803
+ * creatore (step iniziali), `default_value` e `pre_assegna_req`.
3804
+ */
3805
+ private build_recipients;
3806
+ /** Accoda l'operazione di avanzamento e lancia exec_wkf (o create_ver). */
3807
+ private exec_wkf_op;
3808
+ private run_exec_app;
3809
+ /**
3810
+ * Chiude un task dello step corrente identificato dalla sua `check_key` e, se
3811
+ * era l'ultimo obbligatorio, fa avanzare lo step. E' il metodo pensato per gli
3812
+ * applicativi esterni al flusso: una sola chiamata, esito parlante.
3813
+ *
3814
+ * La presa in carico viene fatta qui: fuori dal pannello non ha senso chiedere
3815
+ * all'utente di prendere in carico un'attivita' che sta gia' eseguendo.
3816
+ */
3817
+ complete_task(id_applicativo: string, id_documento: string, check_key: string, opts?: WkfCompleteTaskOptions): Observable<WkfTaskResult>;
3818
+ /**
3819
+ * Dopo la chiusura: se restano task obbligatori aperti si notifica soltanto lo
3820
+ * sblocco dei dipendenti; se non ne restano si avanza (l'avanzamento ricalcola
3821
+ * da se' lettori e notifiche dello step di arrivo, quindi TASK_CLOSED sarebbe
3822
+ * rumore su uno step che stiamo lasciando).
3823
+ */
3824
+ private after_close;
3825
+ static ɵfac: i0.ɵɵFactoryDeclaration<WkfService, never>;
3826
+ static ɵprov: i0.ɵɵInjectableDeclaration<WkfService>;
3827
+ }
3828
+
3829
+ declare abstract class FHWorkflowView {
3830
+ private app_s;
3831
+ private m_service;
3832
+ private m_dataService;
3833
+ private m_router;
3834
+ private _toastr;
3835
+ private dialog;
3836
+ private m_wkf;
3837
+ private m_uti;
3838
+ private tsr;
3839
+ private m_fileservice;
3840
+ b_editing: boolean;
3841
+ is_Supervisor: boolean;
3842
+ is_Visor: boolean;
3843
+ is_Admin: boolean;
2982
3844
  is_PowerUser: boolean;
2983
3845
  is_Ins: boolean;
2984
3846
  id_applicativo: string;
@@ -2986,9 +3848,9 @@ declare abstract class FHWorkflowView {
2986
3848
  att_panelcat: string;
2987
3849
  documento_pubblico: boolean;
2988
3850
  titolo_email: string;
2989
- tbl_name: string;
3851
+ grid_config_key: string;
2990
3852
  app_root: string;
2991
- grid_key: string;
3853
+ grid_customer_preference_key: string;
2992
3854
  m_id_Doc: string;
2993
3855
  livs: Array<any>;
2994
3856
  user_idp: string | null;
@@ -3014,6 +3876,7 @@ declare abstract class FHWorkflowView {
3014
3876
  set_canale_step1(): void;
3015
3877
  riassegna_richiesta_step1(): void;
3016
3878
  riassegna_richiesta_step2(): void;
3879
+ private riassegna_richiesta_step2_exec;
3017
3880
  sendEMail_ex(mit: string | null, to: string, ogg: string, descri: string, idapp: string, iddoc: string, link: string, cc: string, nota: string, notif_av?: boolean, ical?: string, b_exit?: boolean, commento?: string): void;
3018
3881
  imp: string;
3019
3882
  annulla_imp(): void;
@@ -3055,8 +3918,111 @@ declare abstract class FHWorkflowForm {
3055
3918
  next_label: string;
3056
3919
  next_label_color: string;
3057
3920
  next_back_ground_color: string;
3921
+ reject_label: string;
3922
+ reject_label_color: string;
3923
+ reject_back_ground_color: string;
3058
3924
  b_init_next: boolean;
3059
3925
  sort_field: string;
3926
+ /**
3927
+ * Riga "Assegnata a: <nomi>" nel dialog "Conferma Avanzamento".
3928
+ *
3929
+ * Default acceso: chi avanza vede a chi sta passando la pratica (comportamento
3930
+ * storico, i portali gia' in produzione non cambiano da soli). Va spento nel form
3931
+ * della pratica (`this.show_assegnatari = false;`) quando i destinatari dello step
3932
+ * successivo non devono essere visibili a chi avanza.
3933
+ *
3934
+ * Non tocca il dialog di "Conferma Assegnazione" (assegnazione manuale), dove i
3935
+ * nomi sono l'oggetto stesso della scelta, ne' il testo di stato scritto sul
3936
+ * documento e nei log.
3937
+ */
3938
+ show_assegnatari: boolean;
3939
+ step_mode: string;
3940
+ step_tasks: Array<any>;
3941
+ tasks_all_done: boolean;
3942
+ b_tasks_loading: boolean;
3943
+ /**
3944
+ * Editabilita' dei campi legati a un task, indicizzata per `check_key`.
3945
+ *
3946
+ * <FHTextInput [enabled]="task_edit['100_ATTESA_ACCONTO']" ...>
3947
+ *
3948
+ * E' una MAPPA e non un metodo perche' i template la interrogano a ogni change
3949
+ * detection: un metodo verrebbe rieseguito ogni volta (vedi la regola sui getter
3950
+ * dinamici). Viene ricalcolata da `load_step_tasks()`, cioe' all'apertura del documento
3951
+ * e dopo ogni presa in carico, chiusura o riapertura: esattamente gli eventi che possono
3952
+ * cambiare la risposta.
3953
+ *
3954
+ * Chiave assente = false (nessun task con quella `check_key` nello step corrente).
3955
+ */
3956
+ task_edit: {
3957
+ [check_key: string]: boolean;
3958
+ };
3959
+ /**
3960
+ * Avanzamento innescato dalla chiusura dell'ultimo task, non da un click su Procedi.
3961
+ *
3962
+ * L'utente ha gia' confermato nel pannello delle attivita' ("questa e' l'ultima
3963
+ * attivita' obbligatoria: vuoi procedere?"), quindi il dialog "Conferma Avanzamento"
3964
+ * del motore sarebbe una seconda domanda sulla stessa cosa: lo saltiamo, come se
3965
+ * l'utente avesse premuto OK. Consumato (rimesso a false) al primo uso.
3966
+ */
3967
+ private auto_advance;
3968
+ /**
3969
+ * L'utente ha appena chiuso un task dal pannello (dove ha gia' confermato). Distingue
3970
+ * l'avanzamento "appena confermato" da quello di RECUPERO che scatta riaprendo un
3971
+ * documento rimasto fermo con tutti i task chiusi: li' nessuno ha confermato nulla, e
3972
+ * il dialog del motore va mostrato.
3973
+ */
3974
+ private advance_confirmed;
3975
+ /**
3976
+ * Deroga attiva sull'avanzamento in corso: il livello dello step corrente si
3977
+ * risolve per solo step, senza pretendere che l'utente collegato sia uno dei
3978
+ * suoi attori. Acceso da `proceed_from_task()`, consumato a fine avanzamento.
3979
+ */
3980
+ protected proceed_ignore_actors: boolean;
3981
+ /**
3982
+ * Consente l'avanzamento automatico dello step a task tutti chiusi anche a chi
3983
+ * NON e' autore del documento (b_edit=false).
3984
+ *
3985
+ * Di default resta spento: il comportamento storico e' che avanzi solo un autore
3986
+ * dello step, e i portali gia' in produzione non devono cambiare da soli. Va
3987
+ * acceso nel form della pratica quando gli esecutori dei task NON coincidono con
3988
+ * gli attori dello step (caso tipico: task assegnati a variabili di flusso mentre
3989
+ * lo step e' di un altro ruolo), altrimenti la pratica resta ferma con tutte le
3990
+ * attivita' concluse in attesa che passi di li' un autore.
3991
+ */
3992
+ allow_proceed_from_task: boolean;
3993
+ /**
3994
+ * Avanzamento di step innescato dalla conclusione delle attivita': e' il procedi
3995
+ * classico (stesse transizioni, destinatari, notifiche e log) senza il vincolo
3996
+ * che chi lo esegue sia agganciato allo step corrente.
3997
+ *
3998
+ * @param salva_prima false (default) NON salva il form prima di avanzare. Chi
3999
+ * arriva qui non e' autore del documento: i suoi campi sono in sola lettura e
4000
+ * alcuni potrebbero non essere nemmeno renderizzati, quindi un salvataggio
4001
+ * scriverebbe valori che non ha mai visto. Si va dritti al ricarico del
4002
+ * documento, che e' cio' che innesca l'avanzamento (`doApprova`).
4003
+ *
4004
+ * Fuori dal form della pratica l'equivalente e' `WkfService.proceed_from_task()`.
4005
+ */
4006
+ proceed_from_task(salva_prima?: boolean): void;
4007
+ /**
4008
+ * Validazione applicativa alla chiusura di un task.
4009
+ * La libreria non conosce i campi della pratica: il componente concreto fa
4010
+ * l'override e decide, in base a `check_key` (stringa concordata in
4011
+ * configurazione), se ci sono dati obbligatori mancanti.
4012
+ * @returns [] se si puo' chiudere; array di messaggi per bloccare la chiusura.
4013
+ */
4014
+ ck_task(check_key: string): string[];
4015
+ /**
4016
+ * Chiamato ogni volta che lo stato dei task e' stato (ri)letto dal DB: all'apertura
4017
+ * del documento e dopo ogni presa in carico / chiusura / riapertura.
4018
+ *
4019
+ * Serve ai portali che denormalizzano lo stato dei task in colonne della propria
4020
+ * tabella dati, per mostrarlo come colonna filtrabile in griglia. La libreria non
4021
+ * sa nulla di quelle colonne: qui passa solo l'evento.
4022
+ *
4023
+ * `wkf_document_tasks` resta la verita'; le colonne del portale sono una cache.
4024
+ */
4025
+ after_task_change(): void;
3060
4026
  ripristina_imp(): void;
3061
4027
  in_carico: boolean;
3062
4028
  protected constructor(app_s: AppService, m_dataService: QueryService, m_router: Router, m_dialog: MatDialog, m_route: ActivatedRoute, m_wkf: WkfService, uti_s: UtilityService, m_fileservice: FileService, tsr: TranslateService);
@@ -3068,6 +4034,7 @@ declare abstract class FHWorkflowForm {
3068
4034
  evt_salv(rip_pulsanti?: boolean, check_on_save?: boolean): void;
3069
4035
  prendi_in_carico(): void;
3070
4036
  save_alreadypressed: boolean;
4037
+ b_saving: boolean;
3071
4038
  salva(): void;
3072
4039
  b_respingi: boolean;
3073
4040
  limite_salto_after: number;
@@ -3179,10 +4146,41 @@ declare abstract class FHWorkflowForm {
3179
4146
  insert_doc(): void;
3180
4147
  ok_livw2(r: Array<any>): void;
3181
4148
  b_edit: boolean;
4149
+ /**
4150
+ * Modalità di caricamento (edit vs nuovo documento), congelata all'init.
4151
+ * Serve a NON far dipendere il routing del load (ok_livelli_doc) dal valore di
4152
+ * `b_edit`, che i componenti possono sovrascrivere nei loro update_status: il
4153
+ * routing deve restare deterministico a prescindere da cosa fa il componente.
4154
+ */
4155
+ private _edit_load_mode;
4156
+ /**
4157
+ * L'utente corrente è tra gli `autori` (= ha in carico) del documento.
4158
+ * Logica di autorizzazione CENTRALIZZATA nella lib: i componenti non devono
4159
+ * leggere `m_obj.autori`/`lettori` per conto loro.
4160
+ */
4161
+ protected isCurrentUserAuthor(): boolean;
4162
+ /**
4163
+ * Editabilità "ufficiale" del documento decisa dalla lib: in carico (autore) e
4164
+ * documento non in uno stato finale (>=900). I componenti possono leggere questo
4165
+ * getter invece di ricalcolare l'autorizzazione.
4166
+ */
4167
+ get canEdit(): boolean;
3182
4168
  b_valid: boolean;
3183
4169
  abstract reset_form(v_t: string): void;
3184
4170
  abstract alert(v_t: string, t: number): void;
3185
- abstract getfieldvalues(): Array<any>;
4171
+ /**
4172
+ * Campi da persistere sul documento al salvataggio (usati sia da save_agg()
4173
+ * che da back() per il diff "modifiche non salvate"). Override obbligatorio
4174
+ * nel form concreto: la libreria non conosce lo schema della tabella dati
4175
+ * del portale.
4176
+ *
4177
+ * Il tipo di ritorno e' Array<WkfFieldValue> (vedi models/WkfFieldValue.ts)
4178
+ * ma un override che dichiara ancora `Array<any>` compila lo stesso: `any`
4179
+ * e' compatibile in entrambe le direzioni, quindi questo irrigidimento non
4180
+ * rompe nessun form gia' scritto. E' un tipo a cui i form esistenti possono
4181
+ * migrare gradualmente, campo per campo, non un vincolo imposto subito.
4182
+ */
4183
+ abstract getfieldvalues(): Array<WkfFieldValue>;
3186
4184
  abstract ck_field(op?: string): boolean;
3187
4185
  abstract update_status(b_edit: boolean | null, b_respingi_button: boolean | null, b_incarico: boolean | null, b_assengna_a: boolean | null, n_avv: number): any;
3188
4186
  abstract wkf_rule(l: number): number;
@@ -3200,6 +4198,99 @@ declare abstract class FHWorkflowForm {
3200
4198
  protected can_save(): boolean;
3201
4199
  app_info: any;
3202
4200
  edit_doc(): void;
4201
+ /**
4202
+ * Carica i task dello step corrente con il loro stato sul documento.
4203
+ * `can_close` e `locked` sono calcolati lato SQL: il primo dai ruoli/variabili
4204
+ * speciali dell'utente, il secondo dal task da cui questo dipende (`depends_on`)
4205
+ * quando non e' ancora chiuso. Le catene si propagano da sole: un padre bloccato
4206
+ * non e' chiuso, quindi il figlio resta bloccato.
4207
+ */
4208
+ load_step_tasks(after?: () => void): void;
4209
+ /**
4210
+ * Un campo legato a questo task e' editabile adesso, da questo utente?
4211
+ *
4212
+ * Vero solo se TUTTE queste condizioni reggono:
4213
+ * - lo step corrente e' in modalita' task;
4214
+ * - esiste un task con quella `check_key` E APPARTIENE ALLO STEP CORRENTE: due step
4215
+ * diversi possono avere task con la stessa chiave, e la lista in memoria potrebbe
4216
+ * essere di uno step gia' lasciato (l'avanzamento e' asincrono);
4217
+ * - il task e' ANCORA APERTO (chiuso = dati congelati; per correggere si riapre);
4218
+ * - il task e' PRESO IN CARICO DA TE (`mine`): chi non l'ha preso non tocca i campi,
4219
+ * nemmeno se ha il ruolo giusto -- e' il senso della presa in carico;
4220
+ * - il task non e' BLOCCATO da una dipendenza ancora aperta;
4221
+ * - il documento non e' in uno stato finale (>= 900).
4222
+ *
4223
+ * Non richiede `b_edit`: l'autore dello step e l'esecutore di un task possono essere
4224
+ * persone diverse. E' la presa in carico a dare il diritto di scrittura sui campi
4225
+ * di quel task.
4226
+ */
4227
+ task_editable(check_key: string): boolean;
4228
+ /** Ricostruisce la mappa `task_edit` (una entry per ogni task con `check_key`). */
4229
+ private recompute_task_edit;
4230
+ /** Tutti i task OBBLIGATORI chiusi? I facoltativi non bloccano l'avanzamento. */
4231
+ private recompute_tasks_done;
4232
+ /**
4233
+ * Presa in carico ATOMICA di un task. E' il lock che risolve la concorrenza:
4234
+ * solo chi ha la presa in carico puo' chiudere il task.
4235
+ *
4236
+ * Tre passi, e la correttezza sta tutta nel secondo:
4237
+ * 1) INSERT IGNORE -> materializza la riga se non c'e' (nessun errore se c'e')
4238
+ * 2) UPDATE ... WHERE preso_da IS NULL -> due utenti simultanei arrivano
4239
+ * entrambi qui, ma UNO SOLO trova la riga libera: l'altro aggiorna 0 righe
4240
+ * 3) SELECT del proprietario -> chi ha perso legge il nome del vincitore
4241
+ *
4242
+ * Il punto di serializzazione e' il DB, non il frontend. Non contiamo le "rows
4243
+ * affected" (dipendono dal driver e da CLIENT_FOUND_ROWS): rileggiamo il
4244
+ * proprietario, che dopo il passo 2 e' univoco e stabile.
4245
+ *
4246
+ * @param done (ok, owner) — ok=false se un altro utente ha vinto la corsa.
4247
+ */
4248
+ claim_task(task: any, done?: (ok: boolean, owner: string) => void): void;
4249
+ /**
4250
+ * Riga di log sul documento per un'operazione di attività (`wkf_workflow`, la
4251
+ * stessa tabella del log del motore). Il dialog LOGS rende `operazione
4252
+ * (stato_attuale)`: nel secondo campo va il titolo dell'attività, così la riga si
4253
+ * distingue dalla presa in carico del documento, che lì mette lo stato.
4254
+ */
4255
+ private log_task_op;
4256
+ /**
4257
+ * Rilascia la presa in carico. `force` (supervisori) sblocca anche i task presi
4258
+ * in carico da altri: serve per i lock rimasti appesi.
4259
+ */
4260
+ release_task(task: any, force?: boolean): void;
4261
+ /**
4262
+ * Chiude un task. Richiede la presa in carico (`task.mine`): la UPDATE porta
4263
+ * `preso_da=<me>` nella WHERE, quindi se nel frattempo un supervisore ha forzato
4264
+ * il rilascio la chiusura non passa e il reload lo rende evidente.
4265
+ *
4266
+ * Se dopo la chiusura tutti i task obbligatori sono chiusi, innesca l'avanzamento
4267
+ * riusando `procedi()`: transizioni, destinatari, notifiche e log restano quelli
4268
+ * standard del motore.
4269
+ *
4270
+ * NOTA: l'avanzamento automatico richiede che chi chiude l'ultimo task sia anche
4271
+ * autore dello step (`b_edit`). Configurare i ruoli del task come sottoinsieme
4272
+ * dei ruoli dello step. Se non lo e', il documento resta fermo con
4273
+ * `tasks_all_done=true` e avanza il primo autore che apre la pratica.
4274
+ */
4275
+ close_task(task: any, nota: string | null): boolean;
4276
+ /**
4277
+ * Segnala a exec_wkf che un task e' stato chiuso, cosi' che possa gestire gli
4278
+ * effetti collaterali: i task che dipendevano da questo sono ora sbloccati, i loro
4279
+ * esecutori vanno messi tra i `lettori` del documento e vanno inviate le notifiche
4280
+ * configurate su quei task.
4281
+ *
4282
+ * La CHIUSURA resta nel frontend (UPDATE atomico con `preso_da`): serve un esito
4283
+ * sincrono per sapere chi ha vinto la corsa. Qui passiamo solo l'evento.
4284
+ * exec_wkf ricava i figli dal DB (`depends_on = uiid_task`): non gli mandiamo una
4285
+ * lista, cosi' non possiamo sbagliarla.
4286
+ */
4287
+ notify_task_closed(uiid_task: string): void;
4288
+ /**
4289
+ * Riapre un task chiuso, azzerando anche la presa in carico. Ammesso a chiunque
4290
+ * abbia i ruoli del task, finche' il documento e' ancora in quello step (dopo
4291
+ * l'avanzamento i task non sono piu' raggiungibili: la finestra si chiude da sola).
4292
+ */
4293
+ reopen_task(task: any): boolean;
3203
4294
  private s_uto;
3204
4295
  b_respingi_button: boolean;
3205
4296
  return_edit(): void;
@@ -3224,7 +4315,9 @@ declare abstract class FHWorkflowForm {
3224
4315
  declare class FHWorkflowHeaderBar implements AfterViewInit {
3225
4316
  m_appService: AppService;
3226
4317
  private _trs;
3227
- custom_commands: any[];
4318
+ private _custom_commands;
4319
+ set custom_commands(value: FHToolBarCustomAction[]);
4320
+ get custom_commands(): FHToolBarCustomAction[];
3228
4321
  dt_agg: FHWorkflowForm | null;
3229
4322
  edit_button: boolean;
3230
4323
  in_carico: boolean;
@@ -3243,8 +4336,9 @@ declare class FHWorkflowHeaderBar implements AfterViewInit {
3243
4336
  next_label: boolean;
3244
4337
  next_label_color: boolean;
3245
4338
  tipologiaAllegati: string;
3246
- custom_commands_pri: any[];
3247
- custom_commands_sec: any[];
4339
+ custom_commands_pri: FHToolBarCustomAction[];
4340
+ custom_commands_mid: FHToolBarCustomAction[];
4341
+ custom_commands_sec: FHToolBarCustomAction[];
3248
4342
  back_lbl: string;
3249
4343
  save_lbl: string;
3250
4344
  procedi_lbl: string;
@@ -3255,6 +4349,7 @@ declare class FHWorkflowHeaderBar implements AfterViewInit {
3255
4349
  allegati_lbl: string;
3256
4350
  workflow_lbl: string;
3257
4351
  prendi_in_carico_lbl: string;
4352
+ saving_lbl: string;
3258
4353
  b_revisione: boolean;
3259
4354
  admin_role: string;
3260
4355
  sovra_path: string;
@@ -3280,6 +4375,164 @@ declare class FHWorkflowHeaderBar implements AfterViewInit {
3280
4375
  static ɵcmp: i0.ɵɵComponentDeclaration<FHWorkflowHeaderBar, "FHWorkflowHeaderBar", never, { "custom_commands": { "alias": "custom_commands"; "required": false; }; "dt_agg": { "alias": "dt_agg"; "required": false; }; "edit_button": { "alias": "edit_button"; "required": false; }; "in_carico": { "alias": "in_carico"; "required": false; }; "respingi_button": { "alias": "respingi_button"; "required": false; }; "procedi_button": { "alias": "procedi_button"; "required": false; }; "utility_button": { "alias": "utility_button"; "required": false; }; "show_logs": { "alias": "show_logs"; "required": false; }; "show_commenti": { "alias": "show_commenti"; "required": false; }; "show_allegati": { "alias": "show_allegati"; "required": false; }; "force_save": { "alias": "force_save"; "required": false; }; "check_on_save": { "alias": "check_on_save"; "required": false; }; "download_button": { "alias": "download_button"; "required": false; }; "edit_comments_in_logs": { "alias": "edit_comments_in_logs"; "required": false; }; "showWkfGraph": { "alias": "showWkfGraph"; "required": false; }; "assegna_a": { "alias": "assegna_a"; "required": false; }; "next_label": { "alias": "next_label"; "required": false; }; "next_label_color": { "alias": "next_label_color"; "required": false; }; "tipologiaAllegati": { "alias": "tipologiaAllegati"; "required": false; }; "b_revisione": { "alias": "b_revisione"; "required": false; }; "admin_role": { "alias": "admin_role"; "required": false; }; "sovra_path": { "alias": "sovra_path"; "required": false; }; }, { "command": "command"; "comment_inserted": "comment_inserted"; "button_clicked": "button_clicked"; }, never, never, true, never>;
3281
4376
  }
3282
4377
 
4378
+ /**
4379
+ * Attivita' che si conclude fuori dal flusso: `check_key` del task e testo da
4380
+ * mostrare al posto dei pulsanti (es. "Step avanzabile da scheda tecnica").
4381
+ * `icon` e' un material symbol, default `open_in_new`.
4382
+ */
4383
+ interface FHTaskExternalHint {
4384
+ check_key: string;
4385
+ label: string;
4386
+ icon?: string;
4387
+ }
4388
+ /**
4389
+ * Pannello dei task dello step corrente (step_mode='T').
4390
+ *
4391
+ * Si usa nel form della pratica, accanto/sotto la FHWorkflowHeaderBar:
4392
+ *
4393
+ * <FHWorkflowTasksPanel [dt_agg]="this"></FHWorkflowTasksPanel>
4394
+ *
4395
+ * Un task senza `depends_on` e' eseguibile subito. Un task che dipende da un altro
4396
+ * resta bloccato (lucchetto) finche' quello non e' chiuso; le catene si propagano
4397
+ * da sole, perche' un padre bloccato non e' chiuso.
4398
+ *
4399
+ * Non e' una FHGrid: sono pochi record, servono pulsanti per riga e nessuna
4400
+ * paginazione.
4401
+ */
4402
+ declare class FHWorkflowTasksPanel implements DoCheck {
4403
+ private dialog;
4404
+ private toastr;
4405
+ /** La form del documento: `<FHWorkflowTasksPanel [dt_agg]="this">`. */
4406
+ dt_agg: FHWorkflowForm;
4407
+ /** Abilita il rilascio forzato dei lock altrui (passare `is_Supervisor`). */
4408
+ is_supervisor: boolean;
4409
+ /**
4410
+ * Attivita' che NON si chiudono da qui perche' le gestisce un altro applicativo
4411
+ * (es. il task "ATTESA SCHEDA TECNICA" chiuso dalla scheda tecnica). Su queste
4412
+ * righe non compaiono i pulsanti di presa in carico e chiusura: al loro posto
4413
+ * viene mostrata l'indicazione configurata.
4414
+ *
4415
+ * [ext_tasks]="[{check_key:'50_ATTESA_SCHEDA_TEC', label:'Step avanzabile da scheda tecnica'}]"
4416
+ *
4417
+ * `check_key` e' la chiave di validazione del task (wkf2_config_step_tasks).
4418
+ * Il pulsante RIAPRI resta disponibile a task chiuso: e' la valvola di sicurezza
4419
+ * se l'applicativo esterno lo ha concluso per errore.
4420
+ */
4421
+ ext_tasks: FHTaskExternalHint[];
4422
+ title: string;
4423
+ claim_label: string;
4424
+ release_label: string;
4425
+ force_release_label: string;
4426
+ in_charge_label: string;
4427
+ in_charge_you_label: string;
4428
+ claim_lost_label: string;
4429
+ close_label: string;
4430
+ reopen_label: string;
4431
+ optional_label: string;
4432
+ closed_by_label: string;
4433
+ empty_label: string;
4434
+ no_role_label: string;
4435
+ after_label: string;
4436
+ locked_label: string;
4437
+ reopen_confirm: string;
4438
+ note_label: string;
4439
+ last_task_title: string;
4440
+ last_task_confirm: string;
4441
+ tasks: any[];
4442
+ totalRequired: number;
4443
+ doneRequired: number;
4444
+ progressPct: number;
4445
+ /** Riferimento all'array task dell'ultimo ricalcolo. `load_step_tasks()` lo rimpiazza. */
4446
+ private _lastTasksRef;
4447
+ /** Idem per `ext_tasks`: se cambia l'input vanno ricalcolate le indicazioni. */
4448
+ private _lastExtRef;
4449
+ constructor(dialog: MatDialog, toastr: ToastrService | null);
4450
+ ngDoCheck(): void;
4451
+ private rebuild;
4452
+ private fmtDate;
4453
+ /**
4454
+ * Prende in carico il task. L'esito lo decide il DB (UPDATE condizionato su
4455
+ * `preso_da IS NULL`): se un altro utente ha vinto la corsa, `ok=false` e gli
4456
+ * mostriamo chi ha vinto. La lista e' gia' stata ricaricata dal motore, quindi
4457
+ * la riga si aggiorna da sola.
4458
+ */
4459
+ onClaim(t: any): void;
4460
+ onRelease(t: any, force: boolean): void;
4461
+ onClose(t: any): void;
4462
+ /** L'unico task obbligatorio ancora aperto e' proprio questo? */
4463
+ private isLastRequiredOpen;
4464
+ private doClose;
4465
+ onReopen(t: any): void;
4466
+ static ɵfac: i0.ɵɵFactoryDeclaration<FHWorkflowTasksPanel, [null, { optional: true; }]>;
4467
+ static ɵcmp: i0.ɵɵComponentDeclaration<FHWorkflowTasksPanel, "FHWorkflowTasksPanel", never, { "dt_agg": { "alias": "dt_agg"; "required": false; }; "is_supervisor": { "alias": "is_supervisor"; "required": false; }; "ext_tasks": { "alias": "ext_tasks"; "required": false; }; "title": { "alias": "title"; "required": false; }; "claim_label": { "alias": "claim_label"; "required": false; }; "release_label": { "alias": "release_label"; "required": false; }; "force_release_label": { "alias": "force_release_label"; "required": false; }; "in_charge_label": { "alias": "in_charge_label"; "required": false; }; "in_charge_you_label": { "alias": "in_charge_you_label"; "required": false; }; "claim_lost_label": { "alias": "claim_lost_label"; "required": false; }; "close_label": { "alias": "close_label"; "required": false; }; "reopen_label": { "alias": "reopen_label"; "required": false; }; "optional_label": { "alias": "optional_label"; "required": false; }; "closed_by_label": { "alias": "closed_by_label"; "required": false; }; "empty_label": { "alias": "empty_label"; "required": false; }; "no_role_label": { "alias": "no_role_label"; "required": false; }; "after_label": { "alias": "after_label"; "required": false; }; "locked_label": { "alias": "locked_label"; "required": false; }; "reopen_confirm": { "alias": "reopen_confirm"; "required": false; }; "note_label": { "alias": "note_label"; "required": false; }; "last_task_title": { "alias": "last_task_title"; "required": false; }; "last_task_confirm": { "alias": "last_task_confirm"; "required": false; }; }, {}, never, never, true, never>;
4468
+ }
4469
+
4470
+ declare class BpmnEditorComponent implements AfterViewInit, OnDestroy {
4471
+ canvasRef: ElementRef;
4472
+ initialXml?: string;
4473
+ completedSteps: number[];
4474
+ currentStep?: number;
4475
+ transitionData: Array<{
4476
+ fromStep: number;
4477
+ toStep: number;
4478
+ user: string;
4479
+ date: string;
4480
+ }>;
4481
+ diagramChanged: EventEmitter<string>;
4482
+ elementSelected: EventEmitter<any>;
4483
+ private modeler?;
4484
+ private overlays;
4485
+ ngAfterViewInit(): void;
4486
+ ngOnDestroy(): void;
4487
+ private initializeBpmnEditor;
4488
+ private createNewDiagram;
4489
+ private loadDiagram;
4490
+ exportSVG(): Promise<string>;
4491
+ exportXML(): Promise<string>;
4492
+ zoomIn(): void;
4493
+ zoomOut(): void;
4494
+ zoomFit(): void;
4495
+ zoomReset(): void;
4496
+ /**
4497
+ * Apply colors to BPMN elements based on workflow step status
4498
+ * - Green: completed steps
4499
+ * - Orange: current step
4500
+ */
4501
+ private applyStepColors;
4502
+ /**
4503
+ * Extract step number from element ID or name
4504
+ * Supports formats like: "Activity_10", "Task_20", "Step_30", "10", "Step 10", etc.
4505
+ */
4506
+ private extractStepNumber;
4507
+ /**
4508
+ * Update step colors dynamically (call this when step status changes)
4509
+ */
4510
+ updateStepColors(completedSteps: number[], currentStep?: number): void;
4511
+ /**
4512
+ * Apply transition information (user and date) on completed connections
4513
+ */
4514
+ private applyTransitionInfo;
4515
+ /**
4516
+ * Find BPMN connection (sequence flow) that links two steps
4517
+ */
4518
+ private findConnectionForTransition;
4519
+ /**
4520
+ * Escape HTML to prevent XSS
4521
+ */
4522
+ private escapeHtml;
4523
+ /**
4524
+ * Update transition data dynamically
4525
+ */
4526
+ updateTransitionData(transitionData: Array<{
4527
+ fromStep: number;
4528
+ toStep: number;
4529
+ user: string;
4530
+ date: string;
4531
+ }>): void;
4532
+ static ɵfac: i0.ɵɵFactoryDeclaration<BpmnEditorComponent, never>;
4533
+ static ɵcmp: i0.ɵɵComponentDeclaration<BpmnEditorComponent, "fh-bpmn-editor", never, { "initialXml": { "alias": "initialXml"; "required": false; }; "completedSteps": { "alias": "completedSteps"; "required": false; }; "currentStep": { "alias": "currentStep"; "required": false; }; "transitionData": { "alias": "transitionData"; "required": false; }; }, { "diagramChanged": "diagramChanged"; "elementSelected": "elementSelected"; }, never, never, true, never>;
4534
+ }
4535
+
3283
4536
  declare class SafePipe implements PipeTransform {
3284
4537
  protected sanitizer: DomSanitizer;
3285
4538
  constructor(sanitizer: DomSanitizer);
@@ -3294,9 +4547,11 @@ declare class AuthHttpRequestInterceptor implements HttpInterceptor {
3294
4547
  private http;
3295
4548
  private isRefreshing;
3296
4549
  constructor(loginservice: AuthenticationService, appService: AppService, http: HttpClient);
4550
+ private dlog;
3297
4551
  intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
3298
4552
  getJwtToken(): string;
3299
4553
  private refreshTokenSubject;
4554
+ private static readonly REFRESH_FAILED;
3300
4555
  private handle401Error;
3301
4556
  refreshToken(token: string, refreshToken: string): Observable<any>;
3302
4557
  private addToken;
@@ -3315,8 +4570,11 @@ declare class FHWinSalvaAnnulla implements AfterViewInit {
3315
4570
  b_commento: boolean;
3316
4571
  commento_mgs: string;
3317
4572
  insert_comment_msg: string;
3318
- close(): void;
4573
+ buttons: DialogButton[];
3319
4574
  constructor(dialogRef: MatDialogRef<FHWinSalvaAnnulla>, data: any, toast: ToastrService);
4575
+ private updateButtons;
4576
+ onBeforeClose(event: DialogBeforeCloseEvent): void;
4577
+ close(): void;
3320
4578
  salva_esci(): void;
3321
4579
  esci_senza_salv(): void;
3322
4580
  ngAfterViewInit(): void;
@@ -3357,5 +4615,662 @@ declare class QueryOpenService {
3357
4615
  static ɵprov: i0.ɵɵInjectableDeclaration<QueryOpenService>;
3358
4616
  }
3359
4617
 
3360
- export { AppMakerService, AppService, ApprovaGridComponent, AuthHttpRequestInterceptor, AuthenticationService, CheckboxEditorComponent, ComboBoxEditorComponent, CurrencyComponent, FHAutoCompleteComponent, FHCheckBoxComponent, FHColorPickerComponent, FHComboboxComponent, FHConfirmValues, FHCurrencyFormatterDirective, FHCurrencyPipe, FHDatePickerComponent, FHDateRangePickerComponent, FHFieldPickListComponent, FHFilterComboboxComponent, FHFormBuilderComponent, FHFormExecuterComponent, FHFormToolBarComponent, FHGridComponent, FHGridJSONComponent, FHGridToolBarComponent, FHGuard, FHHelpButtonComponent, FHImageViewerComponent, FHListComponent, FHLogPanelComponent, FHMultiComboboxComponent, FHNotesPanelComponent, FHNumericFieldComponent, FHPickFieldComponent, FHPickUsersComponent, FHRichTextComponent, FHRoleManagerComponent, FHTableManagerComponent, FHTextAreaComponent, FHTextInputComponent, FHTimePickerComponent, FHUploadComponent, FHUploadPanelComponent, FHUploadPanelS3Component, FHUploadS3Component, FHUserFieldComponent, FHWinAppLogsComponent, FHWinAskBigTextComponent, FHWinAskButtonsComponent, FHWinAskNumberComponent, FHWinAskRichTextComponent, FHWinAskTextComponent, FHWinAutoComplete, FHWinComboComponent, FHWinConfirmComponent, FHWinErrorComponent, FHWinGridSelection, FHWinInfoComponent, FHWinListComponent, FHWinMappaComponent, FHWinOutputComponent, FHWinPicklistComponent, FHWinSalvaAnnulla, FHWinSelectByGridComponent, FHWinShowEmail, FHWinShowEmailS3, FHWinShowImage, FHWinShowLog, FHWinShowLogDett, FHWinTimeSlider, FHWinUploadComponent, FHWinUserInfo, FHWinUserPickerComponent, FHWinWaitComponent, FHWorkflowForm, FHWorkflowHeaderBar, FHWorkflowView, FSInput, FSResult, FileService, GridService, LocalDBService, MonthYearPickerComponent, NumericEditorComponent, OdbcService, OfficeAutomatorService, OfficeOperation, OfficeResult, QGParam, QGResult, QParam, QResult, QueryOpenService, QueryService, RegistrationService, ReplaceLineBreaks, SafePipe, TextAreaEditorComponent, UtilityService, WkfService, YearPickerComponent };
3361
- export type { FHGridColumn };
4618
+ /** Singola app esposta dal launcher. */
4619
+ interface FHLauncherApp {
4620
+ id: number;
4621
+ title: string;
4622
+ link: string;
4623
+ invisible?: boolean;
4624
+ /** Icona FontAwesome specifica dell'app (da applications.app_icon, scelta con FHIconPicker); se assente si usa il logo categoria o boxIcon. */
4625
+ appIcon?: string;
4626
+ }
4627
+ /** Categoria (cartella menu) che raggruppa le app. */
4628
+ interface FHLauncherCategory {
4629
+ /** id_category (dalla tabella applications_categories). */
4630
+ id: number | null;
4631
+ name: string;
4632
+ title: string;
4633
+ faIcon: string;
4634
+ mdIcon: string;
4635
+ color: string;
4636
+ /** Logo categoria (se configurato in v_category_logos). */
4637
+ logoUrl?: string;
4638
+ logoFilename?: string;
4639
+ /** True se la categoria va renderizzata "a box" (precalcolato, vedi boxCategoryIds). */
4640
+ isBox?: boolean;
4641
+ apps: FHLauncherApp[];
4642
+ }
4643
+ /**
4644
+ * Elenco applicazioni per la homepage (launcher a colonne "masonry").
4645
+ *
4646
+ * Legge il menu applicativo dell'utente tramite le query standard FluxHub
4647
+ * (SELECT_USER_ACCESS + SELECT_ALL_APPS_USER / SELECT_APPS_USER, in query.ini).
4648
+ * I nomi delle query e l'aspetto sono configurabili via @Input per riuso cross-cliente.
4649
+ *
4650
+ * Uso: <FHHomeLauncher [appVersion]="costanti.VER"></FHHomeLauncher>
4651
+ */
4652
+ declare class FHHomeLauncherComponent implements AfterViewInit {
4653
+ appService: AppService;
4654
+ private _service;
4655
+ private _dataService;
4656
+ private _utility;
4657
+ private router;
4658
+ accent: string;
4659
+ accentDark: string;
4660
+ ink: string;
4661
+ get _a(): string;
4662
+ get _ad(): string;
4663
+ get _ink(): string;
4664
+ /** Mostra l'indice numerato (01, 02, ...) accanto al titolo categoria. */
4665
+ showIndex: boolean;
4666
+ /** Larghezza colonna masonry (px). */
4667
+ columnWidth: number;
4668
+ /** Spazio tra colonne (px). */
4669
+ columnGap: number;
4670
+ /**
4671
+ * Elenco di id_category da renderizzare "a box" (card) invece che come
4672
+ * elenco testuale. Es. [23] per la categoria Offerte. Accetta numeri o stringhe.
4673
+ */
4674
+ boxCategoryIds: Array<number | string>;
4675
+ /** Icona Material Symbols mostrata nel box quando la categoria non ha un logo. */
4676
+ boxIcon: string;
4677
+ /** Etichetta dell'azione nel box (sotto al titolo). */
4678
+ boxActionLabel: string;
4679
+ /**
4680
+ * Abilita la gestione dei preferiti: ogni categoria mostra un cuore; le
4681
+ * categorie preferite sono renderizzate "a box". Le preferenze sono persistite
4682
+ * per utente (tabella wkf_user_category_prefs, JSON di id_category).
4683
+ * Quando true, l'aspetto a box è guidato dai preferiti dell'utente; se l'utente
4684
+ * non ha mai personalizzato, si usa [boxCategoryIds] come default.
4685
+ */
4686
+ enableFavorites: boolean;
4687
+ /** Query (query.ini) che legge le preferenze: SELECT fav_categories WHERE username=@VAL1. */
4688
+ sqlCatPrefsGet: string;
4689
+ /** Query (query.ini) di upsert: @VAL1=username, @VAL2=JSON array di id_category. */
4690
+ sqlCatPrefsSave: string;
4691
+ /** Tooltip del cuore quando la categoria NON è preferita. */
4692
+ favoriteTooltip: string;
4693
+ /** Tooltip del cuore quando la categoria È preferita. */
4694
+ unfavoriteTooltip: string;
4695
+ /**
4696
+ * Colore di sfondo della superficie del launcher.
4697
+ * "" (default) = trasparente: il launcher eredita lo sfondo della pagina.
4698
+ */
4699
+ background: string;
4700
+ /**
4701
+ * Mostra la trama a griglia ("piastrelle") dietro il launcher.
4702
+ * true = griglia visibile; false (default) = nessuna griglia (aspetto attuale).
4703
+ */
4704
+ showGridBackground: boolean;
4705
+ sqlUserAccess: string;
4706
+ sqlAllApps: string;
4707
+ sqlApps: string;
4708
+ sqlAccessLog: string;
4709
+ /** Versione applicativa registrata nel log di accesso (di solito costanti.VER). */
4710
+ appVersion: string;
4711
+ /** Emesso quando l'utente apre un'app (dopo log e navigazione). */
4712
+ appOpen: EventEmitter<FHLauncherApp>;
4713
+ categories: FHLauncherCategory[];
4714
+ is_loaded: boolean;
4715
+ /** Set degli id_category preferiti (effettivi: salvati dall'utente o default). */
4716
+ private favoriteIds;
4717
+ /** True se l'utente ha già personalizzato le preferenze (riga presente in DB). */
4718
+ private hasUserPref;
4719
+ constructor(appService: AppService, _service: AuthenticationService, _dataService: QueryService, _utility: UtilityService, router: Router);
4720
+ ngAfterViewInit(): void;
4721
+ private bootstrap;
4722
+ private load_user_then_menu;
4723
+ private load_prefs_then_menu;
4724
+ /** Normalizza il valore fav_categories (JSON string o array già parsato) in un Set di numeri. */
4725
+ private parseFavorites;
4726
+ private build_menu;
4727
+ /**
4728
+ * Classe CSS FontAwesome per l'icona dell'app. Il valore (applications.app_icon,
4729
+ * scelto con FHIconPicker) puo` essere: classe completa ("fa-solid fa-clipboard",
4730
+ * "fa-brands fa-github"), nome con prefisso ("fa-clipboard") o nome semplice
4731
+ * ("clipboard"). Se manca lo stile assume "fa-solid".
4732
+ */
4733
+ appIconClass(v: string): string;
4734
+ /**
4735
+ * True se la categoria va renderizzata "a box". Con i preferiti abilitati
4736
+ * dipende dai preferiti dell'utente (favoriteIds); altrimenti da [boxCategoryIds].
4737
+ */
4738
+ private isBoxCat;
4739
+ /** Toggle preferito su una categoria: aggiorna l'aspetto e persiste subito. */
4740
+ toggleFavorite(cat: FHLauncherCategory, ev: Event): void;
4741
+ /** Persiste le preferenze correnti (upsert username + JSON array di id_category). */
4742
+ private save_prefs;
4743
+ open_app(app: FHLauncherApp): void;
4744
+ static ɵfac: i0.ɵɵFactoryDeclaration<FHHomeLauncherComponent, never>;
4745
+ static ɵcmp: i0.ɵɵComponentDeclaration<FHHomeLauncherComponent, "FHHomeLauncher", never, { "accent": { "alias": "accent"; "required": false; }; "accentDark": { "alias": "accentDark"; "required": false; }; "ink": { "alias": "ink"; "required": false; }; "showIndex": { "alias": "showIndex"; "required": false; }; "columnWidth": { "alias": "columnWidth"; "required": false; }; "columnGap": { "alias": "columnGap"; "required": false; }; "boxCategoryIds": { "alias": "boxCategoryIds"; "required": false; }; "boxIcon": { "alias": "boxIcon"; "required": false; }; "boxActionLabel": { "alias": "boxActionLabel"; "required": false; }; "enableFavorites": { "alias": "enableFavorites"; "required": false; }; "sqlCatPrefsGet": { "alias": "sqlCatPrefsGet"; "required": false; }; "sqlCatPrefsSave": { "alias": "sqlCatPrefsSave"; "required": false; }; "favoriteTooltip": { "alias": "favoriteTooltip"; "required": false; }; "unfavoriteTooltip": { "alias": "unfavoriteTooltip"; "required": false; }; "background": { "alias": "background"; "required": false; }; "showGridBackground": { "alias": "showGridBackground"; "required": false; }; "sqlUserAccess": { "alias": "sqlUserAccess"; "required": false; }; "sqlAllApps": { "alias": "sqlAllApps"; "required": false; }; "sqlApps": { "alias": "sqlApps"; "required": false; }; "sqlAccessLog": { "alias": "sqlAccessLog"; "required": false; }; "appVersion": { "alias": "appVersion"; "required": false; }; }, { "appOpen": "appOpen"; }, never, never, true, never>;
4746
+ }
4747
+
4748
+ /**
4749
+ * Pannello "Task / To-Do" della homepage: elenco delle attività dei workflow
4750
+ * assegnate all'utente, con filtro per categoria.
4751
+ *
4752
+ * Le query (in query.ini) e i nomi dei campi restituiti sono configurabili via
4753
+ * @Input, così ogni cliente può usare le proprie senza modificare il componente.
4754
+ *
4755
+ * Campi attesi nella riga task (rinominabili): oggetto, applicazione, data_ultimo_step, link.
4756
+ * Campo categoria atteso: valore.
4757
+ */
4758
+ declare class FHHomeTodoComponent implements AfterViewInit {
4759
+ private _dataService;
4760
+ private app_service;
4761
+ accent: string;
4762
+ accentDark: string;
4763
+ /** Colore del badge col conteggio sui chip categoria (default arancione). */
4764
+ badgeColor: string;
4765
+ get _a(): string;
4766
+ get _ad(): string;
4767
+ get _b(): string;
4768
+ title: string;
4769
+ subtitle: string;
4770
+ tagLabel: string;
4771
+ icon: string;
4772
+ allLabel: string;
4773
+ emptyTitle: string;
4774
+ emptySub: string;
4775
+ dateFormat: string;
4776
+ showCategoryFilter: boolean;
4777
+ sqlCategories: string;
4778
+ sqlByUser: string;
4779
+ sqlByUserCat: string;
4780
+ fieldLabel: string;
4781
+ fieldMeta: string;
4782
+ fieldDate: string;
4783
+ fieldLink: string;
4784
+ /** Campo che contiene il nome categoria nella query categorie. */
4785
+ fieldCategory: string;
4786
+ /** Campo (opzionale) col conteggio per categoria: se presente e > 0 mostra un badge. */
4787
+ fieldCategoryCount: string;
4788
+ /** Emesso quando l'utente apre un task. */
4789
+ todoOpen: EventEmitter<any>;
4790
+ username: string | undefined;
4791
+ todos: any[] | undefined;
4792
+ errorMsg: string;
4793
+ categories: any[];
4794
+ selectedCat: string;
4795
+ /** Totale per il badge del chip "Tutti": somma dei conteggi di categoria. */
4796
+ get totalCount(): number;
4797
+ constructor(_dataService: QueryService, app_service: AppService);
4798
+ ngAfterViewInit(): void;
4799
+ load_todos(): void;
4800
+ fetch_todos(cat: string): void;
4801
+ select_cat(cat: string): void;
4802
+ open(o: any): void;
4803
+ static ɵfac: i0.ɵɵFactoryDeclaration<FHHomeTodoComponent, never>;
4804
+ static ɵcmp: i0.ɵɵComponentDeclaration<FHHomeTodoComponent, "FHHomeTodo", never, { "accent": { "alias": "accent"; "required": false; }; "accentDark": { "alias": "accentDark"; "required": false; }; "badgeColor": { "alias": "badgeColor"; "required": false; }; "title": { "alias": "title"; "required": false; }; "subtitle": { "alias": "subtitle"; "required": false; }; "tagLabel": { "alias": "tagLabel"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "allLabel": { "alias": "allLabel"; "required": false; }; "emptyTitle": { "alias": "emptyTitle"; "required": false; }; "emptySub": { "alias": "emptySub"; "required": false; }; "dateFormat": { "alias": "dateFormat"; "required": false; }; "showCategoryFilter": { "alias": "showCategoryFilter"; "required": false; }; "sqlCategories": { "alias": "sqlCategories"; "required": false; }; "sqlByUser": { "alias": "sqlByUser"; "required": false; }; "sqlByUserCat": { "alias": "sqlByUserCat"; "required": false; }; "fieldLabel": { "alias": "fieldLabel"; "required": false; }; "fieldMeta": { "alias": "fieldMeta"; "required": false; }; "fieldDate": { "alias": "fieldDate"; "required": false; }; "fieldLink": { "alias": "fieldLink"; "required": false; }; "fieldCategory": { "alias": "fieldCategory"; "required": false; }; "fieldCategoryCount": { "alias": "fieldCategoryCount"; "required": false; }; }, { "todoOpen": "todoOpen"; }, never, never, true, never>;
4805
+ }
4806
+
4807
+ /**
4808
+ * Pannello "La tua attività" della homepage: doughnut delle applicazioni
4809
+ * utilizzate + grafico a linea degli step di workflow eseguiti nel periodo.
4810
+ *
4811
+ * Le due query (in query.ini) e i nomi dei campi sono configurabili via @Input.
4812
+ * - Query app: campi `label`, `value` (rinominabili).
4813
+ * - Query step: campi `giorno` (data ISO), `value` (rinominabili).
4814
+ */
4815
+ declare class FHHomeStatsComponent implements OnInit {
4816
+ apps: AppService;
4817
+ private queryService;
4818
+ accent: string;
4819
+ accentDark: string;
4820
+ /** Palette del doughnut; il primo elemento dovrebbe coincidere con l'accent. */
4821
+ pieColors: string[];
4822
+ get _a(): string;
4823
+ get _ad(): string;
4824
+ appsTitle: string;
4825
+ stepsTitle: string;
4826
+ appsTag: string;
4827
+ stepsTag: string;
4828
+ appsEmptyTitle: string;
4829
+ appsEmptySub: string;
4830
+ stepsEmptyTitle: string;
4831
+ stepsEmptySub: string;
4832
+ /** Giorni indietro coperti dai grafici (default 30). */
4833
+ days: number;
4834
+ sqlApps: string;
4835
+ sqlSteps: string;
4836
+ appLabelField: string;
4837
+ appValueField: string;
4838
+ stepDayField: string;
4839
+ stepValueField: string;
4840
+ stepSeriesLabel: string;
4841
+ loading: boolean;
4842
+ error: boolean;
4843
+ hasApps: boolean;
4844
+ hasSteps: boolean;
4845
+ periodoLabel: string;
4846
+ subtitlePrefix: string;
4847
+ pieLabels: string[];
4848
+ pieDatasets: ChartDataset<'doughnut'>[];
4849
+ pieOptions: ChartConfiguration<'doughnut'>['options'];
4850
+ lineLabels: string[];
4851
+ lineDatasets: ChartDataset<'line'>[];
4852
+ lineOptions: ChartConfiguration<'line'>['options'];
4853
+ constructor(apps: AppService, queryService: QueryService);
4854
+ ngOnInit(): void;
4855
+ private buildPeriodoLabel;
4856
+ private tryLoad;
4857
+ private load;
4858
+ private buildPie;
4859
+ private buildLine;
4860
+ static ɵfac: i0.ɵɵFactoryDeclaration<FHHomeStatsComponent, never>;
4861
+ static ɵcmp: i0.ɵɵComponentDeclaration<FHHomeStatsComponent, "FHHomeStats", never, { "accent": { "alias": "accent"; "required": false; }; "accentDark": { "alias": "accentDark"; "required": false; }; "pieColors": { "alias": "pieColors"; "required": false; }; "appsTitle": { "alias": "appsTitle"; "required": false; }; "stepsTitle": { "alias": "stepsTitle"; "required": false; }; "appsTag": { "alias": "appsTag"; "required": false; }; "stepsTag": { "alias": "stepsTag"; "required": false; }; "appsEmptyTitle": { "alias": "appsEmptyTitle"; "required": false; }; "appsEmptySub": { "alias": "appsEmptySub"; "required": false; }; "stepsEmptyTitle": { "alias": "stepsEmptyTitle"; "required": false; }; "stepsEmptySub": { "alias": "stepsEmptySub"; "required": false; }; "days": { "alias": "days"; "required": false; }; "sqlApps": { "alias": "sqlApps"; "required": false; }; "sqlSteps": { "alias": "sqlSteps"; "required": false; }; "appLabelField": { "alias": "appLabelField"; "required": false; }; "appValueField": { "alias": "appValueField"; "required": false; }; "stepDayField": { "alias": "stepDayField"; "required": false; }; "stepValueField": { "alias": "stepValueField"; "required": false; }; "stepSeriesLabel": { "alias": "stepSeriesLabel"; "required": false; }; }, {}, never, never, true, never>;
4862
+ }
4863
+
4864
+ /**
4865
+ * Pannello "Documenti" della homepage: esplora la cartella documentale condivisa
4866
+ * (navigazione cartelle + download file) tramite FileService.
4867
+ *
4868
+ * Endpoint e percorsi sono configurabili via @Input per riuso cross-cliente.
4869
+ * L'endpoint API NON è obbligatorio: se non passato viene ricavato da
4870
+ * AppService.API_ENDPOINT (lo stesso usato da QueryService/FileService).
4871
+ */
4872
+ declare class FHHomeDocsComponent implements OnInit {
4873
+ private _dataService;
4874
+ private appService;
4875
+ accent: string;
4876
+ accentDark: string;
4877
+ get _a(): string;
4878
+ get _ad(): string;
4879
+ title: string;
4880
+ tagLabel: string;
4881
+ emptyTitle: string;
4882
+ emptySub: string;
4883
+ /**
4884
+ * Base URL delle API per costruire l'URL di download (il suffisso "/api" viene rimosso).
4885
+ * Opzionale: se vuoto si usa AppService.API_ENDPOINT.
4886
+ */
4887
+ apiEndpoint: string;
4888
+ /** Comando FileService per elencare i documenti. */
4889
+ command: string;
4890
+ /** Cartella radice da cui partire. */
4891
+ rootPath: string;
4892
+ /** Segmento di percorso aggiunto all'endpoint per il download. */
4893
+ downloadSegment: string;
4894
+ /** Percorso base delle icone tipo file. */
4895
+ iconBasePath: string;
4896
+ curr_path: string;
4897
+ last_curr_path: string;
4898
+ b_loading: boolean;
4899
+ errorMsg: string;
4900
+ dirs: Array<any>;
4901
+ files: Array<any>;
4902
+ constructor(_dataService: FileService, appService: AppService);
4903
+ /** Endpoint effettivo: input esplicito oppure default da AppService. */
4904
+ private get effectiveEndpoint();
4905
+ ngOnInit(): void;
4906
+ open_dir(item: any): void;
4907
+ download_file(item: any): void;
4908
+ ref_dirs(s: string): void;
4909
+ static ɵfac: i0.ɵɵFactoryDeclaration<FHHomeDocsComponent, never>;
4910
+ static ɵcmp: i0.ɵɵComponentDeclaration<FHHomeDocsComponent, "FHHomeDocs", never, { "accent": { "alias": "accent"; "required": false; }; "accentDark": { "alias": "accentDark"; "required": false; }; "title": { "alias": "title"; "required": false; }; "tagLabel": { "alias": "tagLabel"; "required": false; }; "emptyTitle": { "alias": "emptyTitle"; "required": false; }; "emptySub": { "alias": "emptySub"; "required": false; }; "apiEndpoint": { "alias": "apiEndpoint"; "required": false; }; "command": { "alias": "command"; "required": false; }; "rootPath": { "alias": "rootPath"; "required": false; }; "downloadSegment": { "alias": "downloadSegment"; "required": false; }; "iconBasePath": { "alias": "iconBasePath"; "required": false; }; }, {}, never, never, true, never>;
4911
+ }
4912
+
4913
+ /** Voce del selettore "filtra per": etichetta mostrata e query da eseguire. */
4914
+ interface FiltroMailArchiviata {
4915
+ etichetta: string;
4916
+ sql: string;
4917
+ /** Testo di aiuto nella casella del valore. */
4918
+ placeholder?: string;
4919
+ }
4920
+ /**
4921
+ * Elenco delle mail archiviate dal Mail Archiver, filtrabile.
4922
+ *
4923
+ * Legge le tabelle `fh_mail_archiver_*`, che sono le stesse su ogni portale che
4924
+ * installa l'archiviatore: per questo i nomi delle colonne NON sono configurabili,
4925
+ * a differenza dei componenti della homepage. Sono il contratto del prodotto.
4926
+ *
4927
+ * Il filtro segue l'idioma della libreria (`[sql]` + `[valore]`, come FHComboBox e
4928
+ * FHList): una query per tipo di filtro, cosi ognuna resta indicizzabile e si evita
4929
+ * il classico `(@VAL1='' OR colonna LIKE ...)` che manda in scansione completa.
4930
+ *
4931
+ * Colonne attese dalla query (vista `v_fh_mail_archiver`):
4932
+ * id, received_at, subject, sender_name, sender_email, client_name,
4933
+ * contatti, pratiche, rilevanza, has_attachments, archived_at, archived_by
4934
+ */
4935
+ declare class FHMailArchivedComponent implements AfterViewInit {
4936
+ private _dataService;
4937
+ accent: string;
4938
+ accentDark: string;
4939
+ get _a(): string;
4940
+ get _ad(): string;
4941
+ /** Query di partenza. Deve gia contenere ORDER BY e LIMIT. */
4942
+ sql: string;
4943
+ /**
4944
+ * @VAL1 della query di partenza: e il *contesto*, non il filtro dell'utente.
4945
+ * Serve quando il componente vive dentro una scheda gia circoscritta — per
4946
+ * esempio dentro l'anagrafica di un cliente, dove passa l'id di quel cliente.
4947
+ * Lasciarlo vuoto se la query di partenza non ha parametri.
4948
+ */
4949
+ valoreBase: string;
4950
+ /** Valore digitato dall'utente, passato come @VAL1 alla query del filtro attivo. */
4951
+ valore: string;
4952
+ /**
4953
+ * Filtri offerti dal selettore. Lasciandolo vuoto il componente e una tabella
4954
+ * pura: la UI di filtro la disegna il portale e pilota [sql] e [valore].
4955
+ */
4956
+ filtri: FiltroMailArchiviata[];
4957
+ /** Deve combaciare col LIMIT delle query: serve solo a dichiarare il troncamento. */
4958
+ limite: number;
4959
+ autoLoad: boolean;
4960
+ title: string;
4961
+ icon: string;
4962
+ tuttiLabel: string;
4963
+ cercaLabel: string;
4964
+ cercaPlaceholder: string;
4965
+ apriTooltip: string;
4966
+ senzaOggetto: string;
4967
+ emptyTitle: string;
4968
+ emptySub: string;
4969
+ troncatoLabel: string;
4970
+ dateFormat: string;
4971
+ colData: string;
4972
+ colOggetto: string;
4973
+ colCliente: string;
4974
+ colContatti: string;
4975
+ colPratiche: string;
4976
+ colRilevanza: string;
4977
+ /**
4978
+ * Riga aperta. L'anteprima della mail la gestisce il portale: passa dalla utility
4979
+ * mail_reader via exec_app, che e idraulica del singolo server e non ha senso
4980
+ * dentro la libreria.
4981
+ */
4982
+ apriMail: EventEmitter<any>;
4983
+ righe: any[] | undefined;
4984
+ filtroAttivo: FiltroMailArchiviata | null;
4985
+ troncato: boolean;
4986
+ errorMsg: string;
4987
+ constructor(_dataService: QueryService);
4988
+ ngAfterViewInit(): void;
4989
+ /** Ricarica l'elenco con il filtro attivo. Pubblica: la chiama anche il portale. */
4990
+ carica(): void;
4991
+ cambiaFiltro(): void;
4992
+ apri(riga: any): void;
4993
+ stelle(n: any): string;
4994
+ static ɵfac: i0.ɵɵFactoryDeclaration<FHMailArchivedComponent, never>;
4995
+ static ɵcmp: i0.ɵɵComponentDeclaration<FHMailArchivedComponent, "FHMailArchived", never, { "accent": { "alias": "accent"; "required": false; }; "accentDark": { "alias": "accentDark"; "required": false; }; "sql": { "alias": "sql"; "required": false; }; "valoreBase": { "alias": "valoreBase"; "required": false; }; "valore": { "alias": "valore"; "required": false; }; "filtri": { "alias": "filtri"; "required": false; }; "limite": { "alias": "limite"; "required": false; }; "autoLoad": { "alias": "autoLoad"; "required": false; }; "title": { "alias": "title"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "tuttiLabel": { "alias": "tuttiLabel"; "required": false; }; "cercaLabel": { "alias": "cercaLabel"; "required": false; }; "cercaPlaceholder": { "alias": "cercaPlaceholder"; "required": false; }; "apriTooltip": { "alias": "apriTooltip"; "required": false; }; "senzaOggetto": { "alias": "senzaOggetto"; "required": false; }; "emptyTitle": { "alias": "emptyTitle"; "required": false; }; "emptySub": { "alias": "emptySub"; "required": false; }; "troncatoLabel": { "alias": "troncatoLabel"; "required": false; }; "dateFormat": { "alias": "dateFormat"; "required": false; }; "colData": { "alias": "colData"; "required": false; }; "colOggetto": { "alias": "colOggetto"; "required": false; }; "colCliente": { "alias": "colCliente"; "required": false; }; "colContatti": { "alias": "colContatti"; "required": false; }; "colPratiche": { "alias": "colPratiche"; "required": false; }; "colRilevanza": { "alias": "colRilevanza"; "required": false; }; }, { "apriMail": "apriMail"; }, never, never, true, never>;
4996
+ }
4997
+
4998
+ /**
4999
+ * Anteprima di una mail archiviata (Mail Archiver).
5000
+ *
5001
+ * L'archivio conserva l'`.eml` originale, che non si mostra a video: la resa la
5002
+ * produce l'utility `mail_reader` lanciata con `exec_app`, che restituisce l'HTML
5003
+ * sullo stdout. Nessun file finisce nella docroot — le mail archiviate sarebbero
5004
+ * altrimenti scaricabili senza autenticazione.
5005
+ */
5006
+ declare class FHMailPreviewComponent implements OnInit {
5007
+ dialogRef: MatDialogRef<FHMailPreviewComponent>;
5008
+ private fileService;
5009
+ private sanitizer;
5010
+ appService: AppService;
5011
+ data: any;
5012
+ titolo: string;
5013
+ html: SafeHtml | null;
5014
+ errore: string;
5015
+ caricamento: boolean;
5016
+ scaricando: boolean;
5017
+ allegati: any[];
5018
+ buttons: DialogButton[];
5019
+ private aggiornaPulsanti;
5020
+ constructor(dialogRef: MatDialogRef<FHMailPreviewComponent>, fileService: FileService, sanitizer: DomSanitizer, appService: AppService, data: any);
5021
+ ngOnInit(): void;
5022
+ /**
5023
+ * Elenco degli allegati per la barra cliccabile. Chiamata separata e leggera:
5024
+ * restituisce solo nomi e pesi, non i byte, che si leggono al momento del
5025
+ * download — un allegato da 20 MB non va tirato giu per disegnare un pulsante.
5026
+ */
5027
+ private caricaAllegati;
5028
+ scaricaAllegato(a: any): void;
5029
+ peso(byteCount: number): string;
5030
+ /** atob non regge gli accenti: si passa dai byte, non dai caratteri. */
5031
+ private daBase64;
5032
+ onBeforeClose(event: DialogBeforeCloseEvent): void;
5033
+ /**
5034
+ * Scarica l'.eml originale. Passa da mail_reader --originale invece che da un
5035
+ * link diretto: il file sta fuori dalla docroot apposta, e servirlo via URL lo
5036
+ * renderebbe scaricabile senza autenticazione.
5037
+ */
5038
+ private scarica;
5039
+ private salvaFile;
5040
+ static ɵfac: i0.ɵɵFactoryDeclaration<FHMailPreviewComponent, never>;
5041
+ static ɵcmp: i0.ɵɵComponentDeclaration<FHMailPreviewComponent, "FHMailPreview", never, {}, {}, never, never, true, never>;
5042
+ }
5043
+
5044
+ /** Ruolo di un messaggio nella conversazione (formato OpenAI-compatible). */
5045
+ type FHAiRole = "user" | "assistant" | "system";
5046
+ /** Sorgente RAG citata dal modello (chunk recuperato da Qdrant via Cheshire Cat). */
5047
+ interface FHAiSource {
5048
+ /** Titolo/nome documento o riferimento mostrabile. */
5049
+ title: string;
5050
+ /** Estratto del chunk (snippet). */
5051
+ snippet?: string;
5052
+ /** Punteggio di similarita' (0..1) se fornito dal backend. */
5053
+ score?: number;
5054
+ /** Eventuale URL/percorso del documento sorgente. */
5055
+ url?: string;
5056
+ }
5057
+ /** Singolo messaggio della conversazione. */
5058
+ interface FHAiMessage {
5059
+ role: FHAiRole;
5060
+ content: string;
5061
+ /** True mentre il messaggio assistant e' in streaming/caricamento. */
5062
+ loading?: boolean;
5063
+ /** Sorgenti RAG associate alla risposta (citazioni). */
5064
+ sources?: FHAiSource[];
5065
+ /** Timestamp di creazione (ms). */
5066
+ ts?: number;
5067
+ }
5068
+ /**
5069
+ * Contesto di scoping {azienda, ruolo, persona}.
5070
+ * NB: e' informativo/di visualizzazione lato client (es. per il titolo).
5071
+ * L'enforcement di sicurezza avviene server-side dall'identita' autenticata.
5072
+ */
5073
+ interface FHAiContext {
5074
+ azienda?: string;
5075
+ ruolo?: string;
5076
+ persona?: string;
5077
+ /** Id conversazione per continuita' lato backend. */
5078
+ conversationId?: string;
5079
+ }
5080
+ /** Opzioni della singola chiamata al backend AI. */
5081
+ interface FHAiRequestOptions {
5082
+ /** URL completo dell'endpoint chat. Se assente: AppService.API_ENDPOINT + path. */
5083
+ endpoint?: string;
5084
+ /** Path relativo all'API_ENDPOINT quando non si passa un endpoint completo. */
5085
+ path?: string;
5086
+ /** Modello da richiedere (override; di norma deciso dal backend). */
5087
+ model?: string;
5088
+ /** Abilita lo streaming SSE (default true). */
5089
+ stream?: boolean;
5090
+ /** API key del servizio AI (header x-api-key). Di norma NON serve lato browser:
5091
+ * la chiave sta sul backend FluxHub che fa da proxy. */
5092
+ apiKey?: string;
5093
+ /** Header aggiuntivi. */
5094
+ headers?: Record<string, string>;
5095
+ /** Inoltra il JWT FluxHub come Authorization: Bearer (default true). */
5096
+ forwardAuth?: boolean;
5097
+ /** Contesto di scoping (inviato come metadata, non autoritativo). */
5098
+ context?: FHAiContext;
5099
+ }
5100
+ /** Frammento emesso durante lo streaming. */
5101
+ interface FHAiChunk {
5102
+ /** Delta di testo (token). */
5103
+ delta: string;
5104
+ /** Testo accumulato finora. */
5105
+ text: string;
5106
+ /** True sull'ultimo frammento. */
5107
+ done: boolean;
5108
+ /** Sorgenti, se arrivate (di norma a fine risposta). */
5109
+ sources?: FHAiSource[];
5110
+ }
5111
+
5112
+ /**
5113
+ * Client del layer AI di FluxHub.
5114
+ *
5115
+ * Parla con un backend OpenAI-compatible (/v1/chat/completions o una route FluxHub
5116
+ * che fa da proxy verso il Cheshire Cat / Gemma). Supporta streaming SSE e risposta
5117
+ * singola. L'identita' utente viene inoltrata col JWT FluxHub: scoping e retrieval
5118
+ * sono enforced server-side (vedi architettura, sez. 10-11).
5119
+ *
5120
+ * Usa fetch() invece di HttpClient per gestire nativamente lo streaming SSE e per
5121
+ * avere pieno controllo sugli header (la chiamata AI puo' usare una chiave dedicata).
5122
+ */
5123
+ declare class FHAiService {
5124
+ private appService;
5125
+ /** Path di default (relativo ad API_ENDPOINT) della route AI sul backend FluxHub. */
5126
+ defaultPath: string;
5127
+ constructor(appService: AppService);
5128
+ /** Costruisce l'URL effettivo dell'endpoint. */
5129
+ private resolveUrl;
5130
+ /** Costruisce gli header (Content-Type, JWT FluxHub, API key AI, custom). */
5131
+ private buildHeaders;
5132
+ /** Corpo della richiesta (OpenAI-compatible). */
5133
+ private buildBody;
5134
+ /**
5135
+ * Conversazione in streaming. Emette un FHAiChunk per ogni delta di testo;
5136
+ * l'ultimo ha done=true ed eventuali sources.
5137
+ */
5138
+ chatStream(messages: FHAiMessage[], opts?: FHAiRequestOptions): Observable<FHAiChunk>;
5139
+ /**
5140
+ * Conversazione non-streaming: risolve con il testo completo e le sorgenti.
5141
+ */
5142
+ chatOnce(messages: FHAiMessage[], opts?: FHAiRequestOptions): Observable<{
5143
+ content: string;
5144
+ sources?: FHAiSource[];
5145
+ }>;
5146
+ /** Estrae il delta di testo da un evento SSE (OpenAI: choices[].delta.content). */
5147
+ private extractDelta;
5148
+ /** Estrae il testo completo dalla risposta non-streaming. */
5149
+ private extractContent;
5150
+ /** Estrae le sorgenti RAG (Cheshire Cat: why.memory.declarative; o sources/citations). */
5151
+ private extractSources;
5152
+ static ɵfac: i0.ɵɵFactoryDeclaration<FHAiService, never>;
5153
+ static ɵprov: i0.ɵɵInjectableDeclaration<FHAiService>;
5154
+ }
5155
+
5156
+ /**
5157
+ * Pannello chat AI riusabile di FluxHub.
5158
+ *
5159
+ * Conversazione con un backend OpenAI-compatible (proxy Prologika -> Cheshire Cat ->
5160
+ * Gemma) via FHAiService. Renderizza testo markdown, citazioni RAG, ha schermata di
5161
+ * benvenuto con suggerimenti e supporta streaming token-by-token.
5162
+ *
5163
+ * Tutto configurabile via @Input (endpoint, contesto azienda/ruolo, testi, tema) per
5164
+ * riuso cross-cliente, in linea con gli altri componenti standard della libreria.
5165
+ *
5166
+ * Esempio:
5167
+ * <FHAiChat [context]="{azienda:'Bormioli', ruolo:'sales'}"
5168
+ * [accent]="'#16afc7'"
5169
+ * welcomeTitle="Assistente Bormioli"></FHAiChat>
5170
+ */
5171
+ declare class FHAiChatComponent implements OnDestroy {
5172
+ private ai;
5173
+ private sanitizer;
5174
+ accent: string;
5175
+ accentDark: string;
5176
+ get _a(): string;
5177
+ get _ad(): string;
5178
+ showHeader: boolean;
5179
+ title: string;
5180
+ subtitle: string;
5181
+ tagLabel: string;
5182
+ welcomeTitle: string;
5183
+ welcomeSubtitle: string;
5184
+ suggestions: string[];
5185
+ placeholder: string;
5186
+ showHint: boolean;
5187
+ /** URL completo dell'endpoint AI. Se vuoto: AppService.API_ENDPOINT + path. */
5188
+ endpoint: string;
5189
+ /** Path relativo all'API_ENDPOINT (default route AI sul backend FluxHub). */
5190
+ path: string;
5191
+ /** Modello da richiedere (di norma deciso lato server). */
5192
+ model: string;
5193
+ /** Abilita lo streaming token-by-token (SSE). */
5194
+ stream: boolean;
5195
+ /** API key del servizio AI (di norma NON serve lato browser). */
5196
+ apiKey: string;
5197
+ /** Inoltra il JWT FluxHub come Authorization Bearer. */
5198
+ forwardAuth: boolean;
5199
+ /** Contesto di scoping {azienda, ruolo, persona} (informativo + metadata). */
5200
+ context: FHAiContext | null;
5201
+ /** Messaggio di sistema iniziale opzionale (di norma lo costruisce il backend). */
5202
+ systemPrompt: string;
5203
+ messageSent: EventEmitter<string>;
5204
+ responseReceived: EventEmitter<FHAiMessage>;
5205
+ errored: EventEmitter<string>;
5206
+ scroller?: ElementRef<HTMLDivElement>;
5207
+ messages: FHAiMessage[];
5208
+ userInput: string;
5209
+ busy: boolean;
5210
+ errorMsg: string;
5211
+ private sub?;
5212
+ constructor(ai: FHAiService, sanitizer: DomSanitizer);
5213
+ ngOnDestroy(): void;
5214
+ onKeyDown(ev: KeyboardEvent): void;
5215
+ autoGrow(ta: HTMLTextAreaElement): void;
5216
+ sendSuggestion(text: string): void;
5217
+ send(): void;
5218
+ stop(): void;
5219
+ clear(): void;
5220
+ private finish;
5221
+ private fail;
5222
+ private scrollSoon;
5223
+ /** Rende il markdown (sottoinsieme) in HTML sicuro: escape -> formattazione. */
5224
+ render(content: string): SafeHtml;
5225
+ static ɵfac: i0.ɵɵFactoryDeclaration<FHAiChatComponent, never>;
5226
+ static ɵcmp: i0.ɵɵComponentDeclaration<FHAiChatComponent, "FHAiChat", never, { "accent": { "alias": "accent"; "required": false; }; "accentDark": { "alias": "accentDark"; "required": false; }; "showHeader": { "alias": "showHeader"; "required": false; }; "title": { "alias": "title"; "required": false; }; "subtitle": { "alias": "subtitle"; "required": false; }; "tagLabel": { "alias": "tagLabel"; "required": false; }; "welcomeTitle": { "alias": "welcomeTitle"; "required": false; }; "welcomeSubtitle": { "alias": "welcomeSubtitle"; "required": false; }; "suggestions": { "alias": "suggestions"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "showHint": { "alias": "showHint"; "required": false; }; "endpoint": { "alias": "endpoint"; "required": false; }; "path": { "alias": "path"; "required": false; }; "model": { "alias": "model"; "required": false; }; "stream": { "alias": "stream"; "required": false; }; "apiKey": { "alias": "apiKey"; "required": false; }; "forwardAuth": { "alias": "forwardAuth"; "required": false; }; "context": { "alias": "context"; "required": false; }; "systemPrompt": { "alias": "systemPrompt"; "required": false; }; }, { "messageSent": "messageSent"; "responseReceived": "responseReceived"; "errored": "errored"; }, never, never, true, never>;
5227
+ }
5228
+
5229
+ /**
5230
+ * Launcher AI flottante ("drop-anywhere") di FluxHub: un FAB in basso a destra che
5231
+ * apre/chiude un pannello con dentro <FHAiChat>. Si inserisce in qualunque pagina
5232
+ * del portale per dare accesso all'assistente senza occupare layout.
5233
+ *
5234
+ * Inoltra al chat gli @Input principali (endpoint, contesto, tema, testi).
5235
+ *
5236
+ * Esempio:
5237
+ * <FHAiAssistant [context]="{azienda:'COEM', ruolo:'manager'}"
5238
+ * [accent]="'#16afc7'"
5239
+ * welcomeTitle="Assistente COEM"></FHAiAssistant>
5240
+ */
5241
+ declare class FHAiAssistantComponent implements OnInit {
5242
+ accent: string;
5243
+ accentDark: string;
5244
+ get _a(): string;
5245
+ get _ad(): string;
5246
+ icon: string;
5247
+ openLabel: string;
5248
+ showLabel: boolean;
5249
+ /** 'floating' = popover ancorato al FAB; 'right' = drawer a tutta altezza. */
5250
+ dock: 'floating' | 'right';
5251
+ /** Apre il pannello all'avvio. */
5252
+ startOpen: boolean;
5253
+ title: string;
5254
+ subtitle: string;
5255
+ tagLabel: string;
5256
+ welcomeTitle: string;
5257
+ welcomeSubtitle: string;
5258
+ suggestions: string[];
5259
+ placeholder: string;
5260
+ endpoint: string;
5261
+ path: string;
5262
+ model: string;
5263
+ stream: boolean;
5264
+ apiKey: string;
5265
+ forwardAuth: boolean;
5266
+ context: FHAiContext | null;
5267
+ systemPrompt: string;
5268
+ open: boolean;
5269
+ ngOnInit(): void;
5270
+ toggle(): void;
5271
+ static ɵfac: i0.ɵɵFactoryDeclaration<FHAiAssistantComponent, never>;
5272
+ static ɵcmp: i0.ɵɵComponentDeclaration<FHAiAssistantComponent, "FHAiAssistant", never, { "accent": { "alias": "accent"; "required": false; }; "accentDark": { "alias": "accentDark"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "openLabel": { "alias": "openLabel"; "required": false; }; "showLabel": { "alias": "showLabel"; "required": false; }; "dock": { "alias": "dock"; "required": false; }; "startOpen": { "alias": "startOpen"; "required": false; }; "title": { "alias": "title"; "required": false; }; "subtitle": { "alias": "subtitle"; "required": false; }; "tagLabel": { "alias": "tagLabel"; "required": false; }; "welcomeTitle": { "alias": "welcomeTitle"; "required": false; }; "welcomeSubtitle": { "alias": "welcomeSubtitle"; "required": false; }; "suggestions": { "alias": "suggestions"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "endpoint": { "alias": "endpoint"; "required": false; }; "path": { "alias": "path"; "required": false; }; "model": { "alias": "model"; "required": false; }; "stream": { "alias": "stream"; "required": false; }; "apiKey": { "alias": "apiKey"; "required": false; }; "forwardAuth": { "alias": "forwardAuth"; "required": false; }; "context": { "alias": "context"; "required": false; }; "systemPrompt": { "alias": "systemPrompt"; "required": false; }; }, {}, never, never, true, never>;
5273
+ }
5274
+
5275
+ export { AppMakerService, AppService, ApprovaGridComponent, AuthHttpRequestInterceptor, AuthenticationService, BpmnEditorComponent, CheckboxEditorComponent, ComboBoxEditorComponent, CurrencyComponent, DialogBaseComponent, FHAiAssistantComponent, FHAiChatComponent, FHAiService, FHAutoCompleteComponent, FHCheckBoxComponent, FHColorPickerComponent, FHComboboxComponent, FHConfirmValues, FHCurrencyFormatterDirective, FHCurrencyPipe, FHDatePickerComponent, FHDateRangePickerComponent, FHFieldPickListComponent, FHFilterComboboxComponent, FHFormBuilderComponent, FHFormExecuterComponent, FHFormToolBarComponent, FHGridComponent, FHGridJSONComponent, FHGridToolBarComponent, FHGuard, FHHelpButtonComponent, FHHomeDocsComponent, FHHomeLauncherComponent, FHHomeStatsComponent, FHHomeTodoComponent, FHIconPickerComponent, FHImageViewerComponent, FHListComponent, FHLogPanelComponent, FHMailArchivedComponent, FHMailPreviewComponent, FHMultiComboboxComponent, FHNotesPanelComponent, FHNumericFieldComponent, FHPickFieldComponent, FHPickUsersComponent, FHRichTextComponent, FHRoleManagerComponent, FHTableManagerComponent, FHTextAreaComponent, FHTextInputComponent, FHTimePickerComponent, FHToolBarCustomAction, FHToolbarCommandType, FHUploadComponent, FHUploadPanelComponent, FHUploadPanelS3Component, FHUploadS3Component, FHUserFieldComponent, FHWinAppLogsComponent, FHWinAskBigTextComponent, FHWinAskButtonsComponent, FHWinAskNumberComponent, FHWinAskRichTextComponent, FHWinAskTextComponent, FHWinAutoComplete, FHWinComboComponent, FHWinConfirmComponent, FHWinErrorComponent, FHWinGridSelection, FHWinInfoComponent, FHWinListComponent, FHWinMappaComponent, FHWinOutputComponent, FHWinPicklistComponent, FHWinSalvaAnnulla, FHWinSelectByGridComponent, FHWinShowEmail, FHWinShowEmailS3, FHWinShowImage, FHWinShowLog, FHWinShowLogDett, FHWinTimeSlider, FHWinUploadComponent, FHWinUserInfo, FHWinUserPickerComponent, FHWinWaitComponent, FHWorkflowForm, FHWorkflowHeaderBar, FHWorkflowTasksPanel, FHWorkflowView, FSInput, FSResult, FileService, GridService, LocalDBService, MonthYearPickerComponent, NumericEditorComponent, OdbcService, OfficeAutomatorService, OfficeOperation, OfficeResult, QGParam, QGResult, QParam, QResult, QueryOpenService, QueryService, RegistrationService, ReplaceLineBreaks, SafePipe, TextAreaEditorComponent, UtilityService, WkfService, YearPickerComponent, createButtonCommand, createCheckboxCommand, createSpacerCommand, createTableManagerCommand, fh_win_translate, wkfField };
5276
+ export type { DialogBeforeCloseEvent, DialogButton, FHAiChunk, FHAiContext, FHAiMessage, FHAiRequestOptions, FHAiRole, FHAiSource, FHGridColumn, FHLauncherApp, FHLauncherCategory, FHTaskExternalHint, FHToolbarButtonCommand, FHToolbarCheckboxCommand, FHToolbarCommand, FHToolbarSpacerCommand, FHToolbarTableManagerCommand, FiltroMailArchiviata, WkfCompleteTaskOptions, WkfFieldType, WkfFieldValue, WkfProceedOptions, WkfProceedReason, WkfProceedResult, WkfTaskResult };