@fluxhub/fluxhub-lib 19.0.178 → 19.0.180

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, forwardRef, EventEmitter, Input, Output, ViewChild, Component, Inject, Optional, Pipe, HostListener, Directive, ChangeDetectionStrategy, ViewEncapsulation, ViewContainerRef } from '@angular/core';
2
+ import { Injectable, forwardRef, EventEmitter, Input, Output, ViewChild, Component, Inject, Optional, Pipe, HostListener, Directive, ChangeDetectionStrategy, ViewEncapsulation, ViewContainerRef, HostBinding } from '@angular/core';
3
3
  import * as i1$1 from '@angular/common/http';
4
4
  import { HttpHeaders, HttpEventType, HttpErrorResponse } from '@angular/common/http';
5
5
  import { map, catchError, flatMap, debounceTime, switchMap, filter, take, tap } from 'rxjs/operators';
@@ -10,7 +10,7 @@ import { AES } from 'crypto-ts';
10
10
  import * as i1 from '@angular/platform-browser';
11
11
  import * as i3 from '@ngx-translate/core';
12
12
  import { TranslateModule } from '@ngx-translate/core';
13
- import { Observable, Subject, forkJoin, throwError, BehaviorSubject } from 'rxjs';
13
+ import { Observable, Subject, forkJoin, throwError, BehaviorSubject, of } from 'rxjs';
14
14
  import * as i5$1 from '@angular/forms';
15
15
  import { NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
16
16
  import * as i5 from '@angular/common';
@@ -81,6 +81,8 @@ import { MatRadioModule } from '@angular/material/radio';
81
81
  import NavigatedViewer from 'bpmn-js/lib/NavigatedViewer';
82
82
  import * as i6$4 from '@angular/material/badge';
83
83
  import { MatBadgeModule } from '@angular/material/badge';
84
+ import { BaseChartDirective } from 'ng2-charts';
85
+ import { Chart, registerables } from 'chart.js';
84
86
 
85
87
  class QParam {
86
88
  sql = '';
@@ -29258,7 +29260,6 @@ class win_conferma_v2 {
29258
29260
  icon = '';
29259
29261
  color_font = '';
29260
29262
  color = '';
29261
- background_color = '';
29262
29263
  nota_commento = '';
29263
29264
  title = 'COMMENTI';
29264
29265
  comm_notrequired = 0;
@@ -29287,8 +29288,6 @@ class win_conferma_v2 {
29287
29288
  this.color_font = data.color_font;
29288
29289
  if (data.color != null)
29289
29290
  this.color = data.color;
29290
- if (data.background_color != null)
29291
- this.background_color = data.background_color;
29292
29291
  }
29293
29292
  if (this.comm_notrequired == 2)
29294
29293
  this.nota_commento = '(COMMENTO NON OBBLIGATORIO)';
@@ -29351,7 +29350,7 @@ class win_conferma_v2 {
29351
29350
  <div
29352
29351
  class="custom-title-box"
29353
29352
  [style.border-color]="color"
29354
- [style.color]="background_color || '#1e2755'"
29353
+ [style.color]="color_font || '#1e2755'"
29355
29354
  >
29356
29355
  <i
29357
29356
  *ngIf="icon != null && icon != ''"
@@ -29413,7 +29412,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
29413
29412
  <div
29414
29413
  class="custom-title-box"
29415
29414
  [style.border-color]="color"
29416
- [style.color]="background_color || '#1e2755'"
29415
+ [style.color]="color_font || '#1e2755'"
29417
29416
  >
29418
29417
  <i
29419
29418
  *ngIf="icon != null && icon != ''"
@@ -31045,7 +31044,7 @@ class win_select_level_v2 {
31045
31044
  this.data = data;
31046
31045
  this.trans = data.map((v) => {
31047
31046
  if (!v.color)
31048
- v.color = '#1e2755';
31047
+ v.color = '#FFF';
31049
31048
  if (!v.color_font)
31050
31049
  v.color_font = '#1e2755';
31051
31050
  return v;
@@ -31095,7 +31094,7 @@ class win_select_level_v2 {
31095
31094
  [style.border-color]="app.background_color || '#ddd'"
31096
31095
  [style.border-left-color]="app.color"
31097
31096
  [style.background-color]="'#fafafa'"
31098
- [style.color]="app.color"
31097
+ [style.color]="app.color_font || '#1e2755'"
31099
31098
  (click)="sel(app)">
31100
31099
  <i *ngIf="app.icon && app.icon!=''" [ngClass]="'fa ' + app.icon" aria-hidden="true"></i>
31101
31100
  <span>{{ app.description | translate }}</span>
@@ -31127,7 +31126,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
31127
31126
  [style.border-color]="app.background_color || '#ddd'"
31128
31127
  [style.border-left-color]="app.color"
31129
31128
  [style.background-color]="'#fafafa'"
31130
- [style.color]="app.color"
31129
+ [style.color]="app.color_font || '#1e2755'"
31131
31130
  (click)="sel(app)">
31132
31131
  <i *ngIf="app.icon && app.icon!=''" [ngClass]="'fa ' + app.icon" aria-hidden="true"></i>
31133
31132
  <span>{{ app.description | translate }}</span>
@@ -31790,7 +31789,6 @@ class FHWorkflowForm {
31790
31789
  icon: o.icon,
31791
31790
  color_font: o.color_font,
31792
31791
  color: o.color,
31793
- background_color: o.background_color,
31794
31792
  commento_default: '',
31795
31793
  comm_notrequired: o.comments_opt,
31796
31794
  utenti: sp,
@@ -34437,6 +34435,1022 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
34437
34435
  }]
34438
34436
  }], ctorParameters: () => [{ type: i1$1.HttpClient }, { type: i3$1.ToastrService }, { type: AppService }, { type: UtilityService }] });
34439
34437
 
34438
+ /**
34439
+ * Elenco applicazioni per la homepage (launcher a colonne "masonry").
34440
+ *
34441
+ * Legge il menu applicativo dell'utente tramite le query standard FluxHub
34442
+ * (SELECT_USER_ACCESS + SELECT_ALL_APPS_USER / SELECT_APPS_USER, in query.ini).
34443
+ * I nomi delle query e l'aspetto sono configurabili via @Input per riuso cross-cliente.
34444
+ *
34445
+ * Uso: <FHHomeLauncher [appVersion]="costanti.VER"></FHHomeLauncher>
34446
+ */
34447
+ class FHHomeLauncherComponent {
34448
+ appService;
34449
+ _service;
34450
+ _dataService;
34451
+ _utility;
34452
+ router;
34453
+ // ---- Tema ----
34454
+ accent = "#63b345";
34455
+ accentDark = "#549a3b";
34456
+ ink = "#161212";
34457
+ get _a() { return this.accent; }
34458
+ get _ad() { return this.accentDark; }
34459
+ get _ink() { return this.ink; }
34460
+ // ---- Layout ----
34461
+ /** Mostra l'indice numerato (01, 02, ...) accanto al titolo categoria. */
34462
+ showIndex = true;
34463
+ /** Larghezza colonna masonry (px). */
34464
+ columnWidth = 270;
34465
+ /** Spazio tra colonne (px). */
34466
+ columnGap = 48;
34467
+ // ---- Query (query.ini) ----
34468
+ sqlUserAccess = "SELECT_USER_ACCESS";
34469
+ sqlAllApps = "SELECT_ALL_APPS_USER";
34470
+ sqlApps = "SELECT_APPS_USER";
34471
+ sqlAccessLog = "INSERT_ACCESS_LOG_2";
34472
+ /** Versione applicativa registrata nel log di accesso (di solito costanti.VER). */
34473
+ appVersion = "";
34474
+ /** Emesso quando l'utente apre un'app (dopo log e navigazione). */
34475
+ appOpen = new EventEmitter();
34476
+ categories = [];
34477
+ is_loaded = false;
34478
+ constructor(appService, _service, _dataService, _utility, router) {
34479
+ this.appService = appService;
34480
+ this._service = _service;
34481
+ this._dataService = _dataService;
34482
+ this._utility = _utility;
34483
+ this.router = router;
34484
+ }
34485
+ ngAfterViewInit() {
34486
+ setTimeout(() => this.bootstrap(), 0);
34487
+ }
34488
+ bootstrap() {
34489
+ if (!this._service.checkCredentials())
34490
+ return;
34491
+ if (!this.appService.user) {
34492
+ setTimeout(() => this.bootstrap(), 200);
34493
+ return;
34494
+ }
34495
+ this.load_user_then_menu();
34496
+ }
34497
+ // Carica l'accesso utente per assicurare che user_isadmin sia aggiornato
34498
+ // prima di scegliere la query del menu.
34499
+ load_user_then_menu() {
34500
+ const p = new QParam();
34501
+ p.sql = this.sqlUserAccess;
34502
+ p.values = [this.appService.user || ""];
34503
+ p.types = ["string"];
34504
+ this._dataService.doQuery(p).subscribe((data) => {
34505
+ if (data && data.result_msg === "OK" && data.result_data?.length > 0) {
34506
+ this.appService.user_isadmin = data.result_data[0].isadmin;
34507
+ this.appService.user_roles = data.result_data[0].roles;
34508
+ }
34509
+ this.build_menu();
34510
+ });
34511
+ }
34512
+ build_menu() {
34513
+ const username = this.appService.user || "";
34514
+ const isadmin = String(this.appService.user_isadmin ?? "") === "1";
34515
+ const p = new QParam();
34516
+ p.sql = isadmin ? this.sqlAllApps : this.sqlApps;
34517
+ p.values = [username];
34518
+ p.types = ["string"];
34519
+ this._dataService.doQuery(p).subscribe((data) => {
34520
+ if (!data || data.result_msg !== "OK") {
34521
+ this.is_loaded = true;
34522
+ return;
34523
+ }
34524
+ const rows = data.result_data || [];
34525
+ const grouped = [];
34526
+ let current = null;
34527
+ for (const r of rows) {
34528
+ const dir = r.dir || "";
34529
+ if (!current || current.title !== dir) {
34530
+ current = {
34531
+ name: dir.toLowerCase().split(" ").join("_"),
34532
+ title: dir,
34533
+ faIcon: r.icon || "",
34534
+ mdIcon: r.mdIcon || "",
34535
+ color: r.color || "",
34536
+ apps: [],
34537
+ };
34538
+ grouped.push(current);
34539
+ }
34540
+ if (r.invisible)
34541
+ continue;
34542
+ current.apps.push({ id: r.id, title: r.name, link: r.url });
34543
+ }
34544
+ this.categories = grouped.filter((c) => c.apps.length > 0);
34545
+ this.is_loaded = true;
34546
+ });
34547
+ }
34548
+ open_app(app) {
34549
+ if (!app || !app.link)
34550
+ return;
34551
+ const log = new QParam();
34552
+ log.sql = this.sqlAccessLog;
34553
+ log.values = [app.title, this.appVersion, this.appService.ip];
34554
+ log.types = ["string", "string", "string"];
34555
+ this._dataService.doQuery(log).subscribe(() => { });
34556
+ this._utility.set_home_title(app.title);
34557
+ if (app.link.indexOf("http") !== -1) {
34558
+ let url = app.link;
34559
+ if (url.indexOf("[crypto_email]") > -1) {
34560
+ url = url.split("[crypto_email]").join(this.appService.user_email || "");
34561
+ }
34562
+ window.open(url);
34563
+ this.appOpen.emit(app);
34564
+ return;
34565
+ }
34566
+ this.router.navigate([app.link]);
34567
+ this.appOpen.emit(app);
34568
+ }
34569
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FHHomeLauncherComponent, deps: [{ token: AppService }, { token: AuthenticationService }, { token: QueryService }, { token: UtilityService }, { token: i3$2.Router }], target: i0.ɵɵFactoryTarget.Component });
34570
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", 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: `
34571
+ <div class="launcher" *ngIf="is_loaded">
34572
+ <div class="launcher-cols" [style.column-width.px]="columnWidth" [style.column-gap.px]="columnGap">
34573
+ <section class="cat" *ngFor="let cat of categories; let i = index">
34574
+ <header class="cat-head">
34575
+ <span class="cat-index" *ngIf="showIndex">{{ (i + 1).toString().padStart(2, "0") }}</span>
34576
+ <h2 class="cat-title">{{ cat.title }}</h2>
34577
+ </header>
34578
+ <div class="cat-apps">
34579
+ <button
34580
+ *ngFor="let app of cat.apps"
34581
+ type="button"
34582
+ class="cat-app"
34583
+ (click)="open_app(app)"
34584
+ >
34585
+ <span class="cat-app-label">{{ app.title }}</span>
34586
+ <i class="material-symbols-outlined cat-app-arrow">arrow_forward</i>
34587
+ </button>
34588
+ </div>
34589
+ </section>
34590
+ </div>
34591
+ </div>
34592
+ `, 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: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
34593
+ }
34594
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FHHomeLauncherComponent, decorators: [{
34595
+ type: Component,
34596
+ args: [{ selector: "FHHomeLauncher", standalone: true, imports: [CommonModule], template: `
34597
+ <div class="launcher" *ngIf="is_loaded">
34598
+ <div class="launcher-cols" [style.column-width.px]="columnWidth" [style.column-gap.px]="columnGap">
34599
+ <section class="cat" *ngFor="let cat of categories; let i = index">
34600
+ <header class="cat-head">
34601
+ <span class="cat-index" *ngIf="showIndex">{{ (i + 1).toString().padStart(2, "0") }}</span>
34602
+ <h2 class="cat-title">{{ cat.title }}</h2>
34603
+ </header>
34604
+ <div class="cat-apps">
34605
+ <button
34606
+ *ngFor="let app of cat.apps"
34607
+ type="button"
34608
+ class="cat-app"
34609
+ (click)="open_app(app)"
34610
+ >
34611
+ <span class="cat-app-label">{{ app.title }}</span>
34612
+ <i class="material-symbols-outlined cat-app-arrow">arrow_forward</i>
34613
+ </button>
34614
+ </div>
34615
+ </section>
34616
+ </div>
34617
+ </div>
34618
+ `, 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"] }]
34619
+ }], ctorParameters: () => [{ type: AppService }, { type: AuthenticationService }, { type: QueryService }, { type: UtilityService }, { type: i3$2.Router }], propDecorators: { accent: [{
34620
+ type: Input
34621
+ }], accentDark: [{
34622
+ type: Input
34623
+ }], ink: [{
34624
+ type: Input
34625
+ }], _a: [{
34626
+ type: HostBinding,
34627
+ args: ["style.--fh-home-accent"]
34628
+ }], _ad: [{
34629
+ type: HostBinding,
34630
+ args: ["style.--fh-home-accent-dark"]
34631
+ }], _ink: [{
34632
+ type: HostBinding,
34633
+ args: ["style.--fh-home-ink"]
34634
+ }], showIndex: [{
34635
+ type: Input
34636
+ }], columnWidth: [{
34637
+ type: Input
34638
+ }], columnGap: [{
34639
+ type: Input
34640
+ }], sqlUserAccess: [{
34641
+ type: Input
34642
+ }], sqlAllApps: [{
34643
+ type: Input
34644
+ }], sqlApps: [{
34645
+ type: Input
34646
+ }], sqlAccessLog: [{
34647
+ type: Input
34648
+ }], appVersion: [{
34649
+ type: Input
34650
+ }], appOpen: [{
34651
+ type: Output
34652
+ }] } });
34653
+
34654
+ /**
34655
+ * Pannello "Task / To-Do" della homepage: elenco delle attività dei workflow
34656
+ * assegnate all'utente, con filtro per categoria.
34657
+ *
34658
+ * Le query (in query.ini) e i nomi dei campi restituiti sono configurabili via
34659
+ * @Input, così ogni cliente può usare le proprie senza modificare il componente.
34660
+ *
34661
+ * Campi attesi nella riga task (rinominabili): oggetto, applicazione, data_ultimo_step, link.
34662
+ * Campo categoria atteso: valore.
34663
+ */
34664
+ class FHHomeTodoComponent {
34665
+ _dataService;
34666
+ app_service;
34667
+ // ---- Tema ----
34668
+ accent = "#63b345";
34669
+ accentDark = "#3f7029";
34670
+ get _a() { return this.accent; }
34671
+ get _ad() { return this.accentDark; }
34672
+ // ---- Testi ----
34673
+ title = "To-Do";
34674
+ subtitle = "Le attività dei workflow assegnate a te";
34675
+ tagLabel = "Task";
34676
+ icon = "task_alt";
34677
+ allLabel = "Tutti";
34678
+ emptyTitle = "Nessuna attività in sospeso";
34679
+ emptySub = "Le attività che ti vengono assegnate compariranno qui.";
34680
+ dateFormat = "dd/MM/yyyy";
34681
+ // ---- Comportamento ----
34682
+ showCategoryFilter = true;
34683
+ // ---- Query (query.ini) ----
34684
+ sqlCategories = "SELECT_TODO_CAT";
34685
+ sqlByUser = "SELECT_TODO_BY_USER_D";
34686
+ sqlByUserCat = "SELECT_TODO_BY_USER_CAT_D";
34687
+ // ---- Mappatura campi della riga task ----
34688
+ fieldLabel = "oggetto";
34689
+ fieldMeta = "applicazione";
34690
+ fieldDate = "data_ultimo_step";
34691
+ fieldLink = "link";
34692
+ /** Campo che contiene il nome categoria nella query categorie. */
34693
+ fieldCategory = "valore";
34694
+ /** Emesso quando l'utente apre un task. */
34695
+ todoOpen = new EventEmitter();
34696
+ username;
34697
+ todos;
34698
+ errorMsg = "";
34699
+ categories = [];
34700
+ selectedCat = "";
34701
+ constructor(_dataService, app_service) {
34702
+ this._dataService = _dataService;
34703
+ this.app_service = app_service;
34704
+ }
34705
+ ngAfterViewInit() {
34706
+ this.load_todos();
34707
+ }
34708
+ load_todos() {
34709
+ if (!this.app_service.user) {
34710
+ setTimeout(() => this.load_todos(), 500);
34711
+ return;
34712
+ }
34713
+ this.username = this.app_service.user;
34714
+ if (this.showCategoryFilter) {
34715
+ const cp = new QParam();
34716
+ cp.sql = this.sqlCategories;
34717
+ cp.types = ["string"];
34718
+ cp.values = [this.username];
34719
+ this._dataService.doQuery(cp).subscribe((data) => {
34720
+ if (data?.result_msg === "OK") {
34721
+ this.categories = (data.result_data || []).map((r) => r[this.fieldCategory]);
34722
+ }
34723
+ });
34724
+ }
34725
+ this.fetch_todos("");
34726
+ }
34727
+ fetch_todos(cat) {
34728
+ const p = new QParam();
34729
+ if (cat) {
34730
+ p.sql = this.sqlByUserCat;
34731
+ p.types = ["string", "string"];
34732
+ p.values = [this.username, cat];
34733
+ }
34734
+ else {
34735
+ p.sql = this.sqlByUser;
34736
+ p.types = ["string"];
34737
+ p.values = [this.username];
34738
+ }
34739
+ this._dataService.doQuery(p).subscribe((data) => {
34740
+ if (data?.result_msg === "OK")
34741
+ this.todos = data.result_data;
34742
+ });
34743
+ }
34744
+ select_cat(cat) {
34745
+ this.selectedCat = cat;
34746
+ this.fetch_todos(cat);
34747
+ }
34748
+ open(o) {
34749
+ if (!o)
34750
+ return;
34751
+ window.open(o, "_self");
34752
+ this.todoOpen.emit(o);
34753
+ }
34754
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FHHomeTodoComponent, deps: [{ token: QueryService }, { token: AppService }], target: i0.ɵɵFactoryTarget.Component });
34755
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", 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: `
34756
+ <div class="tool-panel">
34757
+ <div class="panel-head">
34758
+ <div>
34759
+ <div class="panel-title">
34760
+ <i class="material-symbols-outlined">{{ icon }}</i>
34761
+ {{ title }}
34762
+ </div>
34763
+ <div class="panel-sub" *ngIf="subtitle">{{ subtitle }}</div>
34764
+ </div>
34765
+ <span class="tag tag-accent" *ngIf="tagLabel">{{ tagLabel }}</span>
34766
+ </div>
34767
+ <div class="panel-body">
34768
+
34769
+ <div class="cat-tabs" *ngIf="showCategoryFilter && categories.length">
34770
+ <button class="cat-tab" [class.cat-tab-active]="selectedCat === ''" (click)="select_cat('')">{{ allLabel }}</button>
34771
+ <button
34772
+ class="cat-tab"
34773
+ *ngFor="let cat of categories"
34774
+ [class.cat-tab-active]="selectedCat === cat"
34775
+ (click)="select_cat(cat)"
34776
+ >{{ cat }}</button>
34777
+ </div>
34778
+
34779
+ <div class="tool-list">
34780
+ <button
34781
+ type="button"
34782
+ class="tool-row"
34783
+ *ngFor="let todo of todos"
34784
+ (click)="open(todo[fieldLink])"
34785
+ >
34786
+ <span class="tool-row-label">{{ todo[fieldLabel] }}</span>
34787
+ <span class="tool-row-meta">{{ todo[fieldMeta] }}</span>
34788
+ <span class="tool-row-date">{{ todo[fieldDate] | date:dateFormat }}</span>
34789
+ <i class="material-symbols-outlined tool-row-arrow">arrow_forward</i>
34790
+ </button>
34791
+
34792
+ <div class="empty" *ngIf="todos && todos.length === 0">
34793
+ <i class="material-symbols-outlined empty-icon">{{ icon }}</i>
34794
+ <div class="empty-title">{{ emptyTitle }}</div>
34795
+ <div class="empty-sub">{{ emptySub }}</div>
34796
+ </div>
34797
+ </div>
34798
+ </div>
34799
+ </div>
34800
+
34801
+ <p class="tool-error" *ngIf="errorMsg != ''">{{ errorMsg }}</p>
34802
+ `, 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: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i5.DatePipe, name: "date" }] });
34803
+ }
34804
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FHHomeTodoComponent, decorators: [{
34805
+ type: Component,
34806
+ args: [{ selector: "FHHomeTodo", standalone: true, imports: [CommonModule], template: `
34807
+ <div class="tool-panel">
34808
+ <div class="panel-head">
34809
+ <div>
34810
+ <div class="panel-title">
34811
+ <i class="material-symbols-outlined">{{ icon }}</i>
34812
+ {{ title }}
34813
+ </div>
34814
+ <div class="panel-sub" *ngIf="subtitle">{{ subtitle }}</div>
34815
+ </div>
34816
+ <span class="tag tag-accent" *ngIf="tagLabel">{{ tagLabel }}</span>
34817
+ </div>
34818
+ <div class="panel-body">
34819
+
34820
+ <div class="cat-tabs" *ngIf="showCategoryFilter && categories.length">
34821
+ <button class="cat-tab" [class.cat-tab-active]="selectedCat === ''" (click)="select_cat('')">{{ allLabel }}</button>
34822
+ <button
34823
+ class="cat-tab"
34824
+ *ngFor="let cat of categories"
34825
+ [class.cat-tab-active]="selectedCat === cat"
34826
+ (click)="select_cat(cat)"
34827
+ >{{ cat }}</button>
34828
+ </div>
34829
+
34830
+ <div class="tool-list">
34831
+ <button
34832
+ type="button"
34833
+ class="tool-row"
34834
+ *ngFor="let todo of todos"
34835
+ (click)="open(todo[fieldLink])"
34836
+ >
34837
+ <span class="tool-row-label">{{ todo[fieldLabel] }}</span>
34838
+ <span class="tool-row-meta">{{ todo[fieldMeta] }}</span>
34839
+ <span class="tool-row-date">{{ todo[fieldDate] | date:dateFormat }}</span>
34840
+ <i class="material-symbols-outlined tool-row-arrow">arrow_forward</i>
34841
+ </button>
34842
+
34843
+ <div class="empty" *ngIf="todos && todos.length === 0">
34844
+ <i class="material-symbols-outlined empty-icon">{{ icon }}</i>
34845
+ <div class="empty-title">{{ emptyTitle }}</div>
34846
+ <div class="empty-sub">{{ emptySub }}</div>
34847
+ </div>
34848
+ </div>
34849
+ </div>
34850
+ </div>
34851
+
34852
+ <p class="tool-error" *ngIf="errorMsg != ''">{{ errorMsg }}</p>
34853
+ `, 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"] }]
34854
+ }], ctorParameters: () => [{ type: QueryService }, { type: AppService }], propDecorators: { accent: [{
34855
+ type: Input
34856
+ }], accentDark: [{
34857
+ type: Input
34858
+ }], _a: [{
34859
+ type: HostBinding,
34860
+ args: ["style.--fh-home-accent"]
34861
+ }], _ad: [{
34862
+ type: HostBinding,
34863
+ args: ["style.--fh-home-accent-dark"]
34864
+ }], title: [{
34865
+ type: Input
34866
+ }], subtitle: [{
34867
+ type: Input
34868
+ }], tagLabel: [{
34869
+ type: Input
34870
+ }], icon: [{
34871
+ type: Input
34872
+ }], allLabel: [{
34873
+ type: Input
34874
+ }], emptyTitle: [{
34875
+ type: Input
34876
+ }], emptySub: [{
34877
+ type: Input
34878
+ }], dateFormat: [{
34879
+ type: Input
34880
+ }], showCategoryFilter: [{
34881
+ type: Input
34882
+ }], sqlCategories: [{
34883
+ type: Input
34884
+ }], sqlByUser: [{
34885
+ type: Input
34886
+ }], sqlByUserCat: [{
34887
+ type: Input
34888
+ }], fieldLabel: [{
34889
+ type: Input
34890
+ }], fieldMeta: [{
34891
+ type: Input
34892
+ }], fieldDate: [{
34893
+ type: Input
34894
+ }], fieldLink: [{
34895
+ type: Input
34896
+ }], fieldCategory: [{
34897
+ type: Input
34898
+ }], todoOpen: [{
34899
+ type: Output
34900
+ }] } });
34901
+
34902
+ Chart.register(...registerables);
34903
+ /** Palette di default del doughnut (primo colore = accent). */
34904
+ const DEFAULT_PIE_COLORS = [
34905
+ "#63B345", "#161212", "#B0A6A6", "#C8E3BC", "#3F7029",
34906
+ "#5C5454", "#DCC9B6", "#549A3B", "#C9C2C2", "#443D3D",
34907
+ ];
34908
+ /**
34909
+ * Pannello "La tua attività" della homepage: doughnut delle applicazioni
34910
+ * utilizzate + grafico a linea degli step di workflow eseguiti nel periodo.
34911
+ *
34912
+ * Le due query (in query.ini) e i nomi dei campi sono configurabili via @Input.
34913
+ * - Query app: campi `label`, `value` (rinominabili).
34914
+ * - Query step: campi `giorno` (data ISO), `value` (rinominabili).
34915
+ */
34916
+ class FHHomeStatsComponent {
34917
+ apps;
34918
+ queryService;
34919
+ // ---- Tema ----
34920
+ accent = "#63B345";
34921
+ accentDark = "#3f7029";
34922
+ /** Palette del doughnut; il primo elemento dovrebbe coincidere con l'accent. */
34923
+ pieColors = DEFAULT_PIE_COLORS;
34924
+ get _a() { return this.accent; }
34925
+ get _ad() { return this.accentDark; }
34926
+ // ---- Testi ----
34927
+ appsTitle = "Applicazioni utilizzate";
34928
+ stepsTitle = "Step workflow eseguiti";
34929
+ appsTag = "Attività";
34930
+ stepsTag = "Workflow";
34931
+ appsEmptyTitle = "Nessuna attività nel periodo";
34932
+ appsEmptySub = "Le applicazioni che apri compariranno qui.";
34933
+ stepsEmptyTitle = "Nessuno step nel periodo";
34934
+ stepsEmptySub = "Gli step dei workflow che esegui compariranno qui.";
34935
+ // ---- Periodo ----
34936
+ /** Giorni indietro coperti dai grafici (default 30). */
34937
+ days = 30;
34938
+ // ---- Query (query.ini) ----
34939
+ sqlApps = "SELECT_HOME_STATS_APPS";
34940
+ sqlSteps = "SELECT_HOME_STATS_STEPS";
34941
+ // ---- Mappatura campi ----
34942
+ appLabelField = "label";
34943
+ appValueField = "value";
34944
+ stepDayField = "giorno";
34945
+ stepValueField = "value";
34946
+ stepSeriesLabel = "Step";
34947
+ loading = true;
34948
+ error = false;
34949
+ hasApps = false;
34950
+ hasSteps = false;
34951
+ periodoLabel = "";
34952
+ subtitlePrefix = "";
34953
+ pieLabels = [];
34954
+ pieDatasets = [];
34955
+ pieOptions = {
34956
+ responsive: true,
34957
+ maintainAspectRatio: false,
34958
+ plugins: {
34959
+ legend: { position: "right", align: "center", labels: { font: { size: 11 }, boxWidth: 10, padding: 8 } },
34960
+ tooltip: {
34961
+ callbacks: {
34962
+ label: (ctx) => {
34963
+ const v = ctx.parsed ?? 0;
34964
+ const total = ctx.dataset.data.reduce((a, b) => a + b, 0);
34965
+ const pct = total > 0 ? ((v / total) * 100).toFixed(1) : "0";
34966
+ return `${ctx.label}: ${v} (${pct}%)`;
34967
+ },
34968
+ },
34969
+ },
34970
+ },
34971
+ };
34972
+ lineLabels = [];
34973
+ lineDatasets = [];
34974
+ lineOptions;
34975
+ constructor(apps, queryService) {
34976
+ this.apps = apps;
34977
+ this.queryService = queryService;
34978
+ }
34979
+ ngOnInit() {
34980
+ this.subtitlePrefix = `Workflow · ultimi ${this.days} giorni`;
34981
+ this.lineOptions = {
34982
+ responsive: true,
34983
+ maintainAspectRatio: false,
34984
+ plugins: { legend: { display: false } },
34985
+ scales: {
34986
+ y: { beginAtZero: true, ticks: { precision: 0, font: { size: 10 } } },
34987
+ x: { ticks: { font: { size: 10 }, maxRotation: 0, autoSkip: true } },
34988
+ },
34989
+ elements: {
34990
+ line: { tension: 0.3, borderColor: this.accent, borderWidth: 2, fill: true, backgroundColor: "rgba(99,179,69,0.08)" },
34991
+ point: { radius: 3, backgroundColor: this.accent },
34992
+ },
34993
+ };
34994
+ this.buildPeriodoLabel();
34995
+ this.tryLoad();
34996
+ }
34997
+ buildPeriodoLabel() {
34998
+ const to = new Date();
34999
+ const from = new Date();
35000
+ from.setDate(to.getDate() - this.days);
35001
+ const fmt = (d) => `${String(d.getDate()).padStart(2, "0")}/${String(d.getMonth() + 1).padStart(2, "0")}/${d.getFullYear()}`;
35002
+ this.periodoLabel = `${fmt(from)} – ${fmt(to)}`;
35003
+ }
35004
+ tryLoad(retries = 10) {
35005
+ if (!this.apps.user) {
35006
+ if (retries <= 0) {
35007
+ this.error = true;
35008
+ this.loading = false;
35009
+ return;
35010
+ }
35011
+ setTimeout(() => this.tryLoad(retries - 1), 300);
35012
+ return;
35013
+ }
35014
+ this.load();
35015
+ }
35016
+ load() {
35017
+ const qApps = new QParam();
35018
+ qApps.sql = this.sqlApps;
35019
+ qApps.values = [this.apps.user];
35020
+ qApps.types = ["string"];
35021
+ const qSteps = new QParam();
35022
+ qSteps.sql = this.sqlSteps;
35023
+ qSteps.values = [this.apps.user];
35024
+ qSteps.types = ["string"];
35025
+ forkJoin({
35026
+ apps: this.queryService.doQuery(qApps).pipe(catchError(() => of(null))),
35027
+ steps: this.queryService.doQuery(qSteps).pipe(catchError(() => of(null))),
35028
+ }).subscribe({
35029
+ next: (r) => {
35030
+ if (!r.apps || r.apps.result_msg !== "OK" || !r.steps || r.steps.result_msg !== "OK") {
35031
+ this.error = true;
35032
+ this.loading = false;
35033
+ return;
35034
+ }
35035
+ this.buildPie(r.apps.result_data || []);
35036
+ this.buildLine(r.steps.result_data || []);
35037
+ this.loading = false;
35038
+ },
35039
+ error: () => {
35040
+ this.error = true;
35041
+ this.loading = false;
35042
+ },
35043
+ });
35044
+ }
35045
+ buildPie(rows) {
35046
+ this.hasApps = rows.length > 0;
35047
+ if (!this.hasApps)
35048
+ return;
35049
+ this.pieLabels = rows.map((r) => r[this.appLabelField] || "—");
35050
+ const values = rows.map((r) => Number(r[this.appValueField] || 0));
35051
+ this.pieDatasets = [
35052
+ {
35053
+ data: values,
35054
+ backgroundColor: this.pieColors.slice(0, values.length),
35055
+ borderColor: "#fff",
35056
+ borderWidth: 2,
35057
+ },
35058
+ ];
35059
+ }
35060
+ buildLine(rows) {
35061
+ this.hasSteps = rows.length > 0;
35062
+ if (!this.hasSteps)
35063
+ return;
35064
+ const map = new Map();
35065
+ for (const r of rows) {
35066
+ const key = String(r[this.stepDayField]).substring(0, 10);
35067
+ map.set(key, Number(r[this.stepValueField] || 0));
35068
+ }
35069
+ const labels = [];
35070
+ const values = [];
35071
+ const today = new Date();
35072
+ for (let i = this.days - 1; i >= 0; i--) {
35073
+ const d = new Date(today);
35074
+ d.setDate(today.getDate() - i);
35075
+ const iso = `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")}`;
35076
+ labels.push(`${String(d.getDate()).padStart(2, "0")}/${String(d.getMonth() + 1).padStart(2, "0")}`);
35077
+ values.push(map.get(iso) || 0);
35078
+ }
35079
+ this.lineLabels = labels;
35080
+ this.lineDatasets = [{ data: values, label: this.stepSeriesLabel }];
35081
+ }
35082
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FHHomeStatsComponent, deps: [{ token: AppService }, { token: QueryService }], target: i0.ɵɵFactoryTarget.Component });
35083
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", 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: `
35084
+ <div class="home-stats" *ngIf="!error">
35085
+
35086
+ <div class="stats-panel">
35087
+ <div class="panel-head">
35088
+ <div>
35089
+ <div class="panel-title">
35090
+ <i class="material-symbols-outlined">apps</i>
35091
+ {{ appsTitle }}
35092
+ </div>
35093
+ <div class="panel-sub">{{ subtitlePrefix }} · {{ periodoLabel }}</div>
35094
+ </div>
35095
+ <span class="tag tag-accent" *ngIf="appsTag">{{ appsTag }}</span>
35096
+ </div>
35097
+ <div class="panel-body">
35098
+ <div class="chart-wrap" *ngIf="!loading && hasApps">
35099
+ <canvas baseChart type="doughnut" [labels]="pieLabels" [datasets]="pieDatasets" [options]="pieOptions"></canvas>
35100
+ </div>
35101
+ <div class="empty" *ngIf="!loading && !hasApps">
35102
+ <i class="material-symbols-outlined empty-icon">apps</i>
35103
+ <div class="empty-title">{{ appsEmptyTitle }}</div>
35104
+ <div class="empty-sub">{{ appsEmptySub }}</div>
35105
+ </div>
35106
+ <div class="sk-chart" *ngIf="loading"></div>
35107
+ </div>
35108
+ </div>
35109
+
35110
+ <div class="stats-panel">
35111
+ <div class="panel-head">
35112
+ <div>
35113
+ <div class="panel-title">
35114
+ <i class="material-symbols-outlined">timeline</i>
35115
+ {{ stepsTitle }}
35116
+ </div>
35117
+ <div class="panel-sub">{{ subtitlePrefix }} · {{ periodoLabel }}</div>
35118
+ </div>
35119
+ <span class="tag tag-neutral" *ngIf="stepsTag">{{ stepsTag }}</span>
35120
+ </div>
35121
+ <div class="panel-body">
35122
+ <div class="chart-wrap" *ngIf="!loading && hasSteps">
35123
+ <canvas baseChart type="line" [labels]="lineLabels" [datasets]="lineDatasets" [options]="lineOptions"></canvas>
35124
+ </div>
35125
+ <div class="empty" *ngIf="!loading && !hasSteps">
35126
+ <i class="material-symbols-outlined empty-icon">route</i>
35127
+ <div class="empty-title">{{ stepsEmptyTitle }}</div>
35128
+ <div class="empty-sub">{{ stepsEmptySub }}</div>
35129
+ </div>
35130
+ <div class="sk-chart" *ngIf="loading"></div>
35131
+ </div>
35132
+ </div>
35133
+
35134
+ </div>
35135
+ `, 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: i5.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"] }] });
35136
+ }
35137
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FHHomeStatsComponent, decorators: [{
35138
+ type: Component,
35139
+ args: [{ selector: "FHHomeStats", standalone: true, imports: [CommonModule, BaseChartDirective], template: `
35140
+ <div class="home-stats" *ngIf="!error">
35141
+
35142
+ <div class="stats-panel">
35143
+ <div class="panel-head">
35144
+ <div>
35145
+ <div class="panel-title">
35146
+ <i class="material-symbols-outlined">apps</i>
35147
+ {{ appsTitle }}
35148
+ </div>
35149
+ <div class="panel-sub">{{ subtitlePrefix }} · {{ periodoLabel }}</div>
35150
+ </div>
35151
+ <span class="tag tag-accent" *ngIf="appsTag">{{ appsTag }}</span>
35152
+ </div>
35153
+ <div class="panel-body">
35154
+ <div class="chart-wrap" *ngIf="!loading && hasApps">
35155
+ <canvas baseChart type="doughnut" [labels]="pieLabels" [datasets]="pieDatasets" [options]="pieOptions"></canvas>
35156
+ </div>
35157
+ <div class="empty" *ngIf="!loading && !hasApps">
35158
+ <i class="material-symbols-outlined empty-icon">apps</i>
35159
+ <div class="empty-title">{{ appsEmptyTitle }}</div>
35160
+ <div class="empty-sub">{{ appsEmptySub }}</div>
35161
+ </div>
35162
+ <div class="sk-chart" *ngIf="loading"></div>
35163
+ </div>
35164
+ </div>
35165
+
35166
+ <div class="stats-panel">
35167
+ <div class="panel-head">
35168
+ <div>
35169
+ <div class="panel-title">
35170
+ <i class="material-symbols-outlined">timeline</i>
35171
+ {{ stepsTitle }}
35172
+ </div>
35173
+ <div class="panel-sub">{{ subtitlePrefix }} · {{ periodoLabel }}</div>
35174
+ </div>
35175
+ <span class="tag tag-neutral" *ngIf="stepsTag">{{ stepsTag }}</span>
35176
+ </div>
35177
+ <div class="panel-body">
35178
+ <div class="chart-wrap" *ngIf="!loading && hasSteps">
35179
+ <canvas baseChart type="line" [labels]="lineLabels" [datasets]="lineDatasets" [options]="lineOptions"></canvas>
35180
+ </div>
35181
+ <div class="empty" *ngIf="!loading && !hasSteps">
35182
+ <i class="material-symbols-outlined empty-icon">route</i>
35183
+ <div class="empty-title">{{ stepsEmptyTitle }}</div>
35184
+ <div class="empty-sub">{{ stepsEmptySub }}</div>
35185
+ </div>
35186
+ <div class="sk-chart" *ngIf="loading"></div>
35187
+ </div>
35188
+ </div>
35189
+
35190
+ </div>
35191
+ `, 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"] }]
35192
+ }], ctorParameters: () => [{ type: AppService }, { type: QueryService }], propDecorators: { accent: [{
35193
+ type: Input
35194
+ }], accentDark: [{
35195
+ type: Input
35196
+ }], pieColors: [{
35197
+ type: Input
35198
+ }], _a: [{
35199
+ type: HostBinding,
35200
+ args: ["style.--fh-home-accent"]
35201
+ }], _ad: [{
35202
+ type: HostBinding,
35203
+ args: ["style.--fh-home-accent-dark"]
35204
+ }], appsTitle: [{
35205
+ type: Input
35206
+ }], stepsTitle: [{
35207
+ type: Input
35208
+ }], appsTag: [{
35209
+ type: Input
35210
+ }], stepsTag: [{
35211
+ type: Input
35212
+ }], appsEmptyTitle: [{
35213
+ type: Input
35214
+ }], appsEmptySub: [{
35215
+ type: Input
35216
+ }], stepsEmptyTitle: [{
35217
+ type: Input
35218
+ }], stepsEmptySub: [{
35219
+ type: Input
35220
+ }], days: [{
35221
+ type: Input
35222
+ }], sqlApps: [{
35223
+ type: Input
35224
+ }], sqlSteps: [{
35225
+ type: Input
35226
+ }], appLabelField: [{
35227
+ type: Input
35228
+ }], appValueField: [{
35229
+ type: Input
35230
+ }], stepDayField: [{
35231
+ type: Input
35232
+ }], stepValueField: [{
35233
+ type: Input
35234
+ }], stepSeriesLabel: [{
35235
+ type: Input
35236
+ }] } });
35237
+
35238
+ /**
35239
+ * Pannello "Documenti" della homepage: esplora la cartella documentale condivisa
35240
+ * (navigazione cartelle + download file) tramite FileService.
35241
+ *
35242
+ * Endpoint e percorsi sono configurabili via @Input per riuso cross-cliente.
35243
+ * L'endpoint API NON è obbligatorio: se non passato viene ricavato da
35244
+ * AppService.API_ENDPOINT (lo stesso usato da QueryService/FileService).
35245
+ */
35246
+ class FHHomeDocsComponent {
35247
+ _dataService;
35248
+ appService;
35249
+ // ---- Tema ----
35250
+ accent = "#63b345";
35251
+ accentDark = "#3f7029";
35252
+ get _a() { return this.accent; }
35253
+ get _ad() { return this.accentDark; }
35254
+ // ---- Testi ----
35255
+ title = "Documenti";
35256
+ tagLabel = "Archivio";
35257
+ emptyTitle = "Nessun documento";
35258
+ emptySub = "I documenti condivisi compariranno qui.";
35259
+ // ---- Configurazione storage ----
35260
+ /**
35261
+ * Base URL delle API per costruire l'URL di download (il suffisso "/api" viene rimosso).
35262
+ * Opzionale: se vuoto si usa AppService.API_ENDPOINT.
35263
+ */
35264
+ apiEndpoint = "";
35265
+ /** Comando FileService per elencare i documenti. */
35266
+ command = "list_documents";
35267
+ /** Cartella radice da cui partire. */
35268
+ rootPath = "/";
35269
+ /** Segmento di percorso aggiunto all'endpoint per il download. */
35270
+ downloadSegment = "documenti/";
35271
+ /** Percorso base delle icone tipo file. */
35272
+ iconBasePath = "assets/icons/square-o/";
35273
+ curr_path = "/";
35274
+ last_curr_path = "/";
35275
+ b_loading = false;
35276
+ errorMsg = "";
35277
+ dirs = [];
35278
+ files = [];
35279
+ constructor(_dataService, appService) {
35280
+ this._dataService = _dataService;
35281
+ this.appService = appService;
35282
+ }
35283
+ /** Endpoint effettivo: input esplicito oppure default da AppService. */
35284
+ get effectiveEndpoint() {
35285
+ return this.apiEndpoint || this.appService.API_ENDPOINT || "";
35286
+ }
35287
+ ngOnInit() {
35288
+ this.curr_path = this.rootPath;
35289
+ this.last_curr_path = this.rootPath;
35290
+ this.ref_dirs(this.curr_path);
35291
+ }
35292
+ open_dir(item) {
35293
+ this.ref_dirs(item.full_path.split("\\\\").join("\\"));
35294
+ }
35295
+ download_file(item) {
35296
+ window.open(this.effectiveEndpoint.split("/api").join("") +
35297
+ this.downloadSegment +
35298
+ item.full_path.split("\\\\").join("\\"));
35299
+ }
35300
+ ref_dirs(s) {
35301
+ this.last_curr_path = this.curr_path;
35302
+ const p = new FSInput();
35303
+ p.p1 = s;
35304
+ p.command = this.command;
35305
+ this.curr_path = s;
35306
+ this.b_loading = true;
35307
+ this._dataService.doQuery(p).subscribe((data) => {
35308
+ this.b_loading = false;
35309
+ if (data != null && data.result_msg == "OK") {
35310
+ this.dirs = [];
35311
+ this.files = [];
35312
+ if (this.curr_path != "/") {
35313
+ const sx = this.curr_path.split("\\");
35314
+ let ss = "\\";
35315
+ if (sx.length > 2) {
35316
+ ss = "";
35317
+ for (let i = 0; i < sx.length - 1; i++) {
35318
+ ss = ss + "\\" + sx[i];
35319
+ }
35320
+ }
35321
+ if (s != "\\" && s != "" && s != "/")
35322
+ this.dirs.push({ fn: "..", full_path: ss, icon: "arrowup.png" });
35323
+ }
35324
+ for (let i = 0; i < data.result_data.length; i++) {
35325
+ if (data.result_data[i].t == "D")
35326
+ data.result_data[i].icon = "folder.svg";
35327
+ else {
35328
+ let iconf = "default";
35329
+ const arrf = data.result_data[i].fn.split(".");
35330
+ if (KNOWN_EXT.indexOf(arrf[arrf.length - 1].toLocaleUpperCase()) != -1)
35331
+ iconf = arrf[arrf.length - 1].toLocaleLowerCase();
35332
+ data.result_data[i].icon = iconf + ".svg";
35333
+ }
35334
+ if (data.result_data[i].t == "D")
35335
+ this.dirs.push(data.result_data[i]);
35336
+ else
35337
+ this.files.push(data.result_data[i]);
35338
+ }
35339
+ }
35340
+ });
35341
+ }
35342
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FHHomeDocsComponent, deps: [{ token: FileService }, { token: AppService }], target: i0.ɵɵFactoryTarget.Component });
35343
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", 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: `
35344
+ <div class="tool-panel">
35345
+ <div class="panel-head">
35346
+ <div>
35347
+ <div class="panel-title">
35348
+ <i class="material-symbols-outlined">folder_open</i>
35349
+ {{ title }}
35350
+ </div>
35351
+ <div class="panel-sub">{{ curr_path }}</div>
35352
+ </div>
35353
+ <span class="tag tag-neutral" *ngIf="tagLabel">{{ tagLabel }}</span>
35354
+ </div>
35355
+ <div class="panel-body">
35356
+ <div class="tool-list">
35357
+ <button type="button" class="tool-row" *ngFor="let item of dirs" (click)="open_dir(item)">
35358
+ <img class="tool-row-icon" [src]="iconBasePath + item.icon" alt="" />
35359
+ <span class="tool-row-label">{{ item.fn }}</span>
35360
+ <i class="material-symbols-outlined tool-row-arrow">arrow_forward</i>
35361
+ </button>
35362
+
35363
+ <button type="button" class="tool-row" *ngFor="let item of files" (click)="download_file(item)">
35364
+ <img class="tool-row-icon" [src]="iconBasePath + item.icon" alt="" />
35365
+ <span class="tool-row-label">{{ item.fn }}</span>
35366
+ <span class="tool-row-meta">{{ item.size }}</span>
35367
+ <i class="material-symbols-outlined tool-row-arrow">download</i>
35368
+ </button>
35369
+
35370
+ <div class="empty" *ngIf="!b_loading && dirs.length === 0 && files.length === 0">
35371
+ <i class="material-symbols-outlined empty-icon">folder_open</i>
35372
+ <div class="empty-title">{{ emptyTitle }}</div>
35373
+ <div class="empty-sub">{{ emptySub }}</div>
35374
+ </div>
35375
+ </div>
35376
+ </div>
35377
+ </div>
35378
+
35379
+ <p class="tool-error" *ngIf="errorMsg != ''">{{ errorMsg }}</p>
35380
+ `, 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: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
35381
+ }
35382
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FHHomeDocsComponent, decorators: [{
35383
+ type: Component,
35384
+ args: [{ selector: "FHHomeDocs", standalone: true, imports: [CommonModule], template: `
35385
+ <div class="tool-panel">
35386
+ <div class="panel-head">
35387
+ <div>
35388
+ <div class="panel-title">
35389
+ <i class="material-symbols-outlined">folder_open</i>
35390
+ {{ title }}
35391
+ </div>
35392
+ <div class="panel-sub">{{ curr_path }}</div>
35393
+ </div>
35394
+ <span class="tag tag-neutral" *ngIf="tagLabel">{{ tagLabel }}</span>
35395
+ </div>
35396
+ <div class="panel-body">
35397
+ <div class="tool-list">
35398
+ <button type="button" class="tool-row" *ngFor="let item of dirs" (click)="open_dir(item)">
35399
+ <img class="tool-row-icon" [src]="iconBasePath + item.icon" alt="" />
35400
+ <span class="tool-row-label">{{ item.fn }}</span>
35401
+ <i class="material-symbols-outlined tool-row-arrow">arrow_forward</i>
35402
+ </button>
35403
+
35404
+ <button type="button" class="tool-row" *ngFor="let item of files" (click)="download_file(item)">
35405
+ <img class="tool-row-icon" [src]="iconBasePath + item.icon" alt="" />
35406
+ <span class="tool-row-label">{{ item.fn }}</span>
35407
+ <span class="tool-row-meta">{{ item.size }}</span>
35408
+ <i class="material-symbols-outlined tool-row-arrow">download</i>
35409
+ </button>
35410
+
35411
+ <div class="empty" *ngIf="!b_loading && dirs.length === 0 && files.length === 0">
35412
+ <i class="material-symbols-outlined empty-icon">folder_open</i>
35413
+ <div class="empty-title">{{ emptyTitle }}</div>
35414
+ <div class="empty-sub">{{ emptySub }}</div>
35415
+ </div>
35416
+ </div>
35417
+ </div>
35418
+ </div>
35419
+
35420
+ <p class="tool-error" *ngIf="errorMsg != ''">{{ errorMsg }}</p>
35421
+ `, 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"] }]
35422
+ }], ctorParameters: () => [{ type: FileService }, { type: AppService }], propDecorators: { accent: [{
35423
+ type: Input
35424
+ }], accentDark: [{
35425
+ type: Input
35426
+ }], _a: [{
35427
+ type: HostBinding,
35428
+ args: ["style.--fh-home-accent"]
35429
+ }], _ad: [{
35430
+ type: HostBinding,
35431
+ args: ["style.--fh-home-accent-dark"]
35432
+ }], title: [{
35433
+ type: Input
35434
+ }], tagLabel: [{
35435
+ type: Input
35436
+ }], emptyTitle: [{
35437
+ type: Input
35438
+ }], emptySub: [{
35439
+ type: Input
35440
+ }], apiEndpoint: [{
35441
+ type: Input
35442
+ }], command: [{
35443
+ type: Input
35444
+ }], rootPath: [{
35445
+ type: Input
35446
+ }], downloadSegment: [{
35447
+ type: Input
35448
+ }], iconBasePath: [{
35449
+ type: Input
35450
+ }] } });
35451
+ /** Estensioni con icona dedicata (set "square-o"). */
35452
+ 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";
35453
+
34440
35454
  /*
34441
35455
  * Public API Surface of fluxhublib
34442
35456
  */
@@ -34445,5 +35459,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
34445
35459
  * Generated bundle index. Do not edit.
34446
35460
  */
34447
35461
 
34448
- export { AppMakerService, AppService, ApprovaGridComponent, AuthHttpRequestInterceptor, AuthenticationService, BpmnEditorComponent, CheckboxEditorComponent, ComboBoxEditorComponent, CurrencyComponent, DialogBaseComponent, FHAutoCompleteComponent, FHCheckBoxComponent, FHColorPickerComponent, FHComboboxComponent, FHConfirmValues, FHCurrencyFormatterDirective, FHCurrencyPipe, FHDatePickerComponent, FHDateRangePickerComponent, FHFieldPickListComponent, FHFilterComboboxComponent, FHFormBuilderComponent, FHFormExecuterComponent, FHFormToolBarComponent, FHGridComponent, FHGridJSONComponent, FHGridToolBarComponent, FHGuard, FHHelpButtonComponent, FHImageViewerComponent, FHListComponent, FHLogPanelComponent, FHMultiComboboxComponent, FHNotesPanelComponent, FHNumericFieldComponent, FHPickFieldComponent, FHPickUsersComponent, FHRichTextComponent, FHRoleManagerComponent, FHTableManagerComponent, FHTextAreaComponent, FHTextInputComponent, FHTimePickerComponent, FHToolBarCustomAction, FHToolbarCommandType, FHUploadComponent, FHUploadPanelComponent, FHUploadPanelS3Component, FHUploadS3Component, FHUserFieldComponent, FHWinAppLogsComponent, FHWinAskBigTextComponent, FHWinAskButtonsComponent, FHWinAskNumberComponent, FHWinAskRichTextComponent, FHWinAskTextComponent, FHWinAutoComplete, FHWinComboComponent, FHWinConfirmComponent, FHWinErrorComponent, FHWinGridSelection, FHWinInfoComponent, FHWinListComponent, FHWinMappaComponent, FHWinOutputComponent, FHWinPicklistComponent, FHWinSalvaAnnulla, FHWinSelectByGridComponent, FHWinShowEmail, FHWinShowEmailS3, FHWinShowImage, FHWinShowLog, FHWinShowLogDett, FHWinTimeSlider, FHWinUploadComponent, FHWinUserInfo, FHWinUserPickerComponent, FHWinWaitComponent, FHWorkflowForm, FHWorkflowHeaderBar, FHWorkflowView, FSInput, FSResult, FileService, GridService, LocalDBService, MonthYearPickerComponent, NumericEditorComponent, OdbcService, OfficeAutomatorService, OfficeOperation, OfficeResult, QGParam, QGResult, QParam, QResult, QueryOpenService, QueryService, RegistrationService, ReplaceLineBreaks, SafePipe, TextAreaEditorComponent, UtilityService, WkfService, YearPickerComponent, createButtonCommand, createCheckboxCommand, createSpacerCommand, createTableManagerCommand, fh_win_translate };
35462
+ export { AppMakerService, AppService, ApprovaGridComponent, AuthHttpRequestInterceptor, AuthenticationService, BpmnEditorComponent, CheckboxEditorComponent, ComboBoxEditorComponent, CurrencyComponent, DialogBaseComponent, FHAutoCompleteComponent, FHCheckBoxComponent, FHColorPickerComponent, FHComboboxComponent, FHConfirmValues, FHCurrencyFormatterDirective, FHCurrencyPipe, FHDatePickerComponent, FHDateRangePickerComponent, FHFieldPickListComponent, FHFilterComboboxComponent, FHFormBuilderComponent, FHFormExecuterComponent, FHFormToolBarComponent, FHGridComponent, FHGridJSONComponent, FHGridToolBarComponent, FHGuard, FHHelpButtonComponent, FHHomeDocsComponent, FHHomeLauncherComponent, FHHomeStatsComponent, FHHomeTodoComponent, FHImageViewerComponent, FHListComponent, FHLogPanelComponent, FHMultiComboboxComponent, FHNotesPanelComponent, FHNumericFieldComponent, FHPickFieldComponent, FHPickUsersComponent, FHRichTextComponent, FHRoleManagerComponent, FHTableManagerComponent, FHTextAreaComponent, FHTextInputComponent, FHTimePickerComponent, FHToolBarCustomAction, FHToolbarCommandType, FHUploadComponent, FHUploadPanelComponent, FHUploadPanelS3Component, FHUploadS3Component, FHUserFieldComponent, FHWinAppLogsComponent, FHWinAskBigTextComponent, FHWinAskButtonsComponent, FHWinAskNumberComponent, FHWinAskRichTextComponent, FHWinAskTextComponent, FHWinAutoComplete, FHWinComboComponent, FHWinConfirmComponent, FHWinErrorComponent, FHWinGridSelection, FHWinInfoComponent, FHWinListComponent, FHWinMappaComponent, FHWinOutputComponent, FHWinPicklistComponent, FHWinSalvaAnnulla, FHWinSelectByGridComponent, FHWinShowEmail, FHWinShowEmailS3, FHWinShowImage, FHWinShowLog, FHWinShowLogDett, FHWinTimeSlider, FHWinUploadComponent, FHWinUserInfo, FHWinUserPickerComponent, FHWinWaitComponent, FHWorkflowForm, FHWorkflowHeaderBar, FHWorkflowView, FSInput, FSResult, FileService, GridService, LocalDBService, MonthYearPickerComponent, NumericEditorComponent, OdbcService, OfficeAutomatorService, OfficeOperation, OfficeResult, QGParam, QGResult, QParam, QResult, QueryOpenService, QueryService, RegistrationService, ReplaceLineBreaks, SafePipe, TextAreaEditorComponent, UtilityService, WkfService, YearPickerComponent, createButtonCommand, createCheckboxCommand, createSpacerCommand, createTableManagerCommand, fh_win_translate };
34449
35463
  //# sourceMappingURL=fluxhub-fluxhub-lib.mjs.map