@fluxhub/fluxhub-lib 18.0.26 → 18.0.28

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.
@@ -8,7 +8,7 @@ import * as i3$1 from '@angular/router';
8
8
  import * as CryptoTS from 'crypto-ts';
9
9
  import { AES } from 'crypto-ts';
10
10
  import * as i1 from '@angular/platform-browser';
11
- import { Observable, Subject, forkJoin, throwError, BehaviorSubject } from 'rxjs';
11
+ import { Observable, Subject, forkJoin, throwError, BehaviorSubject, of } from 'rxjs';
12
12
  import * as i1$2 from '@angular/material/dialog';
13
13
  import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
14
14
  import * as i5$1 from '@angular/material/button';
@@ -90,6 +90,8 @@ import { MatStepperModule } from '@angular/material/stepper';
90
90
  import { MatTableModule } from '@angular/material/table';
91
91
  import * as i3$5 from 'ng2-dragula';
92
92
  import { DragulaModule } from 'ng2-dragula';
93
+ import { BaseChartDirective } from 'ng2-charts';
94
+ import { Chart, registerables } from 'chart.js';
93
95
 
94
96
  class QParam {
95
97
  sql = '';
@@ -6737,21 +6739,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
6737
6739
 
6738
6740
  class fh_win_show_log_dett {
6739
6741
  dialogRef;
6742
+ appService;
6740
6743
  data;
6741
6744
  modifiche = [];
6742
6745
  title = "";
6743
6746
  close() {
6744
6747
  this.dialogRef.close(null);
6745
6748
  }
6746
- constructor(dialogRef, data) {
6749
+ constructor(dialogRef, appService, data) {
6747
6750
  this.dialogRef = dialogRef;
6751
+ this.appService = appService;
6748
6752
  this.data = data;
6749
6753
  if (data.title != null)
6750
6754
  this.title = data.title.toUpperCase();
6751
6755
  this.modifiche = JSON.parse(data.dt);
6752
6756
  }
6753
6757
  ngAfterViewInit() { }
6754
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: fh_win_show_log_dett, deps: [{ token: i1$2.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
6758
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: fh_win_show_log_dett, deps: [{ token: i1$2.MatDialogRef }, { token: AppService }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
6755
6759
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: fh_win_show_log_dett, selector: "ng-component", ngImport: i0, template: `
6756
6760
  <div fxLayout="column">
6757
6761
  <div fxLayout="row" class="dialog_header">
@@ -6774,7 +6778,7 @@ class fh_win_show_log_dett {
6774
6778
  </div>
6775
6779
  <hr style="width:100%;size:0.5;color:#DDDDDD" />
6776
6780
 
6777
- <mat-dialog-content style="min-width:700px;max-height:65vh;overflow-y:auto;">
6781
+ <mat-dialog-content style="min-width:700px;overflow-y:auto;" [style.height]="(appService.getState().body_h-150)+'px'">
6778
6782
  <table style="width: 90%" class="fh_table">
6779
6783
  <thead>
6780
6784
  <tr>
@@ -6825,7 +6829,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
6825
6829
  </div>
6826
6830
  <hr style="width:100%;size:0.5;color:#DDDDDD" />
6827
6831
 
6828
- <mat-dialog-content style="min-width:700px;max-height:65vh;overflow-y:auto;">
6832
+ <mat-dialog-content style="min-width:700px;overflow-y:auto;" [style.height]="(appService.getState().body_h-150)+'px'">
6829
6833
  <table style="width: 90%" class="fh_table">
6830
6834
  <thead>
6831
6835
  <tr>
@@ -6851,7 +6855,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
6851
6855
  </div>
6852
6856
  `,
6853
6857
  }]
6854
- }], ctorParameters: () => [{ type: i1$2.MatDialogRef }, { type: undefined, decorators: [{
6858
+ }], ctorParameters: () => [{ type: i1$2.MatDialogRef }, { type: AppService }, { type: undefined, decorators: [{
6855
6859
  type: Inject,
6856
6860
  args: [MAT_DIALOG_DATA]
6857
6861
  }] }] });
@@ -44908,6 +44912,1022 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
44908
44912
  type: Injectable
44909
44913
  }], ctorParameters: () => [{ type: AuthenticationService }, { type: AppService }, { type: i1$1.HttpClient }] });
44910
44914
 
44915
+ /**
44916
+ * Elenco applicazioni per la homepage (launcher a colonne "masonry").
44917
+ *
44918
+ * Legge il menu applicativo dell'utente tramite le query standard FluxHub
44919
+ * (SELECT_USER_ACCESS + SELECT_ALL_APPS_USER / SELECT_APPS_USER, in query.ini).
44920
+ * I nomi delle query e l'aspetto sono configurabili via @Input per riuso cross-cliente.
44921
+ *
44922
+ * Uso: <FHHomeLauncher [appVersion]="costanti.VER"></FHHomeLauncher>
44923
+ */
44924
+ class FHHomeLauncherComponent {
44925
+ appService;
44926
+ _service;
44927
+ _dataService;
44928
+ _utility;
44929
+ router;
44930
+ // ---- Tema ----
44931
+ accent = "#63b345";
44932
+ accentDark = "#549a3b";
44933
+ ink = "#161212";
44934
+ get _a() { return this.accent; }
44935
+ get _ad() { return this.accentDark; }
44936
+ get _ink() { return this.ink; }
44937
+ // ---- Layout ----
44938
+ /** Mostra l'indice numerato (01, 02, ...) accanto al titolo categoria. */
44939
+ showIndex = true;
44940
+ /** Larghezza colonna masonry (px). */
44941
+ columnWidth = 270;
44942
+ /** Spazio tra colonne (px). */
44943
+ columnGap = 48;
44944
+ // ---- Query (query.ini) ----
44945
+ sqlUserAccess = "SELECT_USER_ACCESS";
44946
+ sqlAllApps = "SELECT_ALL_APPS_USER";
44947
+ sqlApps = "SELECT_APPS_USER";
44948
+ sqlAccessLog = "INSERT_ACCESS_LOG_2";
44949
+ /** Versione applicativa registrata nel log di accesso (di solito costanti.VER). */
44950
+ appVersion = "";
44951
+ /** Emesso quando l'utente apre un'app (dopo log e navigazione). */
44952
+ appOpen = new EventEmitter();
44953
+ categories = [];
44954
+ is_loaded = false;
44955
+ constructor(appService, _service, _dataService, _utility, router) {
44956
+ this.appService = appService;
44957
+ this._service = _service;
44958
+ this._dataService = _dataService;
44959
+ this._utility = _utility;
44960
+ this.router = router;
44961
+ }
44962
+ ngAfterViewInit() {
44963
+ setTimeout(() => this.bootstrap(), 0);
44964
+ }
44965
+ bootstrap() {
44966
+ if (!this._service.checkCredentials())
44967
+ return;
44968
+ if (!this.appService.user) {
44969
+ setTimeout(() => this.bootstrap(), 200);
44970
+ return;
44971
+ }
44972
+ this.load_user_then_menu();
44973
+ }
44974
+ // Carica l'accesso utente per assicurare che user_isadmin sia aggiornato
44975
+ // prima di scegliere la query del menu.
44976
+ load_user_then_menu() {
44977
+ const p = new QParam();
44978
+ p.sql = this.sqlUserAccess;
44979
+ p.values = [this.appService.user || ""];
44980
+ p.types = ["string"];
44981
+ this._dataService.doQuery(p).subscribe((data) => {
44982
+ if (data && data.result_msg === "OK" && data.result_data?.length > 0) {
44983
+ this.appService.user_isadmin = data.result_data[0].isadmin;
44984
+ this.appService.user_roles = data.result_data[0].roles;
44985
+ }
44986
+ this.build_menu();
44987
+ });
44988
+ }
44989
+ build_menu() {
44990
+ const username = this.appService.user || "";
44991
+ const isadmin = String(this.appService.user_isadmin ?? "") === "1";
44992
+ const p = new QParam();
44993
+ p.sql = isadmin ? this.sqlAllApps : this.sqlApps;
44994
+ p.values = [username];
44995
+ p.types = ["string"];
44996
+ this._dataService.doQuery(p).subscribe((data) => {
44997
+ if (!data || data.result_msg !== "OK") {
44998
+ this.is_loaded = true;
44999
+ return;
45000
+ }
45001
+ const rows = data.result_data || [];
45002
+ const grouped = [];
45003
+ let current = null;
45004
+ for (const r of rows) {
45005
+ const dir = r.dir || "";
45006
+ if (!current || current.title !== dir) {
45007
+ current = {
45008
+ name: dir.toLowerCase().split(" ").join("_"),
45009
+ title: dir,
45010
+ faIcon: r.icon || "",
45011
+ mdIcon: r.mdIcon || "",
45012
+ color: r.color || "",
45013
+ apps: [],
45014
+ };
45015
+ grouped.push(current);
45016
+ }
45017
+ if (r.invisible)
45018
+ continue;
45019
+ current.apps.push({ id: r.id, title: r.name, link: r.url });
45020
+ }
45021
+ this.categories = grouped.filter((c) => c.apps.length > 0);
45022
+ this.is_loaded = true;
45023
+ });
45024
+ }
45025
+ open_app(app) {
45026
+ if (!app || !app.link)
45027
+ return;
45028
+ const log = new QParam();
45029
+ log.sql = this.sqlAccessLog;
45030
+ log.values = [app.title, this.appVersion, this.appService.ip];
45031
+ log.types = ["string", "string", "string"];
45032
+ this._dataService.doQuery(log).subscribe(() => { });
45033
+ this._utility.set_home_title(app.title);
45034
+ if (app.link.indexOf("http") !== -1) {
45035
+ let url = app.link;
45036
+ if (url.indexOf("[crypto_email]") > -1) {
45037
+ url = url.split("[crypto_email]").join(this.appService.user_email || "");
45038
+ }
45039
+ window.open(url);
45040
+ this.appOpen.emit(app);
45041
+ return;
45042
+ }
45043
+ this.router.navigate([app.link]);
45044
+ this.appOpen.emit(app);
45045
+ }
45046
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FHHomeLauncherComponent, deps: [{ token: AppService }, { token: AuthenticationService }, { token: QueryService }, { token: UtilityService }, { token: i3$1.Router }], target: i0.ɵɵFactoryTarget.Component });
45047
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FHHomeLauncherComponent, isStandalone: true, selector: "FHHomeLauncher", inputs: { accent: "accent", accentDark: "accentDark", ink: "ink", showIndex: "showIndex", columnWidth: "columnWidth", columnGap: "columnGap", sqlUserAccess: "sqlUserAccess", sqlAllApps: "sqlAllApps", sqlApps: "sqlApps", sqlAccessLog: "sqlAccessLog", appVersion: "appVersion" }, outputs: { appOpen: "appOpen" }, host: { properties: { "style.--fh-home-accent": "this._a", "style.--fh-home-accent-dark": "this._ad", "style.--fh-home-ink": "this._ink" } }, ngImport: i0, template: `
45048
+ <div class="launcher" *ngIf="is_loaded">
45049
+ <div class="launcher-cols" [style.column-width.px]="columnWidth" [style.column-gap.px]="columnGap">
45050
+ <section class="cat" *ngFor="let cat of categories; let i = index">
45051
+ <header class="cat-head">
45052
+ <span class="cat-index" *ngIf="showIndex">{{ (i + 1).toString().padStart(2, "0") }}</span>
45053
+ <h2 class="cat-title">{{ cat.title }}</h2>
45054
+ </header>
45055
+ <div class="cat-apps">
45056
+ <button
45057
+ *ngFor="let app of cat.apps"
45058
+ type="button"
45059
+ class="cat-app"
45060
+ (click)="open_app(app)"
45061
+ >
45062
+ <span class="cat-app-label">{{ app.title }}</span>
45063
+ <i class="material-symbols-outlined cat-app-arrow">arrow_forward</i>
45064
+ </button>
45065
+ </div>
45066
+ </section>
45067
+ </div>
45068
+ </div>
45069
+ `, isInline: true, styles: [":host{display:block;flex:0 0 auto}.launcher{width:100%;box-sizing:border-box;padding:12px 48px 18px}.launcher-cols{column-width:270px;column-gap:48px}.cat{position:relative;break-inside:avoid;margin-bottom:22px;border-top:2px solid var(--fh-home-ink, #161212);padding-top:10px}.cat:after{content:\"\";position:absolute;top:-2px;left:0;width:30px;height:2px;background-color:var(--fh-home-accent, #63b345)}.cat-head{display:flex;align-items:baseline;gap:10px;margin-bottom:10px}.cat-index{font-family:Plus Jakarta Sans,sans-serif;font-size:11px;font-weight:700;letter-spacing:.06em;color:var(--fh-home-accent-dark, #549a3b)}.cat-title{flex:1 1 auto;margin:0;font-family:Plus Jakarta Sans,sans-serif;font-size:13px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--fh-home-ink, #161212)}.cat-apps{display:flex;flex-direction:column}.cat-app{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 2px 7px 0;border:none;border-bottom:1px solid rgba(22,18,18,.07);background:transparent;cursor:pointer;text-align:left;font-family:Inter,sans-serif;font-size:14px;font-weight:500;color:#443d3d;transition:color .15s ease,padding-left .15s ease}.cat-app:last-child{border-bottom:none}.cat-app-arrow{font-size:16px;color:transparent;transition:color .15s ease,transform .15s ease}.cat-app:hover{color:var(--fh-home-accent-dark, #549a3b);padding-left:6px}.cat-app:hover .cat-app-arrow{color:var(--fh-home-accent-dark, #549a3b);transform:translate(2px)}@media (max-width: 768px){.launcher{padding:10px 20px 24px}.launcher-cols{column-width:auto!important;columns:1}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
45070
+ }
45071
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FHHomeLauncherComponent, decorators: [{
45072
+ type: Component,
45073
+ args: [{ selector: "FHHomeLauncher", standalone: true, imports: [CommonModule], template: `
45074
+ <div class="launcher" *ngIf="is_loaded">
45075
+ <div class="launcher-cols" [style.column-width.px]="columnWidth" [style.column-gap.px]="columnGap">
45076
+ <section class="cat" *ngFor="let cat of categories; let i = index">
45077
+ <header class="cat-head">
45078
+ <span class="cat-index" *ngIf="showIndex">{{ (i + 1).toString().padStart(2, "0") }}</span>
45079
+ <h2 class="cat-title">{{ cat.title }}</h2>
45080
+ </header>
45081
+ <div class="cat-apps">
45082
+ <button
45083
+ *ngFor="let app of cat.apps"
45084
+ type="button"
45085
+ class="cat-app"
45086
+ (click)="open_app(app)"
45087
+ >
45088
+ <span class="cat-app-label">{{ app.title }}</span>
45089
+ <i class="material-symbols-outlined cat-app-arrow">arrow_forward</i>
45090
+ </button>
45091
+ </div>
45092
+ </section>
45093
+ </div>
45094
+ </div>
45095
+ `, styles: [":host{display:block;flex:0 0 auto}.launcher{width:100%;box-sizing:border-box;padding:12px 48px 18px}.launcher-cols{column-width:270px;column-gap:48px}.cat{position:relative;break-inside:avoid;margin-bottom:22px;border-top:2px solid var(--fh-home-ink, #161212);padding-top:10px}.cat:after{content:\"\";position:absolute;top:-2px;left:0;width:30px;height:2px;background-color:var(--fh-home-accent, #63b345)}.cat-head{display:flex;align-items:baseline;gap:10px;margin-bottom:10px}.cat-index{font-family:Plus Jakarta Sans,sans-serif;font-size:11px;font-weight:700;letter-spacing:.06em;color:var(--fh-home-accent-dark, #549a3b)}.cat-title{flex:1 1 auto;margin:0;font-family:Plus Jakarta Sans,sans-serif;font-size:13px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--fh-home-ink, #161212)}.cat-apps{display:flex;flex-direction:column}.cat-app{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 2px 7px 0;border:none;border-bottom:1px solid rgba(22,18,18,.07);background:transparent;cursor:pointer;text-align:left;font-family:Inter,sans-serif;font-size:14px;font-weight:500;color:#443d3d;transition:color .15s ease,padding-left .15s ease}.cat-app:last-child{border-bottom:none}.cat-app-arrow{font-size:16px;color:transparent;transition:color .15s ease,transform .15s ease}.cat-app:hover{color:var(--fh-home-accent-dark, #549a3b);padding-left:6px}.cat-app:hover .cat-app-arrow{color:var(--fh-home-accent-dark, #549a3b);transform:translate(2px)}@media (max-width: 768px){.launcher{padding:10px 20px 24px}.launcher-cols{column-width:auto!important;columns:1}}\n"] }]
45096
+ }], ctorParameters: () => [{ type: AppService }, { type: AuthenticationService }, { type: QueryService }, { type: UtilityService }, { type: i3$1.Router }], propDecorators: { accent: [{
45097
+ type: Input
45098
+ }], accentDark: [{
45099
+ type: Input
45100
+ }], ink: [{
45101
+ type: Input
45102
+ }], _a: [{
45103
+ type: HostBinding,
45104
+ args: ["style.--fh-home-accent"]
45105
+ }], _ad: [{
45106
+ type: HostBinding,
45107
+ args: ["style.--fh-home-accent-dark"]
45108
+ }], _ink: [{
45109
+ type: HostBinding,
45110
+ args: ["style.--fh-home-ink"]
45111
+ }], showIndex: [{
45112
+ type: Input
45113
+ }], columnWidth: [{
45114
+ type: Input
45115
+ }], columnGap: [{
45116
+ type: Input
45117
+ }], sqlUserAccess: [{
45118
+ type: Input
45119
+ }], sqlAllApps: [{
45120
+ type: Input
45121
+ }], sqlApps: [{
45122
+ type: Input
45123
+ }], sqlAccessLog: [{
45124
+ type: Input
45125
+ }], appVersion: [{
45126
+ type: Input
45127
+ }], appOpen: [{
45128
+ type: Output
45129
+ }] } });
45130
+
45131
+ /**
45132
+ * Pannello "Task / To-Do" della homepage: elenco delle attività dei workflow
45133
+ * assegnate all'utente, con filtro per categoria.
45134
+ *
45135
+ * Le query (in query.ini) e i nomi dei campi restituiti sono configurabili via
45136
+ * @Input, così ogni cliente può usare le proprie senza modificare il componente.
45137
+ *
45138
+ * Campi attesi nella riga task (rinominabili): oggetto, applicazione, data_ultimo_step, link.
45139
+ * Campo categoria atteso: valore.
45140
+ */
45141
+ class FHHomeTodoComponent {
45142
+ _dataService;
45143
+ app_service;
45144
+ // ---- Tema ----
45145
+ accent = "#63b345";
45146
+ accentDark = "#3f7029";
45147
+ get _a() { return this.accent; }
45148
+ get _ad() { return this.accentDark; }
45149
+ // ---- Testi ----
45150
+ title = "To-Do";
45151
+ subtitle = "Le attività dei workflow assegnate a te";
45152
+ tagLabel = "Task";
45153
+ icon = "task_alt";
45154
+ allLabel = "Tutti";
45155
+ emptyTitle = "Nessuna attività in sospeso";
45156
+ emptySub = "Le attività che ti vengono assegnate compariranno qui.";
45157
+ dateFormat = "dd/MM/yyyy";
45158
+ // ---- Comportamento ----
45159
+ showCategoryFilter = true;
45160
+ // ---- Query (query.ini) ----
45161
+ sqlCategories = "SELECT_TODO_CAT";
45162
+ sqlByUser = "SELECT_TODO_BY_USER_D";
45163
+ sqlByUserCat = "SELECT_TODO_BY_USER_CAT_D";
45164
+ // ---- Mappatura campi della riga task ----
45165
+ fieldLabel = "oggetto";
45166
+ fieldMeta = "applicazione";
45167
+ fieldDate = "data_ultimo_step";
45168
+ fieldLink = "link";
45169
+ /** Campo che contiene il nome categoria nella query categorie. */
45170
+ fieldCategory = "valore";
45171
+ /** Emesso quando l'utente apre un task. */
45172
+ todoOpen = new EventEmitter();
45173
+ username;
45174
+ todos;
45175
+ errorMsg = "";
45176
+ categories = [];
45177
+ selectedCat = "";
45178
+ constructor(_dataService, app_service) {
45179
+ this._dataService = _dataService;
45180
+ this.app_service = app_service;
45181
+ }
45182
+ ngAfterViewInit() {
45183
+ this.load_todos();
45184
+ }
45185
+ load_todos() {
45186
+ if (!this.app_service.user) {
45187
+ setTimeout(() => this.load_todos(), 500);
45188
+ return;
45189
+ }
45190
+ this.username = this.app_service.user;
45191
+ if (this.showCategoryFilter) {
45192
+ const cp = new QParam();
45193
+ cp.sql = this.sqlCategories;
45194
+ cp.types = ["string"];
45195
+ cp.values = [this.username];
45196
+ this._dataService.doQuery(cp).subscribe((data) => {
45197
+ if (data?.result_msg === "OK") {
45198
+ this.categories = (data.result_data || []).map((r) => r[this.fieldCategory]);
45199
+ }
45200
+ });
45201
+ }
45202
+ this.fetch_todos("");
45203
+ }
45204
+ fetch_todos(cat) {
45205
+ const p = new QParam();
45206
+ if (cat) {
45207
+ p.sql = this.sqlByUserCat;
45208
+ p.types = ["string", "string"];
45209
+ p.values = [this.username, cat];
45210
+ }
45211
+ else {
45212
+ p.sql = this.sqlByUser;
45213
+ p.types = ["string"];
45214
+ p.values = [this.username];
45215
+ }
45216
+ this._dataService.doQuery(p).subscribe((data) => {
45217
+ if (data?.result_msg === "OK")
45218
+ this.todos = data.result_data;
45219
+ });
45220
+ }
45221
+ select_cat(cat) {
45222
+ this.selectedCat = cat;
45223
+ this.fetch_todos(cat);
45224
+ }
45225
+ open(o) {
45226
+ if (!o)
45227
+ return;
45228
+ window.open(o, "_self");
45229
+ this.todoOpen.emit(o);
45230
+ }
45231
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FHHomeTodoComponent, deps: [{ token: QueryService }, { token: AppService }], target: i0.ɵɵFactoryTarget.Component });
45232
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FHHomeTodoComponent, isStandalone: true, selector: "FHHomeTodo", inputs: { accent: "accent", accentDark: "accentDark", title: "title", subtitle: "subtitle", tagLabel: "tagLabel", icon: "icon", allLabel: "allLabel", emptyTitle: "emptyTitle", emptySub: "emptySub", dateFormat: "dateFormat", showCategoryFilter: "showCategoryFilter", sqlCategories: "sqlCategories", sqlByUser: "sqlByUser", sqlByUserCat: "sqlByUserCat", fieldLabel: "fieldLabel", fieldMeta: "fieldMeta", fieldDate: "fieldDate", fieldLink: "fieldLink", fieldCategory: "fieldCategory" }, outputs: { todoOpen: "todoOpen" }, host: { properties: { "style.--fh-home-accent": "this._a", "style.--fh-home-accent-dark": "this._ad" } }, ngImport: i0, template: `
45233
+ <div class="tool-panel">
45234
+ <div class="panel-head">
45235
+ <div>
45236
+ <div class="panel-title">
45237
+ <i class="material-symbols-outlined">{{ icon }}</i>
45238
+ {{ title }}
45239
+ </div>
45240
+ <div class="panel-sub" *ngIf="subtitle">{{ subtitle }}</div>
45241
+ </div>
45242
+ <span class="tag tag-accent" *ngIf="tagLabel">{{ tagLabel }}</span>
45243
+ </div>
45244
+ <div class="panel-body">
45245
+
45246
+ <div class="cat-tabs" *ngIf="showCategoryFilter && categories.length">
45247
+ <button class="cat-tab" [class.cat-tab-active]="selectedCat === ''" (click)="select_cat('')">{{ allLabel }}</button>
45248
+ <button
45249
+ class="cat-tab"
45250
+ *ngFor="let cat of categories"
45251
+ [class.cat-tab-active]="selectedCat === cat"
45252
+ (click)="select_cat(cat)"
45253
+ >{{ cat }}</button>
45254
+ </div>
45255
+
45256
+ <div class="tool-list">
45257
+ <button
45258
+ type="button"
45259
+ class="tool-row"
45260
+ *ngFor="let todo of todos"
45261
+ (click)="open(todo[fieldLink])"
45262
+ >
45263
+ <span class="tool-row-label">{{ todo[fieldLabel] }}</span>
45264
+ <span class="tool-row-meta">{{ todo[fieldMeta] }}</span>
45265
+ <span class="tool-row-date">{{ todo[fieldDate] | date:dateFormat }}</span>
45266
+ <i class="material-symbols-outlined tool-row-arrow">arrow_forward</i>
45267
+ </button>
45268
+
45269
+ <div class="empty" *ngIf="todos && todos.length === 0">
45270
+ <i class="material-symbols-outlined empty-icon">{{ icon }}</i>
45271
+ <div class="empty-title">{{ emptyTitle }}</div>
45272
+ <div class="empty-sub">{{ emptySub }}</div>
45273
+ </div>
45274
+ </div>
45275
+ </div>
45276
+ </div>
45277
+
45278
+ <p class="tool-error" *ngIf="errorMsg != ''">{{ errorMsg }}</p>
45279
+ `, isInline: true, styles: [":host{display:block;height:100%}.tool-panel{height:100%;box-sizing:border-box;display:flex;flex-direction:column;background:#fff;border:1px solid rgba(22,18,18,.1);border-radius:10px;padding:16px 18px}.panel-head{display:flex;align-items:center;justify-content:space-between;padding-bottom:10px;border-bottom:1px solid rgba(22,18,18,.06);margin-bottom:10px}.panel-title{font-family:Plus Jakarta Sans,sans-serif;font-size:13px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#161212;display:flex;align-items:center;gap:8px}.panel-title i{font-size:18px;color:var(--fh-home-accent, #63b345)}.panel-sub{font-family:Inter,sans-serif;font-size:11px;color:#8c8585;margin-top:3px}.tag{display:inline-block;padding:3px 10px;border-radius:999px;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.03em;white-space:nowrap}.tag-accent{background:var(--fh-home-accent-soft, rgba(99, 179, 69, .12));color:var(--fh-home-accent-dark, #3f7029)}.panel-body{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}.cat-tabs{flex:0 0 auto;display:flex;gap:0;overflow-x:auto;border-bottom:2px solid rgba(22,18,18,.08);margin-bottom:8px;scrollbar-width:none}.cat-tabs::-webkit-scrollbar{display:none}.cat-tab{flex:0 0 auto;padding:5px 14px 7px;border:none;border-bottom:2px solid transparent;margin-bottom:-2px;background:transparent;font-family:Inter,sans-serif;font-size:12px;font-weight:500;color:#8c8585;cursor:pointer;white-space:nowrap;transition:color .15s ease,border-color .15s ease}.cat-tab:hover{color:#443d3d}.cat-tab-active{color:var(--fh-home-accent-dark, #3f7029);font-weight:700;border-bottom-color:var(--fh-home-accent, #63b345)}.tool-list{flex:1 1 auto;min-height:0;height:175px;overflow-y:auto;overflow-x:hidden}.tool-row{width:100%;display:flex;align-items:center;gap:10px;padding:7px 2px 7px 0;border:none;border-bottom:1px solid rgba(22,18,18,.07);background:transparent;cursor:pointer;text-align:left;font-family:Inter,sans-serif;font-size:13px;font-weight:500;color:#443d3d;transition:color .15s ease,padding-left .15s ease}.tool-row:last-child{border-bottom:none}.tool-row-label{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tool-row-meta{flex:0 0 auto;font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:#a39b9b}.tool-row-date{flex:0 0 auto;font-size:11px;font-weight:400;color:#a39b9b;white-space:nowrap}.tool-row-arrow{flex:0 0 auto;font-size:16px;color:transparent;transition:color .15s ease,transform .15s ease}.tool-row:hover{color:var(--fh-home-accent-dark, #3f7029);padding-left:6px}.tool-row:hover .tool-row-arrow{color:var(--fh-home-accent-dark, #3f7029);transform:translate(2px)}.empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;height:150px;text-align:center;color:#a39b9b}.empty-icon{font-size:30px;color:var(--fh-home-accent-faint, rgba(99, 179, 69, .45));margin-bottom:4px}.empty-title{font-family:Plus Jakarta Sans,sans-serif;font-size:13px;font-weight:700;color:#5c5454}.empty-sub{font-family:Inter,sans-serif;font-size:12px;color:#877d7d}.tool-error{color:#c00;font-size:9px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i6.DatePipe, name: "date" }] });
45280
+ }
45281
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FHHomeTodoComponent, decorators: [{
45282
+ type: Component,
45283
+ args: [{ selector: "FHHomeTodo", standalone: true, imports: [CommonModule], template: `
45284
+ <div class="tool-panel">
45285
+ <div class="panel-head">
45286
+ <div>
45287
+ <div class="panel-title">
45288
+ <i class="material-symbols-outlined">{{ icon }}</i>
45289
+ {{ title }}
45290
+ </div>
45291
+ <div class="panel-sub" *ngIf="subtitle">{{ subtitle }}</div>
45292
+ </div>
45293
+ <span class="tag tag-accent" *ngIf="tagLabel">{{ tagLabel }}</span>
45294
+ </div>
45295
+ <div class="panel-body">
45296
+
45297
+ <div class="cat-tabs" *ngIf="showCategoryFilter && categories.length">
45298
+ <button class="cat-tab" [class.cat-tab-active]="selectedCat === ''" (click)="select_cat('')">{{ allLabel }}</button>
45299
+ <button
45300
+ class="cat-tab"
45301
+ *ngFor="let cat of categories"
45302
+ [class.cat-tab-active]="selectedCat === cat"
45303
+ (click)="select_cat(cat)"
45304
+ >{{ cat }}</button>
45305
+ </div>
45306
+
45307
+ <div class="tool-list">
45308
+ <button
45309
+ type="button"
45310
+ class="tool-row"
45311
+ *ngFor="let todo of todos"
45312
+ (click)="open(todo[fieldLink])"
45313
+ >
45314
+ <span class="tool-row-label">{{ todo[fieldLabel] }}</span>
45315
+ <span class="tool-row-meta">{{ todo[fieldMeta] }}</span>
45316
+ <span class="tool-row-date">{{ todo[fieldDate] | date:dateFormat }}</span>
45317
+ <i class="material-symbols-outlined tool-row-arrow">arrow_forward</i>
45318
+ </button>
45319
+
45320
+ <div class="empty" *ngIf="todos && todos.length === 0">
45321
+ <i class="material-symbols-outlined empty-icon">{{ icon }}</i>
45322
+ <div class="empty-title">{{ emptyTitle }}</div>
45323
+ <div class="empty-sub">{{ emptySub }}</div>
45324
+ </div>
45325
+ </div>
45326
+ </div>
45327
+ </div>
45328
+
45329
+ <p class="tool-error" *ngIf="errorMsg != ''">{{ errorMsg }}</p>
45330
+ `, styles: [":host{display:block;height:100%}.tool-panel{height:100%;box-sizing:border-box;display:flex;flex-direction:column;background:#fff;border:1px solid rgba(22,18,18,.1);border-radius:10px;padding:16px 18px}.panel-head{display:flex;align-items:center;justify-content:space-between;padding-bottom:10px;border-bottom:1px solid rgba(22,18,18,.06);margin-bottom:10px}.panel-title{font-family:Plus Jakarta Sans,sans-serif;font-size:13px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#161212;display:flex;align-items:center;gap:8px}.panel-title i{font-size:18px;color:var(--fh-home-accent, #63b345)}.panel-sub{font-family:Inter,sans-serif;font-size:11px;color:#8c8585;margin-top:3px}.tag{display:inline-block;padding:3px 10px;border-radius:999px;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.03em;white-space:nowrap}.tag-accent{background:var(--fh-home-accent-soft, rgba(99, 179, 69, .12));color:var(--fh-home-accent-dark, #3f7029)}.panel-body{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}.cat-tabs{flex:0 0 auto;display:flex;gap:0;overflow-x:auto;border-bottom:2px solid rgba(22,18,18,.08);margin-bottom:8px;scrollbar-width:none}.cat-tabs::-webkit-scrollbar{display:none}.cat-tab{flex:0 0 auto;padding:5px 14px 7px;border:none;border-bottom:2px solid transparent;margin-bottom:-2px;background:transparent;font-family:Inter,sans-serif;font-size:12px;font-weight:500;color:#8c8585;cursor:pointer;white-space:nowrap;transition:color .15s ease,border-color .15s ease}.cat-tab:hover{color:#443d3d}.cat-tab-active{color:var(--fh-home-accent-dark, #3f7029);font-weight:700;border-bottom-color:var(--fh-home-accent, #63b345)}.tool-list{flex:1 1 auto;min-height:0;height:175px;overflow-y:auto;overflow-x:hidden}.tool-row{width:100%;display:flex;align-items:center;gap:10px;padding:7px 2px 7px 0;border:none;border-bottom:1px solid rgba(22,18,18,.07);background:transparent;cursor:pointer;text-align:left;font-family:Inter,sans-serif;font-size:13px;font-weight:500;color:#443d3d;transition:color .15s ease,padding-left .15s ease}.tool-row:last-child{border-bottom:none}.tool-row-label{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tool-row-meta{flex:0 0 auto;font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:#a39b9b}.tool-row-date{flex:0 0 auto;font-size:11px;font-weight:400;color:#a39b9b;white-space:nowrap}.tool-row-arrow{flex:0 0 auto;font-size:16px;color:transparent;transition:color .15s ease,transform .15s ease}.tool-row:hover{color:var(--fh-home-accent-dark, #3f7029);padding-left:6px}.tool-row:hover .tool-row-arrow{color:var(--fh-home-accent-dark, #3f7029);transform:translate(2px)}.empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;height:150px;text-align:center;color:#a39b9b}.empty-icon{font-size:30px;color:var(--fh-home-accent-faint, rgba(99, 179, 69, .45));margin-bottom:4px}.empty-title{font-family:Plus Jakarta Sans,sans-serif;font-size:13px;font-weight:700;color:#5c5454}.empty-sub{font-family:Inter,sans-serif;font-size:12px;color:#877d7d}.tool-error{color:#c00;font-size:9px}\n"] }]
45331
+ }], ctorParameters: () => [{ type: QueryService }, { type: AppService }], propDecorators: { accent: [{
45332
+ type: Input
45333
+ }], accentDark: [{
45334
+ type: Input
45335
+ }], _a: [{
45336
+ type: HostBinding,
45337
+ args: ["style.--fh-home-accent"]
45338
+ }], _ad: [{
45339
+ type: HostBinding,
45340
+ args: ["style.--fh-home-accent-dark"]
45341
+ }], title: [{
45342
+ type: Input
45343
+ }], subtitle: [{
45344
+ type: Input
45345
+ }], tagLabel: [{
45346
+ type: Input
45347
+ }], icon: [{
45348
+ type: Input
45349
+ }], allLabel: [{
45350
+ type: Input
45351
+ }], emptyTitle: [{
45352
+ type: Input
45353
+ }], emptySub: [{
45354
+ type: Input
45355
+ }], dateFormat: [{
45356
+ type: Input
45357
+ }], showCategoryFilter: [{
45358
+ type: Input
45359
+ }], sqlCategories: [{
45360
+ type: Input
45361
+ }], sqlByUser: [{
45362
+ type: Input
45363
+ }], sqlByUserCat: [{
45364
+ type: Input
45365
+ }], fieldLabel: [{
45366
+ type: Input
45367
+ }], fieldMeta: [{
45368
+ type: Input
45369
+ }], fieldDate: [{
45370
+ type: Input
45371
+ }], fieldLink: [{
45372
+ type: Input
45373
+ }], fieldCategory: [{
45374
+ type: Input
45375
+ }], todoOpen: [{
45376
+ type: Output
45377
+ }] } });
45378
+
45379
+ Chart.register(...registerables);
45380
+ /** Palette di default del doughnut (primo colore = accent). */
45381
+ const DEFAULT_PIE_COLORS = [
45382
+ "#63B345", "#161212", "#B0A6A6", "#C8E3BC", "#3F7029",
45383
+ "#5C5454", "#DCC9B6", "#549A3B", "#C9C2C2", "#443D3D",
45384
+ ];
45385
+ /**
45386
+ * Pannello "La tua attività" della homepage: doughnut delle applicazioni
45387
+ * utilizzate + grafico a linea degli step di workflow eseguiti nel periodo.
45388
+ *
45389
+ * Le due query (in query.ini) e i nomi dei campi sono configurabili via @Input.
45390
+ * - Query app: campi `label`, `value` (rinominabili).
45391
+ * - Query step: campi `giorno` (data ISO), `value` (rinominabili).
45392
+ */
45393
+ class FHHomeStatsComponent {
45394
+ apps;
45395
+ queryService;
45396
+ // ---- Tema ----
45397
+ accent = "#63B345";
45398
+ accentDark = "#3f7029";
45399
+ /** Palette del doughnut; il primo elemento dovrebbe coincidere con l'accent. */
45400
+ pieColors = DEFAULT_PIE_COLORS;
45401
+ get _a() { return this.accent; }
45402
+ get _ad() { return this.accentDark; }
45403
+ // ---- Testi ----
45404
+ appsTitle = "Applicazioni utilizzate";
45405
+ stepsTitle = "Step workflow eseguiti";
45406
+ appsTag = "Attività";
45407
+ stepsTag = "Workflow";
45408
+ appsEmptyTitle = "Nessuna attività nel periodo";
45409
+ appsEmptySub = "Le applicazioni che apri compariranno qui.";
45410
+ stepsEmptyTitle = "Nessuno step nel periodo";
45411
+ stepsEmptySub = "Gli step dei workflow che esegui compariranno qui.";
45412
+ // ---- Periodo ----
45413
+ /** Giorni indietro coperti dai grafici (default 30). */
45414
+ days = 30;
45415
+ // ---- Query (query.ini) ----
45416
+ sqlApps = "SELECT_HOME_STATS_APPS";
45417
+ sqlSteps = "SELECT_HOME_STATS_STEPS";
45418
+ // ---- Mappatura campi ----
45419
+ appLabelField = "label";
45420
+ appValueField = "value";
45421
+ stepDayField = "giorno";
45422
+ stepValueField = "value";
45423
+ stepSeriesLabel = "Step";
45424
+ loading = true;
45425
+ error = false;
45426
+ hasApps = false;
45427
+ hasSteps = false;
45428
+ periodoLabel = "";
45429
+ subtitlePrefix = "";
45430
+ pieLabels = [];
45431
+ pieDatasets = [];
45432
+ pieOptions = {
45433
+ responsive: true,
45434
+ maintainAspectRatio: false,
45435
+ plugins: {
45436
+ legend: { position: "right", align: "center", labels: { font: { size: 11 }, boxWidth: 10, padding: 8 } },
45437
+ tooltip: {
45438
+ callbacks: {
45439
+ label: (ctx) => {
45440
+ const v = ctx.parsed ?? 0;
45441
+ const total = ctx.dataset.data.reduce((a, b) => a + b, 0);
45442
+ const pct = total > 0 ? ((v / total) * 100).toFixed(1) : "0";
45443
+ return `${ctx.label}: ${v} (${pct}%)`;
45444
+ },
45445
+ },
45446
+ },
45447
+ },
45448
+ };
45449
+ lineLabels = [];
45450
+ lineDatasets = [];
45451
+ lineOptions;
45452
+ constructor(apps, queryService) {
45453
+ this.apps = apps;
45454
+ this.queryService = queryService;
45455
+ }
45456
+ ngOnInit() {
45457
+ this.subtitlePrefix = `Workflow · ultimi ${this.days} giorni`;
45458
+ this.lineOptions = {
45459
+ responsive: true,
45460
+ maintainAspectRatio: false,
45461
+ plugins: { legend: { display: false } },
45462
+ scales: {
45463
+ y: { beginAtZero: true, ticks: { precision: 0, font: { size: 10 } } },
45464
+ x: { ticks: { font: { size: 10 }, maxRotation: 0, autoSkip: true } },
45465
+ },
45466
+ elements: {
45467
+ line: { tension: 0.3, borderColor: this.accent, borderWidth: 2, fill: true, backgroundColor: "rgba(99,179,69,0.08)" },
45468
+ point: { radius: 3, backgroundColor: this.accent },
45469
+ },
45470
+ };
45471
+ this.buildPeriodoLabel();
45472
+ this.tryLoad();
45473
+ }
45474
+ buildPeriodoLabel() {
45475
+ const to = new Date();
45476
+ const from = new Date();
45477
+ from.setDate(to.getDate() - this.days);
45478
+ const fmt = (d) => `${String(d.getDate()).padStart(2, "0")}/${String(d.getMonth() + 1).padStart(2, "0")}/${d.getFullYear()}`;
45479
+ this.periodoLabel = `${fmt(from)} – ${fmt(to)}`;
45480
+ }
45481
+ tryLoad(retries = 10) {
45482
+ if (!this.apps.user) {
45483
+ if (retries <= 0) {
45484
+ this.error = true;
45485
+ this.loading = false;
45486
+ return;
45487
+ }
45488
+ setTimeout(() => this.tryLoad(retries - 1), 300);
45489
+ return;
45490
+ }
45491
+ this.load();
45492
+ }
45493
+ load() {
45494
+ const qApps = new QParam();
45495
+ qApps.sql = this.sqlApps;
45496
+ qApps.values = [this.apps.user];
45497
+ qApps.types = ["string"];
45498
+ const qSteps = new QParam();
45499
+ qSteps.sql = this.sqlSteps;
45500
+ qSteps.values = [this.apps.user];
45501
+ qSteps.types = ["string"];
45502
+ forkJoin({
45503
+ apps: this.queryService.doQuery(qApps).pipe(catchError(() => of(null))),
45504
+ steps: this.queryService.doQuery(qSteps).pipe(catchError(() => of(null))),
45505
+ }).subscribe({
45506
+ next: (r) => {
45507
+ if (!r.apps || r.apps.result_msg !== "OK" || !r.steps || r.steps.result_msg !== "OK") {
45508
+ this.error = true;
45509
+ this.loading = false;
45510
+ return;
45511
+ }
45512
+ this.buildPie(r.apps.result_data || []);
45513
+ this.buildLine(r.steps.result_data || []);
45514
+ this.loading = false;
45515
+ },
45516
+ error: () => {
45517
+ this.error = true;
45518
+ this.loading = false;
45519
+ },
45520
+ });
45521
+ }
45522
+ buildPie(rows) {
45523
+ this.hasApps = rows.length > 0;
45524
+ if (!this.hasApps)
45525
+ return;
45526
+ this.pieLabels = rows.map((r) => r[this.appLabelField] || "—");
45527
+ const values = rows.map((r) => Number(r[this.appValueField] || 0));
45528
+ this.pieDatasets = [
45529
+ {
45530
+ data: values,
45531
+ backgroundColor: this.pieColors.slice(0, values.length),
45532
+ borderColor: "#fff",
45533
+ borderWidth: 2,
45534
+ },
45535
+ ];
45536
+ }
45537
+ buildLine(rows) {
45538
+ this.hasSteps = rows.length > 0;
45539
+ if (!this.hasSteps)
45540
+ return;
45541
+ const map = new Map();
45542
+ for (const r of rows) {
45543
+ const key = String(r[this.stepDayField]).substring(0, 10);
45544
+ map.set(key, Number(r[this.stepValueField] || 0));
45545
+ }
45546
+ const labels = [];
45547
+ const values = [];
45548
+ const today = new Date();
45549
+ for (let i = this.days - 1; i >= 0; i--) {
45550
+ const d = new Date(today);
45551
+ d.setDate(today.getDate() - i);
45552
+ const iso = `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")}`;
45553
+ labels.push(`${String(d.getDate()).padStart(2, "0")}/${String(d.getMonth() + 1).padStart(2, "0")}`);
45554
+ values.push(map.get(iso) || 0);
45555
+ }
45556
+ this.lineLabels = labels;
45557
+ this.lineDatasets = [{ data: values, label: this.stepSeriesLabel }];
45558
+ }
45559
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FHHomeStatsComponent, deps: [{ token: AppService }, { token: QueryService }], target: i0.ɵɵFactoryTarget.Component });
45560
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FHHomeStatsComponent, isStandalone: true, selector: "FHHomeStats", inputs: { accent: "accent", accentDark: "accentDark", pieColors: "pieColors", appsTitle: "appsTitle", stepsTitle: "stepsTitle", appsTag: "appsTag", stepsTag: "stepsTag", appsEmptyTitle: "appsEmptyTitle", appsEmptySub: "appsEmptySub", stepsEmptyTitle: "stepsEmptyTitle", stepsEmptySub: "stepsEmptySub", days: "days", sqlApps: "sqlApps", sqlSteps: "sqlSteps", appLabelField: "appLabelField", appValueField: "appValueField", stepDayField: "stepDayField", stepValueField: "stepValueField", stepSeriesLabel: "stepSeriesLabel" }, host: { properties: { "style.--fh-home-accent": "this._a", "style.--fh-home-accent-dark": "this._ad" } }, ngImport: i0, template: `
45561
+ <div class="home-stats" *ngIf="!error">
45562
+
45563
+ <div class="stats-panel">
45564
+ <div class="panel-head">
45565
+ <div>
45566
+ <div class="panel-title">
45567
+ <i class="material-symbols-outlined">apps</i>
45568
+ {{ appsTitle }}
45569
+ </div>
45570
+ <div class="panel-sub">{{ subtitlePrefix }} · {{ periodoLabel }}</div>
45571
+ </div>
45572
+ <span class="tag tag-accent" *ngIf="appsTag">{{ appsTag }}</span>
45573
+ </div>
45574
+ <div class="panel-body">
45575
+ <div class="chart-wrap" *ngIf="!loading && hasApps">
45576
+ <canvas baseChart type="doughnut" [labels]="pieLabels" [datasets]="pieDatasets" [options]="pieOptions"></canvas>
45577
+ </div>
45578
+ <div class="empty" *ngIf="!loading && !hasApps">
45579
+ <i class="material-symbols-outlined empty-icon">apps</i>
45580
+ <div class="empty-title">{{ appsEmptyTitle }}</div>
45581
+ <div class="empty-sub">{{ appsEmptySub }}</div>
45582
+ </div>
45583
+ <div class="sk-chart" *ngIf="loading"></div>
45584
+ </div>
45585
+ </div>
45586
+
45587
+ <div class="stats-panel">
45588
+ <div class="panel-head">
45589
+ <div>
45590
+ <div class="panel-title">
45591
+ <i class="material-symbols-outlined">timeline</i>
45592
+ {{ stepsTitle }}
45593
+ </div>
45594
+ <div class="panel-sub">{{ subtitlePrefix }} · {{ periodoLabel }}</div>
45595
+ </div>
45596
+ <span class="tag tag-neutral" *ngIf="stepsTag">{{ stepsTag }}</span>
45597
+ </div>
45598
+ <div class="panel-body">
45599
+ <div class="chart-wrap" *ngIf="!loading && hasSteps">
45600
+ <canvas baseChart type="line" [labels]="lineLabels" [datasets]="lineDatasets" [options]="lineOptions"></canvas>
45601
+ </div>
45602
+ <div class="empty" *ngIf="!loading && !hasSteps">
45603
+ <i class="material-symbols-outlined empty-icon">route</i>
45604
+ <div class="empty-title">{{ stepsEmptyTitle }}</div>
45605
+ <div class="empty-sub">{{ stepsEmptySub }}</div>
45606
+ </div>
45607
+ <div class="sk-chart" *ngIf="loading"></div>
45608
+ </div>
45609
+ </div>
45610
+
45611
+ </div>
45612
+ `, isInline: true, styles: [".home-stats{margin-bottom:4px;display:flex;flex-direction:row;gap:14px}.stats-panel{flex:1 1 50%;min-width:0;background:#fff;border:1px solid rgba(22,18,18,.1);border-radius:10px;padding:16px 18px}.panel-head{display:flex;align-items:center;justify-content:space-between;padding-bottom:10px;border-bottom:1px solid rgba(22,18,18,.06);margin-bottom:10px}.panel-title{font-family:Plus Jakarta Sans,sans-serif;font-size:13px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#161212;display:flex;align-items:center;gap:8px}.panel-title i{font-size:18px;color:var(--fh-home-accent, #63b345)}.panel-sub{font-family:Inter,sans-serif;font-size:11px;color:#8c8585;margin-top:3px}.tag{display:inline-block;padding:3px 10px;border-radius:999px;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.03em;white-space:nowrap}.tag-accent{background:var(--fh-home-accent-soft, rgba(99, 179, 69, .12));color:var(--fh-home-accent-dark, #3f7029)}.tag-neutral{background:#1612120f;color:#443d3d}.panel-body{padding-top:4px}.chart-wrap{position:relative;height:175px;width:100%}.empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;height:175px;text-align:center;color:#a39b9b}.empty-icon{font-size:30px;color:var(--fh-home-accent-faint, rgba(99, 179, 69, .45));margin-bottom:4px}.empty-title{font-family:Plus Jakarta Sans,sans-serif;font-size:13px;font-weight:700;color:#5c5454}.empty-sub{font-family:Inter,sans-serif;font-size:12px;color:#877d7d}.sk-chart{height:175px;background:linear-gradient(90deg,#f6f3f3,#ebe6e6,#f6f3f3);background-size:200% 100%;border-radius:6px;animation:sk-shimmer 1.4s ease-in-out infinite}@keyframes sk-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media (max-width: 768px){.home-stats{flex-direction:column}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: BaseChartDirective, selector: "canvas[baseChart]", inputs: ["type", "legend", "data", "options", "plugins", "labels", "datasets"], outputs: ["chartClick", "chartHover"], exportAs: ["base-chart"] }] });
45613
+ }
45614
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FHHomeStatsComponent, decorators: [{
45615
+ type: Component,
45616
+ args: [{ selector: "FHHomeStats", standalone: true, imports: [CommonModule, BaseChartDirective], template: `
45617
+ <div class="home-stats" *ngIf="!error">
45618
+
45619
+ <div class="stats-panel">
45620
+ <div class="panel-head">
45621
+ <div>
45622
+ <div class="panel-title">
45623
+ <i class="material-symbols-outlined">apps</i>
45624
+ {{ appsTitle }}
45625
+ </div>
45626
+ <div class="panel-sub">{{ subtitlePrefix }} · {{ periodoLabel }}</div>
45627
+ </div>
45628
+ <span class="tag tag-accent" *ngIf="appsTag">{{ appsTag }}</span>
45629
+ </div>
45630
+ <div class="panel-body">
45631
+ <div class="chart-wrap" *ngIf="!loading && hasApps">
45632
+ <canvas baseChart type="doughnut" [labels]="pieLabels" [datasets]="pieDatasets" [options]="pieOptions"></canvas>
45633
+ </div>
45634
+ <div class="empty" *ngIf="!loading && !hasApps">
45635
+ <i class="material-symbols-outlined empty-icon">apps</i>
45636
+ <div class="empty-title">{{ appsEmptyTitle }}</div>
45637
+ <div class="empty-sub">{{ appsEmptySub }}</div>
45638
+ </div>
45639
+ <div class="sk-chart" *ngIf="loading"></div>
45640
+ </div>
45641
+ </div>
45642
+
45643
+ <div class="stats-panel">
45644
+ <div class="panel-head">
45645
+ <div>
45646
+ <div class="panel-title">
45647
+ <i class="material-symbols-outlined">timeline</i>
45648
+ {{ stepsTitle }}
45649
+ </div>
45650
+ <div class="panel-sub">{{ subtitlePrefix }} · {{ periodoLabel }}</div>
45651
+ </div>
45652
+ <span class="tag tag-neutral" *ngIf="stepsTag">{{ stepsTag }}</span>
45653
+ </div>
45654
+ <div class="panel-body">
45655
+ <div class="chart-wrap" *ngIf="!loading && hasSteps">
45656
+ <canvas baseChart type="line" [labels]="lineLabels" [datasets]="lineDatasets" [options]="lineOptions"></canvas>
45657
+ </div>
45658
+ <div class="empty" *ngIf="!loading && !hasSteps">
45659
+ <i class="material-symbols-outlined empty-icon">route</i>
45660
+ <div class="empty-title">{{ stepsEmptyTitle }}</div>
45661
+ <div class="empty-sub">{{ stepsEmptySub }}</div>
45662
+ </div>
45663
+ <div class="sk-chart" *ngIf="loading"></div>
45664
+ </div>
45665
+ </div>
45666
+
45667
+ </div>
45668
+ `, styles: [".home-stats{margin-bottom:4px;display:flex;flex-direction:row;gap:14px}.stats-panel{flex:1 1 50%;min-width:0;background:#fff;border:1px solid rgba(22,18,18,.1);border-radius:10px;padding:16px 18px}.panel-head{display:flex;align-items:center;justify-content:space-between;padding-bottom:10px;border-bottom:1px solid rgba(22,18,18,.06);margin-bottom:10px}.panel-title{font-family:Plus Jakarta Sans,sans-serif;font-size:13px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#161212;display:flex;align-items:center;gap:8px}.panel-title i{font-size:18px;color:var(--fh-home-accent, #63b345)}.panel-sub{font-family:Inter,sans-serif;font-size:11px;color:#8c8585;margin-top:3px}.tag{display:inline-block;padding:3px 10px;border-radius:999px;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.03em;white-space:nowrap}.tag-accent{background:var(--fh-home-accent-soft, rgba(99, 179, 69, .12));color:var(--fh-home-accent-dark, #3f7029)}.tag-neutral{background:#1612120f;color:#443d3d}.panel-body{padding-top:4px}.chart-wrap{position:relative;height:175px;width:100%}.empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;height:175px;text-align:center;color:#a39b9b}.empty-icon{font-size:30px;color:var(--fh-home-accent-faint, rgba(99, 179, 69, .45));margin-bottom:4px}.empty-title{font-family:Plus Jakarta Sans,sans-serif;font-size:13px;font-weight:700;color:#5c5454}.empty-sub{font-family:Inter,sans-serif;font-size:12px;color:#877d7d}.sk-chart{height:175px;background:linear-gradient(90deg,#f6f3f3,#ebe6e6,#f6f3f3);background-size:200% 100%;border-radius:6px;animation:sk-shimmer 1.4s ease-in-out infinite}@keyframes sk-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media (max-width: 768px){.home-stats{flex-direction:column}}\n"] }]
45669
+ }], ctorParameters: () => [{ type: AppService }, { type: QueryService }], propDecorators: { accent: [{
45670
+ type: Input
45671
+ }], accentDark: [{
45672
+ type: Input
45673
+ }], pieColors: [{
45674
+ type: Input
45675
+ }], _a: [{
45676
+ type: HostBinding,
45677
+ args: ["style.--fh-home-accent"]
45678
+ }], _ad: [{
45679
+ type: HostBinding,
45680
+ args: ["style.--fh-home-accent-dark"]
45681
+ }], appsTitle: [{
45682
+ type: Input
45683
+ }], stepsTitle: [{
45684
+ type: Input
45685
+ }], appsTag: [{
45686
+ type: Input
45687
+ }], stepsTag: [{
45688
+ type: Input
45689
+ }], appsEmptyTitle: [{
45690
+ type: Input
45691
+ }], appsEmptySub: [{
45692
+ type: Input
45693
+ }], stepsEmptyTitle: [{
45694
+ type: Input
45695
+ }], stepsEmptySub: [{
45696
+ type: Input
45697
+ }], days: [{
45698
+ type: Input
45699
+ }], sqlApps: [{
45700
+ type: Input
45701
+ }], sqlSteps: [{
45702
+ type: Input
45703
+ }], appLabelField: [{
45704
+ type: Input
45705
+ }], appValueField: [{
45706
+ type: Input
45707
+ }], stepDayField: [{
45708
+ type: Input
45709
+ }], stepValueField: [{
45710
+ type: Input
45711
+ }], stepSeriesLabel: [{
45712
+ type: Input
45713
+ }] } });
45714
+
45715
+ /**
45716
+ * Pannello "Documenti" della homepage: esplora la cartella documentale condivisa
45717
+ * (navigazione cartelle + download file) tramite FileService.
45718
+ *
45719
+ * Endpoint e percorsi sono configurabili via @Input per riuso cross-cliente.
45720
+ * L'endpoint API NON è obbligatorio: se non passato viene ricavato da
45721
+ * AppService.API_ENDPOINT (lo stesso usato da QueryService/FileService).
45722
+ */
45723
+ class FHHomeDocsComponent {
45724
+ _dataService;
45725
+ appService;
45726
+ // ---- Tema ----
45727
+ accent = "#63b345";
45728
+ accentDark = "#3f7029";
45729
+ get _a() { return this.accent; }
45730
+ get _ad() { return this.accentDark; }
45731
+ // ---- Testi ----
45732
+ title = "Documenti";
45733
+ tagLabel = "Archivio";
45734
+ emptyTitle = "Nessun documento";
45735
+ emptySub = "I documenti condivisi compariranno qui.";
45736
+ // ---- Configurazione storage ----
45737
+ /**
45738
+ * Base URL delle API per costruire l'URL di download (il suffisso "/api" viene rimosso).
45739
+ * Opzionale: se vuoto si usa AppService.API_ENDPOINT.
45740
+ */
45741
+ apiEndpoint = "";
45742
+ /** Comando FileService per elencare i documenti. */
45743
+ command = "list_documents";
45744
+ /** Cartella radice da cui partire. */
45745
+ rootPath = "/";
45746
+ /** Segmento di percorso aggiunto all'endpoint per il download. */
45747
+ downloadSegment = "documenti/";
45748
+ /** Percorso base delle icone tipo file. */
45749
+ iconBasePath = "assets/icons/square-o/";
45750
+ curr_path = "/";
45751
+ last_curr_path = "/";
45752
+ b_loading = false;
45753
+ errorMsg = "";
45754
+ dirs = [];
45755
+ files = [];
45756
+ constructor(_dataService, appService) {
45757
+ this._dataService = _dataService;
45758
+ this.appService = appService;
45759
+ }
45760
+ /** Endpoint effettivo: input esplicito oppure default da AppService. */
45761
+ get effectiveEndpoint() {
45762
+ return this.apiEndpoint || this.appService.API_ENDPOINT || "";
45763
+ }
45764
+ ngOnInit() {
45765
+ this.curr_path = this.rootPath;
45766
+ this.last_curr_path = this.rootPath;
45767
+ this.ref_dirs(this.curr_path);
45768
+ }
45769
+ open_dir(item) {
45770
+ this.ref_dirs(item.full_path.split("\\\\").join("\\"));
45771
+ }
45772
+ download_file(item) {
45773
+ window.open(this.effectiveEndpoint.split("/api").join("") +
45774
+ this.downloadSegment +
45775
+ item.full_path.split("\\\\").join("\\"));
45776
+ }
45777
+ ref_dirs(s) {
45778
+ this.last_curr_path = this.curr_path;
45779
+ const p = new FSInput();
45780
+ p.p1 = s;
45781
+ p.command = this.command;
45782
+ this.curr_path = s;
45783
+ this.b_loading = true;
45784
+ this._dataService.doQuery(p).subscribe((data) => {
45785
+ this.b_loading = false;
45786
+ if (data != null && data.result_msg == "OK") {
45787
+ this.dirs = [];
45788
+ this.files = [];
45789
+ if (this.curr_path != "/") {
45790
+ const sx = this.curr_path.split("\\");
45791
+ let ss = "\\";
45792
+ if (sx.length > 2) {
45793
+ ss = "";
45794
+ for (let i = 0; i < sx.length - 1; i++) {
45795
+ ss = ss + "\\" + sx[i];
45796
+ }
45797
+ }
45798
+ if (s != "\\" && s != "" && s != "/")
45799
+ this.dirs.push({ fn: "..", full_path: ss, icon: "arrowup.png" });
45800
+ }
45801
+ for (let i = 0; i < data.result_data.length; i++) {
45802
+ if (data.result_data[i].t == "D")
45803
+ data.result_data[i].icon = "folder.svg";
45804
+ else {
45805
+ let iconf = "default";
45806
+ const arrf = data.result_data[i].fn.split(".");
45807
+ if (KNOWN_EXT.indexOf(arrf[arrf.length - 1].toLocaleUpperCase()) != -1)
45808
+ iconf = arrf[arrf.length - 1].toLocaleLowerCase();
45809
+ data.result_data[i].icon = iconf + ".svg";
45810
+ }
45811
+ if (data.result_data[i].t == "D")
45812
+ this.dirs.push(data.result_data[i]);
45813
+ else
45814
+ this.files.push(data.result_data[i]);
45815
+ }
45816
+ }
45817
+ });
45818
+ }
45819
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FHHomeDocsComponent, deps: [{ token: FileService }, { token: AppService }], target: i0.ɵɵFactoryTarget.Component });
45820
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FHHomeDocsComponent, isStandalone: true, selector: "FHHomeDocs", inputs: { accent: "accent", accentDark: "accentDark", title: "title", tagLabel: "tagLabel", emptyTitle: "emptyTitle", emptySub: "emptySub", apiEndpoint: "apiEndpoint", command: "command", rootPath: "rootPath", downloadSegment: "downloadSegment", iconBasePath: "iconBasePath" }, host: { properties: { "style.--fh-home-accent": "this._a", "style.--fh-home-accent-dark": "this._ad" } }, ngImport: i0, template: `
45821
+ <div class="tool-panel">
45822
+ <div class="panel-head">
45823
+ <div>
45824
+ <div class="panel-title">
45825
+ <i class="material-symbols-outlined">folder_open</i>
45826
+ {{ title }}
45827
+ </div>
45828
+ <div class="panel-sub">{{ curr_path }}</div>
45829
+ </div>
45830
+ <span class="tag tag-neutral" *ngIf="tagLabel">{{ tagLabel }}</span>
45831
+ </div>
45832
+ <div class="panel-body">
45833
+ <div class="tool-list">
45834
+ <button type="button" class="tool-row" *ngFor="let item of dirs" (click)="open_dir(item)">
45835
+ <img class="tool-row-icon" [src]="iconBasePath + item.icon" alt="" />
45836
+ <span class="tool-row-label">{{ item.fn }}</span>
45837
+ <i class="material-symbols-outlined tool-row-arrow">arrow_forward</i>
45838
+ </button>
45839
+
45840
+ <button type="button" class="tool-row" *ngFor="let item of files" (click)="download_file(item)">
45841
+ <img class="tool-row-icon" [src]="iconBasePath + item.icon" alt="" />
45842
+ <span class="tool-row-label">{{ item.fn }}</span>
45843
+ <span class="tool-row-meta">{{ item.size }}</span>
45844
+ <i class="material-symbols-outlined tool-row-arrow">download</i>
45845
+ </button>
45846
+
45847
+ <div class="empty" *ngIf="!b_loading && dirs.length === 0 && files.length === 0">
45848
+ <i class="material-symbols-outlined empty-icon">folder_open</i>
45849
+ <div class="empty-title">{{ emptyTitle }}</div>
45850
+ <div class="empty-sub">{{ emptySub }}</div>
45851
+ </div>
45852
+ </div>
45853
+ </div>
45854
+ </div>
45855
+
45856
+ <p class="tool-error" *ngIf="errorMsg != ''">{{ errorMsg }}</p>
45857
+ `, isInline: true, styles: [":host{display:block;height:100%}.tool-panel{height:100%;box-sizing:border-box;display:flex;flex-direction:column;background:#fff;border:1px solid rgba(22,18,18,.1);border-radius:10px;padding:16px 18px}.panel-head{display:flex;align-items:center;justify-content:space-between;padding-bottom:10px;border-bottom:1px solid rgba(22,18,18,.06);margin-bottom:10px}.panel-title{font-family:Plus Jakarta Sans,sans-serif;font-size:13px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#161212;display:flex;align-items:center;gap:8px}.panel-title i{font-size:18px;color:var(--fh-home-accent, #63b345)}.panel-sub{font-family:Inter,sans-serif;font-size:11px;color:#8c8585;margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:320px}.tag{display:inline-block;padding:3px 10px;border-radius:999px;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.03em;white-space:nowrap}.tag-neutral{background:#1612120f;color:#443d3d}.panel-body{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}.tool-list{flex:1 1 auto;min-height:0;height:175px;overflow-y:auto;overflow-x:hidden}.tool-row{width:100%;display:flex;align-items:center;gap:10px;padding:6px 2px 6px 0;border:none;border-bottom:1px solid rgba(22,18,18,.07);background:transparent;cursor:pointer;text-align:left;font-family:Inter,sans-serif;font-size:13px;font-weight:500;color:#443d3d;transition:color .15s ease,padding-left .15s ease}.tool-row:last-child{border-bottom:none}.tool-row-icon{flex:0 0 auto;width:22px;height:22px;object-fit:contain}.tool-row-label{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tool-row-meta{flex:0 0 auto;font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:#a39b9b}.tool-row-arrow{flex:0 0 auto;font-size:16px;color:transparent;transition:color .15s ease,transform .15s ease}.tool-row:hover{color:var(--fh-home-accent-dark, #3f7029);padding-left:6px}.tool-row:hover .tool-row-arrow{color:var(--fh-home-accent-dark, #3f7029);transform:translate(2px)}.empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;height:150px;text-align:center;color:#a39b9b}.empty-icon{font-size:30px;color:var(--fh-home-accent-faint, rgba(99, 179, 69, .45));margin-bottom:4px}.empty-title{font-family:Plus Jakarta Sans,sans-serif;font-size:13px;font-weight:700;color:#5c5454}.empty-sub{font-family:Inter,sans-serif;font-size:12px;color:#877d7d}.tool-error{color:#c00;font-size:9px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
45858
+ }
45859
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FHHomeDocsComponent, decorators: [{
45860
+ type: Component,
45861
+ args: [{ selector: "FHHomeDocs", standalone: true, imports: [CommonModule], template: `
45862
+ <div class="tool-panel">
45863
+ <div class="panel-head">
45864
+ <div>
45865
+ <div class="panel-title">
45866
+ <i class="material-symbols-outlined">folder_open</i>
45867
+ {{ title }}
45868
+ </div>
45869
+ <div class="panel-sub">{{ curr_path }}</div>
45870
+ </div>
45871
+ <span class="tag tag-neutral" *ngIf="tagLabel">{{ tagLabel }}</span>
45872
+ </div>
45873
+ <div class="panel-body">
45874
+ <div class="tool-list">
45875
+ <button type="button" class="tool-row" *ngFor="let item of dirs" (click)="open_dir(item)">
45876
+ <img class="tool-row-icon" [src]="iconBasePath + item.icon" alt="" />
45877
+ <span class="tool-row-label">{{ item.fn }}</span>
45878
+ <i class="material-symbols-outlined tool-row-arrow">arrow_forward</i>
45879
+ </button>
45880
+
45881
+ <button type="button" class="tool-row" *ngFor="let item of files" (click)="download_file(item)">
45882
+ <img class="tool-row-icon" [src]="iconBasePath + item.icon" alt="" />
45883
+ <span class="tool-row-label">{{ item.fn }}</span>
45884
+ <span class="tool-row-meta">{{ item.size }}</span>
45885
+ <i class="material-symbols-outlined tool-row-arrow">download</i>
45886
+ </button>
45887
+
45888
+ <div class="empty" *ngIf="!b_loading && dirs.length === 0 && files.length === 0">
45889
+ <i class="material-symbols-outlined empty-icon">folder_open</i>
45890
+ <div class="empty-title">{{ emptyTitle }}</div>
45891
+ <div class="empty-sub">{{ emptySub }}</div>
45892
+ </div>
45893
+ </div>
45894
+ </div>
45895
+ </div>
45896
+
45897
+ <p class="tool-error" *ngIf="errorMsg != ''">{{ errorMsg }}</p>
45898
+ `, styles: [":host{display:block;height:100%}.tool-panel{height:100%;box-sizing:border-box;display:flex;flex-direction:column;background:#fff;border:1px solid rgba(22,18,18,.1);border-radius:10px;padding:16px 18px}.panel-head{display:flex;align-items:center;justify-content:space-between;padding-bottom:10px;border-bottom:1px solid rgba(22,18,18,.06);margin-bottom:10px}.panel-title{font-family:Plus Jakarta Sans,sans-serif;font-size:13px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#161212;display:flex;align-items:center;gap:8px}.panel-title i{font-size:18px;color:var(--fh-home-accent, #63b345)}.panel-sub{font-family:Inter,sans-serif;font-size:11px;color:#8c8585;margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:320px}.tag{display:inline-block;padding:3px 10px;border-radius:999px;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.03em;white-space:nowrap}.tag-neutral{background:#1612120f;color:#443d3d}.panel-body{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}.tool-list{flex:1 1 auto;min-height:0;height:175px;overflow-y:auto;overflow-x:hidden}.tool-row{width:100%;display:flex;align-items:center;gap:10px;padding:6px 2px 6px 0;border:none;border-bottom:1px solid rgba(22,18,18,.07);background:transparent;cursor:pointer;text-align:left;font-family:Inter,sans-serif;font-size:13px;font-weight:500;color:#443d3d;transition:color .15s ease,padding-left .15s ease}.tool-row:last-child{border-bottom:none}.tool-row-icon{flex:0 0 auto;width:22px;height:22px;object-fit:contain}.tool-row-label{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tool-row-meta{flex:0 0 auto;font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:#a39b9b}.tool-row-arrow{flex:0 0 auto;font-size:16px;color:transparent;transition:color .15s ease,transform .15s ease}.tool-row:hover{color:var(--fh-home-accent-dark, #3f7029);padding-left:6px}.tool-row:hover .tool-row-arrow{color:var(--fh-home-accent-dark, #3f7029);transform:translate(2px)}.empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;height:150px;text-align:center;color:#a39b9b}.empty-icon{font-size:30px;color:var(--fh-home-accent-faint, rgba(99, 179, 69, .45));margin-bottom:4px}.empty-title{font-family:Plus Jakarta Sans,sans-serif;font-size:13px;font-weight:700;color:#5c5454}.empty-sub{font-family:Inter,sans-serif;font-size:12px;color:#877d7d}.tool-error{color:#c00;font-size:9px}\n"] }]
45899
+ }], ctorParameters: () => [{ type: FileService }, { type: AppService }], propDecorators: { accent: [{
45900
+ type: Input
45901
+ }], accentDark: [{
45902
+ type: Input
45903
+ }], _a: [{
45904
+ type: HostBinding,
45905
+ args: ["style.--fh-home-accent"]
45906
+ }], _ad: [{
45907
+ type: HostBinding,
45908
+ args: ["style.--fh-home-accent-dark"]
45909
+ }], title: [{
45910
+ type: Input
45911
+ }], tagLabel: [{
45912
+ type: Input
45913
+ }], emptyTitle: [{
45914
+ type: Input
45915
+ }], emptySub: [{
45916
+ type: Input
45917
+ }], apiEndpoint: [{
45918
+ type: Input
45919
+ }], command: [{
45920
+ type: Input
45921
+ }], rootPath: [{
45922
+ type: Input
45923
+ }], downloadSegment: [{
45924
+ type: Input
45925
+ }], iconBasePath: [{
45926
+ type: Input
45927
+ }] } });
45928
+ /** Estensioni con icona dedicata (set "square-o"). */
45929
+ const KNOWN_EXT = "3G2|3GA|3GP|7Z|AA|AAC|AC|ACCDB|ACCDT|ADN|AI|AIF|AIFC|AIFF|AIT|AMR|ANI|APK|APP|APPLESCRIPT|ASAX|ASC|ASCX|ASF|ASH|ASHX|ASMX|ASP|ASPX|ASX|AU|AUP|AVI|AXD|AZE|BAK|BASH|BAT|BIN|BLANK|BMP|BOWERRC|BPG|BROWSER|BZ2|C|CAB|CAD|CAF|CAL|CD|CER|CFG|CFM|CFML|CGI|CLASS|CMD|CODEKIT|COFFEE|COFFEELINTIGNORE|COM|COMPILE|CONF|CONFIG|CPP|CPTX|CR2|CRDOWNLOAD|CRT|CRYPT|CS|CSH|CSON|CSPROJ|CSS|CSV|CUE|DAT|DB|DBF|DEB|DGN|DIST|DIZ|DLL|DMG|DNG|DOC|DOCB|DOCM|DOCX|DOT|DOTM|DOTX|DOWNLOAD|DPJ|DS_STORE|DTD|DWG|DXF|EDITORCONFIG|EL|ENC|EOT|EPS|EPUB|ESLINTIGNORE|EXE|F4V|FAX|FB2|FLA|FLAC|FLV|FOLDER|GADGET|GDP|GEM|GIF|GITATTRIBUTES|GITIGNORE|GO|GPG|GZ|H|HANDLEBARS|HBS|HEIC|HS|HSL|HTM|HTML|IBOOKS|ICNS|ICO|ICS|IDX|IFF|IFO|IMAGE|IMG|IN|INDD|INF|INI|ISO|J2|JAR|JAVA|JPE|JPEG|JPG|JS|JSON|JSP|JSX|KEY|KF8|KMK|KSH|KUP|LESS|LEX|LICX|LISP|LIT|LNK|LOCK|LOG|LUA|M|M2V|M3U|M3U8|M4|M4A|M4R|M4V|MAP|MASTER|MC|MD|MDB|MDF|ME|MI|MID|MIDI|MK|MKV|MM|MO|MOBI|MOD|MOV|MP2|MP3|MP4|MPA|MPD|MPE|MPEG|MPG|MPGA|MPP|MPT|MSI|MSU|NEF|NES|NFO|NIX|NPMIGNORE|ODB|ODS|ODT|OGG|OGV|OST|OTF|OTT|OVA|OVF|P12|P7B|PAGES|PART|PCD|PDB|PDF|PEM|PFX|PGP|PH|PHAR|PHP|PKG|PL|PLIST|PM|PNG|PO|POM|POT|POTX|PPS|PPSX|PPT|PPTM|PPTX|PROP|PS|PS1|PSD|PSP|PST|PUB|PY|PYC|QT|RA|RAM|RAR|RAW|RB|RDF|RESX|RETRY|RM|ROM|RPM|RSA|RSS|RTF|RU|RUB|SASS|SCSS|SDF|SED|SH|SITEMAP|SKIN|SLDM|SLDX|SLN|SOL|SQL|SQLITE|STEP|STL|SVG|SWD|SWF|SWIFT|SYS|TAR|TCSH|TEX|TFIGNORE|TGA|TGZ|TIF|TIFF|TMP|TORRENT|TS|TSV|TTF|TWIG|TXT|UDF|VB|VBPROJ|VBS|VCD|VCS|VDI|VDX|VMDK|VOB|VSCODEIGNORE|VSD|VSS|VST|VSX|VTX|WAR|WAV|WBK|WEBINFO|WEBM|WEBP|WMA|WMF|WMV|WOFF|WOFF2|WPS|WSF|XAML|XCF|XLM|XLS|XLSM|XLSX|XLT|XLTM|XLTX|XML|XPI|XPS|XRB|XSD|XSL|XSPF|XZ|YAML|YML|Z|ZIP|ZSH";
45930
+
44911
45931
  /*
44912
45932
  * Public API Surface of fluxhublib
44913
45933
  */
@@ -44916,5 +45936,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
44916
45936
  * Generated bundle index. Do not edit.
44917
45937
  */
44918
45938
 
44919
- export { AppMakerService, AppService, ApprovaGridComponent, AuthHttpRequestInterceptor, AuthenticationService, CheckboxEditorComponent, ComboBoxEditor, CurrencyComponent, FHAutoCompleteComponent, FHCheckBox, FHColorPickerComponent, FHComboboxComponent, FHComboboxComponentFilter, FHConfirmValues, FHCurrencyFormatterDirective, FHCurrencyPipe, FHDatePickerComponent, FHDateRangePickerComponent, FHFieldPickListComponent, FHFormBuilderComponent, FHFormExecuterComponent, FHFormToolBarComponent, FHGridComponent, FHGridComponentN, FHGridJSONComponent, FHGridToolBarComponent, FHGuard, FHHelpButtonComponent, FHImagePreview, FHListComponent, FHLogPanelComponent, FHMultiComboboxComponent, FHNotesPanelComponent, FHNumericFieldComponent, FHPickFieldComponent, FHRichTextComponent, FHRoleManager, FHTableManager, FHTextAreaComponent, FHTextInputComponent, FHTimePickerComponent, FHUploadComponent, FHUploadPanelComponent, FHUploadPanelS3Component, FHUploadS3Component, FHUserFieldComponent, FHUsersPickerComponent, FSInput, FSResult, FileService, FluxhublibModule, GridService, LocalDBService, NumericEditorComponent, OdbcService, OfficeAutomatorService, OfficeOperation, OfficeResult, QGParam, QGResult, QParam, QResult, QueryService, ReplaceLineBreaks, SafePipe, TextAreaEditor, UtilityService, WkfService, dati_aggiuntivi, dati_aggiuntivi_v2, fh_win_app_logs, fh_win_ask_big_text, fh_win_ask_buttons, fh_win_ask_number, fh_win_ask_richtext, fh_win_ask_text, fh_win_auto_complete, fh_win_combo, fh_win_confirm, fh_win_error, fh_win_grid_selection, fh_win_list, fh_win_mappa, fh_win_output, fh_win_picklist, fh_win_select_by_grid, fh_win_show_email, fh_win_show_email_s3, fh_win_show_image, fh_win_show_log, fh_win_show_log_dett, fh_win_time_slider, fh_win_upload, fh_win_uploads, fh_win_user_info, fh_win_user_picker, fh_win_wait, win_insert_commento, win_salva_annulla, wkf_header_bar, wkf_header_bar_v2, wkfapp, wkfapp_v2 };
45939
+ export { AppMakerService, AppService, ApprovaGridComponent, AuthHttpRequestInterceptor, AuthenticationService, CheckboxEditorComponent, ComboBoxEditor, CurrencyComponent, FHAutoCompleteComponent, FHCheckBox, FHColorPickerComponent, FHComboboxComponent, FHComboboxComponentFilter, FHConfirmValues, FHCurrencyFormatterDirective, FHCurrencyPipe, FHDatePickerComponent, FHDateRangePickerComponent, FHFieldPickListComponent, FHFormBuilderComponent, FHFormExecuterComponent, FHFormToolBarComponent, FHGridComponent, FHGridComponentN, FHGridJSONComponent, FHGridToolBarComponent, FHGuard, FHHelpButtonComponent, FHHomeDocsComponent, FHHomeLauncherComponent, FHHomeStatsComponent, FHHomeTodoComponent, FHImagePreview, FHListComponent, FHLogPanelComponent, FHMultiComboboxComponent, FHNotesPanelComponent, FHNumericFieldComponent, FHPickFieldComponent, FHRichTextComponent, FHRoleManager, FHTableManager, FHTextAreaComponent, FHTextInputComponent, FHTimePickerComponent, FHUploadComponent, FHUploadPanelComponent, FHUploadPanelS3Component, FHUploadS3Component, FHUserFieldComponent, FHUsersPickerComponent, FSInput, FSResult, FileService, FluxhublibModule, GridService, LocalDBService, NumericEditorComponent, OdbcService, OfficeAutomatorService, OfficeOperation, OfficeResult, QGParam, QGResult, QParam, QResult, QueryService, ReplaceLineBreaks, SafePipe, TextAreaEditor, UtilityService, WkfService, dati_aggiuntivi, dati_aggiuntivi_v2, fh_win_app_logs, fh_win_ask_big_text, fh_win_ask_buttons, fh_win_ask_number, fh_win_ask_richtext, fh_win_ask_text, fh_win_auto_complete, fh_win_combo, fh_win_confirm, fh_win_error, fh_win_grid_selection, fh_win_list, fh_win_mappa, fh_win_output, fh_win_picklist, fh_win_select_by_grid, fh_win_show_email, fh_win_show_email_s3, fh_win_show_image, fh_win_show_log, fh_win_show_log_dett, fh_win_time_slider, fh_win_upload, fh_win_uploads, fh_win_user_info, fh_win_user_picker, fh_win_wait, win_insert_commento, win_salva_annulla, wkf_header_bar, wkf_header_bar_v2, wkfapp, wkfapp_v2 };
44920
45940
  //# sourceMappingURL=fluxhub-fluxhub-lib.mjs.map