@fluxhub/fluxhub-lib 18.0.27 → 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.
Files changed (25) hide show
  1. package/README.md +24 -24
  2. package/esm2022/lib/controls/fh-grid-column.mjs +1 -1
  3. package/esm2022/lib/controls/fh-replace-linebreak.mjs +1 -1
  4. package/esm2022/lib/controls/image-viewer/image-viewer-config.model.mjs +1 -1
  5. package/esm2022/lib/controls/image-viewer/image-viewer.component.mjs +3 -3
  6. package/esm2022/lib/controls/utils/save-pipe.mjs +1 -1
  7. package/esm2022/lib/controls/utils/simple-crypt.mjs +1 -1
  8. package/esm2022/lib/home-components/fh-home-docs/fh-home-docs.component.mjs +223 -0
  9. package/esm2022/lib/home-components/fh-home-launcher/fh-home-launcher.component.mjs +476 -0
  10. package/esm2022/lib/home-components/fh-home-stats/fh-home-stats.component.mjs +347 -0
  11. package/esm2022/lib/home-components/fh-home-todo/fh-home-todo.component.mjs +255 -0
  12. package/esm2022/lib/models/FSInput.mjs +1 -1
  13. package/esm2022/lib/models/FSResult.mjs +1 -1
  14. package/esm2022/lib/models/QGParam.mjs +1 -1
  15. package/esm2022/lib/models/QGResult.mjs +1 -1
  16. package/esm2022/lib/models/QResult.mjs +1 -1
  17. package/esm2022/public-api.mjs +6 -1
  18. package/fesm2022/fluxhub-fluxhub-lib.mjs +1272 -4
  19. package/fesm2022/fluxhub-fluxhub-lib.mjs.map +1 -1
  20. package/lib/home-components/fh-home-docs/fh-home-docs.component.d.ts +52 -0
  21. package/lib/home-components/fh-home-launcher/fh-home-launcher.component.d.ts +136 -0
  22. package/lib/home-components/fh-home-stats/fh-home-stats.component.d.ts +61 -0
  23. package/lib/home-components/fh-home-todo/fh-home-todo.component.d.ts +55 -0
  24. package/package.json +5 -2
  25. package/public-api.d.ts +4 -0
@@ -0,0 +1,52 @@
1
+ import { OnInit } from "@angular/core";
2
+ import { FileService } from "../../services/dofile.service";
3
+ import { AppService } from "../../services/app.service";
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * Pannello "Documenti" della homepage: esplora la cartella documentale condivisa
7
+ * (navigazione cartelle + download file) tramite FileService.
8
+ *
9
+ * Endpoint e percorsi sono configurabili via @Input per riuso cross-cliente.
10
+ * L'endpoint API NON è obbligatorio: se non passato viene ricavato da
11
+ * AppService.API_ENDPOINT (lo stesso usato da QueryService/FileService).
12
+ */
13
+ export declare class FHHomeDocsComponent implements OnInit {
14
+ private _dataService;
15
+ private appService;
16
+ accent: string;
17
+ accentDark: string;
18
+ get _a(): string;
19
+ get _ad(): string;
20
+ title: string;
21
+ tagLabel: string;
22
+ emptyTitle: string;
23
+ emptySub: string;
24
+ /**
25
+ * Base URL delle API per costruire l'URL di download (il suffisso "/api" viene rimosso).
26
+ * Opzionale: se vuoto si usa AppService.API_ENDPOINT.
27
+ */
28
+ apiEndpoint: string;
29
+ /** Comando FileService per elencare i documenti. */
30
+ command: string;
31
+ /** Cartella radice da cui partire. */
32
+ rootPath: string;
33
+ /** Segmento di percorso aggiunto all'endpoint per il download. */
34
+ downloadSegment: string;
35
+ /** Percorso base delle icone tipo file. */
36
+ iconBasePath: string;
37
+ curr_path: string;
38
+ last_curr_path: string;
39
+ b_loading: boolean;
40
+ errorMsg: string;
41
+ dirs: Array<any>;
42
+ files: Array<any>;
43
+ constructor(_dataService: FileService, appService: AppService);
44
+ /** Endpoint effettivo: input esplicito oppure default da AppService. */
45
+ private get effectiveEndpoint();
46
+ ngOnInit(): void;
47
+ open_dir(item: any): void;
48
+ download_file(item: any): void;
49
+ ref_dirs(s: string): void;
50
+ static ɵfac: i0.ɵɵFactoryDeclaration<FHHomeDocsComponent, never>;
51
+ 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>;
52
+ }
@@ -0,0 +1,136 @@
1
+ import { AfterViewInit, EventEmitter } from "@angular/core";
2
+ import { Router } from "@angular/router";
3
+ import { AppService } from "../../services/app.service";
4
+ import { AuthenticationService } from "../../services/login.service";
5
+ import { QueryService } from "../../services/doquery.service";
6
+ import { UtilityService } from "../../services/utility.service";
7
+ import * as i0 from "@angular/core";
8
+ /** Singola app esposta dal launcher. */
9
+ export interface FHLauncherApp {
10
+ id: number;
11
+ title: string;
12
+ link: string;
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;
16
+ }
17
+ /** Categoria (cartella menu) che raggruppa le app. */
18
+ export interface FHLauncherCategory {
19
+ /** id_category (dalla tabella applications_categories). */
20
+ id: number | null;
21
+ name: string;
22
+ title: string;
23
+ faIcon: string;
24
+ mdIcon: string;
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;
31
+ apps: FHLauncherApp[];
32
+ }
33
+ /**
34
+ * Elenco applicazioni per la homepage (launcher a colonne "masonry").
35
+ *
36
+ * Legge il menu applicativo dell'utente tramite le query standard FluxHub
37
+ * (SELECT_USER_ACCESS + SELECT_ALL_APPS_USER / SELECT_APPS_USER, in query.ini).
38
+ * I nomi delle query e l'aspetto sono configurabili via @Input per riuso cross-cliente.
39
+ *
40
+ * Uso: <FHHomeLauncher [appVersion]="costanti.VER"></FHHomeLauncher>
41
+ */
42
+ export declare class FHHomeLauncherComponent implements AfterViewInit {
43
+ appService: AppService;
44
+ private _service;
45
+ private _dataService;
46
+ private _utility;
47
+ private router;
48
+ accent: string;
49
+ accentDark: string;
50
+ ink: string;
51
+ get _a(): string;
52
+ get _ad(): string;
53
+ get _ink(): string;
54
+ /** Mostra l'indice numerato (01, 02, ...) accanto al titolo categoria. */
55
+ showIndex: boolean;
56
+ /** Larghezza colonna masonry (px). */
57
+ columnWidth: number;
58
+ /** Spazio tra colonne (px). */
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;
95
+ sqlUserAccess: string;
96
+ sqlAllApps: string;
97
+ sqlApps: string;
98
+ sqlAccessLog: string;
99
+ /** Versione applicativa registrata nel log di accesso (di solito costanti.VER). */
100
+ appVersion: string;
101
+ /** Emesso quando l'utente apre un'app (dopo log e navigazione). */
102
+ appOpen: EventEmitter<FHLauncherApp>;
103
+ categories: FHLauncherCategory[];
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;
109
+ constructor(appService: AppService, _service: AuthenticationService, _dataService: QueryService, _utility: UtilityService, router: Router);
110
+ ngAfterViewInit(): void;
111
+ private bootstrap;
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;
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;
133
+ open_app(app: FHLauncherApp): void;
134
+ static ɵfac: i0.ɵɵFactoryDeclaration<FHHomeLauncherComponent, 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>;
136
+ }
@@ -0,0 +1,61 @@
1
+ import { OnInit } from "@angular/core";
2
+ import { ChartConfiguration, ChartDataset } from "chart.js";
3
+ import { AppService } from "../../services/app.service";
4
+ import { QueryService } from "../../services/doquery.service";
5
+ import * as i0 from "@angular/core";
6
+ /**
7
+ * Pannello "La tua attività" della homepage: doughnut delle applicazioni
8
+ * utilizzate + grafico a linea degli step di workflow eseguiti nel periodo.
9
+ *
10
+ * Le due query (in query.ini) e i nomi dei campi sono configurabili via @Input.
11
+ * - Query app: campi `label`, `value` (rinominabili).
12
+ * - Query step: campi `giorno` (data ISO), `value` (rinominabili).
13
+ */
14
+ export declare class FHHomeStatsComponent implements OnInit {
15
+ apps: AppService;
16
+ private queryService;
17
+ accent: string;
18
+ accentDark: string;
19
+ /** Palette del doughnut; il primo elemento dovrebbe coincidere con l'accent. */
20
+ pieColors: string[];
21
+ get _a(): string;
22
+ get _ad(): string;
23
+ appsTitle: string;
24
+ stepsTitle: string;
25
+ appsTag: string;
26
+ stepsTag: string;
27
+ appsEmptyTitle: string;
28
+ appsEmptySub: string;
29
+ stepsEmptyTitle: string;
30
+ stepsEmptySub: string;
31
+ /** Giorni indietro coperti dai grafici (default 30). */
32
+ days: number;
33
+ sqlApps: string;
34
+ sqlSteps: string;
35
+ appLabelField: string;
36
+ appValueField: string;
37
+ stepDayField: string;
38
+ stepValueField: string;
39
+ stepSeriesLabel: string;
40
+ loading: boolean;
41
+ error: boolean;
42
+ hasApps: boolean;
43
+ hasSteps: boolean;
44
+ periodoLabel: string;
45
+ subtitlePrefix: string;
46
+ pieLabels: string[];
47
+ pieDatasets: ChartDataset<"doughnut">[];
48
+ pieOptions: ChartConfiguration<"doughnut">["options"];
49
+ lineLabels: string[];
50
+ lineDatasets: ChartDataset<"line">[];
51
+ lineOptions: ChartConfiguration<"line">["options"];
52
+ constructor(apps: AppService, queryService: QueryService);
53
+ ngOnInit(): void;
54
+ private buildPeriodoLabel;
55
+ private tryLoad;
56
+ private load;
57
+ private buildPie;
58
+ private buildLine;
59
+ static ɵfac: i0.ɵɵFactoryDeclaration<FHHomeStatsComponent, never>;
60
+ 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>;
61
+ }
@@ -0,0 +1,55 @@
1
+ import { AfterViewInit, EventEmitter } from "@angular/core";
2
+ import { AppService } from "../../services/app.service";
3
+ import { QueryService } from "../../services/doquery.service";
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * Pannello "Task / To-Do" della homepage: elenco delle attività dei workflow
7
+ * assegnate all'utente, con filtro per categoria.
8
+ *
9
+ * Le query (in query.ini) e i nomi dei campi restituiti sono configurabili via
10
+ * @Input, così ogni cliente può usare le proprie senza modificare il componente.
11
+ *
12
+ * Campi attesi nella riga task (rinominabili): oggetto, applicazione, data_ultimo_step, link.
13
+ * Campo categoria atteso: valore.
14
+ */
15
+ export declare class FHHomeTodoComponent implements AfterViewInit {
16
+ private _dataService;
17
+ private app_service;
18
+ accent: string;
19
+ accentDark: string;
20
+ get _a(): string;
21
+ get _ad(): string;
22
+ title: string;
23
+ subtitle: string;
24
+ tagLabel: string;
25
+ icon: string;
26
+ allLabel: string;
27
+ emptyTitle: string;
28
+ emptySub: string;
29
+ dateFormat: string;
30
+ showCategoryFilter: boolean;
31
+ sqlCategories: string;
32
+ sqlByUser: string;
33
+ sqlByUserCat: string;
34
+ fieldLabel: string;
35
+ fieldMeta: string;
36
+ fieldDate: string;
37
+ fieldLink: string;
38
+ /** Campo che contiene il nome categoria nella query categorie. */
39
+ fieldCategory: string;
40
+ /** Emesso quando l'utente apre un task. */
41
+ todoOpen: EventEmitter<any>;
42
+ username: string | undefined;
43
+ todos: any[] | undefined;
44
+ errorMsg: string;
45
+ categories: string[];
46
+ selectedCat: string;
47
+ constructor(_dataService: QueryService, app_service: AppService);
48
+ ngAfterViewInit(): void;
49
+ load_todos(): void;
50
+ fetch_todos(cat: string): void;
51
+ select_cat(cat: string): void;
52
+ open(o: any): void;
53
+ static ɵfac: i0.ɵɵFactoryDeclaration<FHHomeTodoComponent, never>;
54
+ static ɵcmp: i0.ɵɵComponentDeclaration<FHHomeTodoComponent, "FHHomeTodo", never, { "accent": { "alias": "accent"; "required": false; }; "accentDark": { "alias": "accentDark"; "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; }; }, { "todoOpen": "todoOpen"; }, never, never, true, never>;
55
+ }
package/package.json CHANGED
@@ -1,10 +1,13 @@
1
1
  {
2
2
  "name": "@fluxhub/fluxhub-lib",
3
- "version": "18.0.27",
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",
7
- "peerDependencies": {},
7
+ "peerDependencies": {
8
+ "chart.js": "^4.4.8",
9
+ "ng2-charts": "^8.0.0"
10
+ },
8
11
  "dependencies": {
9
12
  "tslib": "^2.8.0"
10
13
  },
package/public-api.d.ts CHANGED
@@ -102,3 +102,7 @@ export { wkf_header_bar_v2 } from './lib/wkf_engine_v2/wkf-header-bar';
102
102
  export { FHUsersPickerComponent } from './lib/controls/fh-user-picker';
103
103
  export { SafePipe } from './lib/controls/utils/save-pipe';
104
104
  export { AuthHttpRequestInterceptor } from './lib/services/auth.interceptor';
105
+ export { FHHomeLauncherComponent, FHLauncherApp, FHLauncherCategory } from './lib/home-components/fh-home-launcher/fh-home-launcher.component';
106
+ export { FHHomeTodoComponent } from './lib/home-components/fh-home-todo/fh-home-todo.component';
107
+ export { FHHomeStatsComponent } from './lib/home-components/fh-home-stats/fh-home-stats.component';
108
+ export { FHHomeDocsComponent } from './lib/home-components/fh-home-docs/fh-home-docs.component';