@fluxhub/fluxhub-lib 19.0.192 → 19.0.194

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