@fluxhub/fluxhub-lib 18.0.28 → 18.0.29

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.
@@ -11,14 +11,23 @@ export interface FHLauncherApp {
11
11
  title: string;
12
12
  link: string;
13
13
  invisible?: boolean;
14
+ /** Icona FontAwesome specifica dell'app (da applications.app_icon, scelta con FHIconPicker); se assente si usa il logo categoria o boxIcon. */
15
+ appIcon?: string;
14
16
  }
15
17
  /** Categoria (cartella menu) che raggruppa le app. */
16
18
  export interface FHLauncherCategory {
19
+ /** id_category (dalla tabella applications_categories). */
20
+ id: number | null;
17
21
  name: string;
18
22
  title: string;
19
23
  faIcon: string;
20
24
  mdIcon: string;
21
25
  color: string;
26
+ /** Logo categoria (se configurato in v_category_logos). */
27
+ logoUrl?: string;
28
+ logoFilename?: string;
29
+ /** True se la categoria va renderizzata "a box" (precalcolato, vedi boxCategoryIds). */
30
+ isBox?: boolean;
22
31
  apps: FHLauncherApp[];
23
32
  }
24
33
  /**
@@ -48,6 +57,41 @@ export declare class FHHomeLauncherComponent implements AfterViewInit {
48
57
  columnWidth: number;
49
58
  /** Spazio tra colonne (px). */
50
59
  columnGap: number;
60
+ /**
61
+ * Elenco di id_category da renderizzare "a box" (card) invece che come
62
+ * elenco testuale. Es. [23] per la categoria Offerte. Accetta numeri o stringhe.
63
+ */
64
+ boxCategoryIds: Array<number | string>;
65
+ /** Icona Material Symbols mostrata nel box quando la categoria non ha un logo. */
66
+ boxIcon: string;
67
+ /** Etichetta dell'azione nel box (sotto al titolo). */
68
+ boxActionLabel: string;
69
+ /**
70
+ * Abilita la gestione dei preferiti: ogni categoria mostra un cuore; le
71
+ * categorie preferite sono renderizzate "a box". Le preferenze sono persistite
72
+ * per utente (tabella wkf_user_category_prefs, JSON di id_category).
73
+ * Quando true, l'aspetto a box è guidato dai preferiti dell'utente; se l'utente
74
+ * non ha mai personalizzato, si usa [boxCategoryIds] come default.
75
+ */
76
+ enableFavorites: boolean;
77
+ /** Query (query.ini) che legge le preferenze: SELECT fav_categories WHERE username=@VAL1. */
78
+ sqlCatPrefsGet: string;
79
+ /** Query (query.ini) di upsert: @VAL1=username, @VAL2=JSON array di id_category. */
80
+ sqlCatPrefsSave: string;
81
+ /** Tooltip del cuore quando la categoria NON è preferita. */
82
+ favoriteTooltip: string;
83
+ /** Tooltip del cuore quando la categoria È preferita. */
84
+ unfavoriteTooltip: string;
85
+ /**
86
+ * Colore di sfondo della superficie del launcher.
87
+ * "" (default) = trasparente: il launcher eredita lo sfondo della pagina.
88
+ */
89
+ background: string;
90
+ /**
91
+ * Mostra la trama a griglia ("piastrelle") dietro il launcher.
92
+ * true = griglia visibile; false (default) = nessuna griglia (aspetto attuale).
93
+ */
94
+ showGridBackground: boolean;
51
95
  sqlUserAccess: string;
52
96
  sqlAllApps: string;
53
97
  sqlApps: string;
@@ -58,12 +102,35 @@ export declare class FHHomeLauncherComponent implements AfterViewInit {
58
102
  appOpen: EventEmitter<FHLauncherApp>;
59
103
  categories: FHLauncherCategory[];
60
104
  is_loaded: boolean;
105
+ /** Set degli id_category preferiti (effettivi: salvati dall'utente o default). */
106
+ private favoriteIds;
107
+ /** True se l'utente ha già personalizzato le preferenze (riga presente in DB). */
108
+ private hasUserPref;
61
109
  constructor(appService: AppService, _service: AuthenticationService, _dataService: QueryService, _utility: UtilityService, router: Router);
62
110
  ngAfterViewInit(): void;
63
111
  private bootstrap;
64
112
  private load_user_then_menu;
113
+ private load_prefs_then_menu;
114
+ /** Normalizza il valore fav_categories (JSON string o array già parsato) in un Set di numeri. */
115
+ private parseFavorites;
65
116
  private build_menu;
117
+ /**
118
+ * Classe CSS FontAwesome per l'icona dell'app. Il valore (applications.app_icon,
119
+ * scelto con FHIconPicker) puo` essere: classe completa ("fa-solid fa-clipboard",
120
+ * "fa-brands fa-github"), nome con prefisso ("fa-clipboard") o nome semplice
121
+ * ("clipboard"). Se manca lo stile assume "fa-solid".
122
+ */
123
+ appIconClass(v: string): string;
124
+ /**
125
+ * True se la categoria va renderizzata "a box". Con i preferiti abilitati
126
+ * dipende dai preferiti dell'utente (favoriteIds); altrimenti da [boxCategoryIds].
127
+ */
128
+ private isBoxCat;
129
+ /** Toggle preferito su una categoria: aggiorna l'aspetto e persiste subito. */
130
+ toggleFavorite(cat: FHLauncherCategory, ev: Event): void;
131
+ /** Persiste le preferenze correnti (upsert username + JSON array di id_category). */
132
+ private save_prefs;
66
133
  open_app(app: FHLauncherApp): void;
67
134
  static ɵfac: i0.ɵɵFactoryDeclaration<FHHomeLauncherComponent, never>;
68
- 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; }; "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>;
135
+ 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>;
69
136
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluxhub/fluxhub-lib",
3
- "version": "18.0.28",
3
+ "version": "18.0.29",
4
4
  "description": "FluxHub components and workflow library",
5
5
  "main": "dist/index.js",
6
6
  "typings": "index.d.ts",